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

Wes Modes wmodes at ucsc.edu
Tue Jan 24 22:19:58 UTC 2012


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



On 1/24/2012 1:24 PM, Bob Peterson wrote:
> ----- Original Message -----
> | I am running CentOS with a GFS2 filesystem on a Dell EqualLogic SAN.
> |  I
> | created the filesystem by mapping an RDM through VMWare to the guest
> | OS.  I used pvcreate, vgcreate, lvcreate, and mkfs.gfs2 to create the
> | filesystem and the underlying architecture.  I've included the log I
> | created to document the process below.
> | 
> | I've already increased the size of the LUN on the SAN.  Now, how do I
> | increase the size of the GFS2 filesystem and the LVM beneath it?  Do
> | I
> | need to do something with the PV and VG as well?
> | 
> | Thanks in advance for your help.
> | 
> | Wes
>
> Hi Wes,
>
> Yep, you do need to start cman service before clvmd.
>
> If you've already extended the volume with lvresize or lvextend,
> then the procedure to expand the GFS2 file system to use that
> extra space is simple:
>
> 1. mount it on both nodes
> 2. gfs2_grow /mnt/point (your mount point)
>
> If it was my file system, I'd umount it at that point and do sync
> just to be on the safe side. Some older versions of the software
> didn't always sync the statfs information correctly, etc.
> It shouldn't be necessary, but it doesn't hurt to do it, right?
> Then mount it again.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20120124/19b1be6a/attachment.htm>


More information about the Linux-cluster mailing list