Jump to content
XPEnology Community

yau123

Rookie
  • Posts

    1
  • Joined

  • Last visited

Posts posted by yau123

  1. On 1/29/2019 at 3:00 PM, flyride said:

    Ok, I think this will do it for you.

     

    You grew the partition on your host disk and extended the /dev/md2 array that sits on top of that.

    We still need to tell lvm that its "physical" device (/dev/md2) has changed.

    We need to extend the logical volume

    and we need to resize the filesystem.

    The good news is that all this can be done without shutting down services.

     

    Right now a vgdisplay will show all the space available to the volume group is completely used even though we have space free on /dev/md2

     

    So, we resume essentially at step #9 of the prior guide. 

     

    9. Inform lvm that the physical device got bigger.

    
    
    $ sudo pvresize /dev/md2
      Physical volume "/dev/md2" changed
      1 physical volume(s) resized / 0 physical volume(s) not resized

    If you re-run vgdisplay now, you should see some free space.

     

    10. Extend the lv

    
    
    $ sudo lvextend -l +100%FREE /dev/vg1/volume_1
      Size of logical volume vg1/volume_1 changed from 15.39 GiB (3939 extents) to 20.48 GiB (5244 extents).
      Logical volume volume_1 successfully resized.

    11. Finally, extend the filesystem (this is for ext4, there is a different command for btrfs)

    
    
    $ sudo resize2fs -f /dev/vg1/volume_1
    resize2fs 1.42.6 (21-Sep-2012)
    Filesystem at /dev/vg1/volume_1 is mounted on /volume1; on-line resizing required
    old_desc_blocks = 2, new_desc_blocks = 3
    The filesystem on /dev/vg1/volume_1 is now 5369856 blocks long.

    12. And reboot one last time (sudo shutdown -r now)

    This works well! You are a hero.

×
×
  • Create New...