[Linux-cluster] Expanding a LUN and a GFS2 filesystem

Bob Peterson rpeterso at redhat.com
Tue Jan 24 22:30:41 UTC 2012


----- Original Message -----
| I have not extended the volume.  That was precisely my question.  I
| already understand how to grow the GFS2 filesystem (conceptually).
|  As
| per https://alteeve.com/w/Grow_a_GFS2_Partition.
| 
| I've tried to increase the size of the volume with lvextend, but it's
| not having it.
| 
|     [root at test03]# lvextend -L +2T /dev/sdb
|       Path required for Logical Volume "sdb"
|       Please provide a volume group name
|       Run `lvextend --help' for more information.
|     [root at test03]# lvextend -L +2T  /dev/mapper/gdcache_vg-gdcache_lv
|     /dev/sdb
|       Extending logical volume gdcache_lv to 4.00 TB
|       Insufficient free space: 524288 extents needed, but only 3
|       available
|     [root at test03]# lvextend -L +2000G
|      /dev/mapper/gdcache_vg-gdcache_lv /dev/sdb
|       Extending logical volume gdcache_lv to 3.95 TB
|       Insufficient free space: 512000 extents needed, but only 3
|       available
|     [root at test03]# lvextend -L +1999G
|      /dev/mapper/gdcache_vg-gdcache_lv /dev/sdb
|       Extending logical volume gdcache_lv to 3.95 TB
|       Insufficient free space: 511744 extents needed, but only 3
|       available
| 
| I assume I need to expand the underlying PV or VG.  But how?
| 
| Wes

In order to make the volume bigger, you need to lvresize or lvextend it.
In order to do that, you need to make the volume group bigger. If your
volume group has no more space, you can add storage devices to it with
a command like this:

vgextend gdcache_vg /dev/sdt /dev/sdu /dev/sdv

(assuming you want to add those devices to the vg)

Once you've done that, you can extend the lv with lvresize or lvextend.

So something like:

vgextend gdcache_vg /dev/sdt /dev/sdu /dev/sdv
lvresize -L+1T /dev/gdcache_vg/gdcache_lv
mount -t gfs2 /dev/gdcache_vg/gdcache_lv /mnt/gfs2
gfs2_grow /mnt/gfs2

Regards,

Bob Peterson
Red Hat File Systems




More information about the Linux-cluster mailing list