adding space to /share volume on Puma

Print Friendly, PDF & Email

To avoid network bandwidth issues when all our CentOS workstations are updated, we keep a copy of the CentOS repos on Puma in /share.

I recently updated the scripts that synchronize the copies repo from CentOS mirrors, choosing one of the “rsync” repos from this list:  http://www.centos.org/modules/tinycontent/index.php?id=30 However, the rsync ran out of space in /share, before it even got to downloading the CentOS 6.4 packages.  So, I wanted to double the space to 80GB.  All the space on Puma is allocated, but /home isn’t being used, so I wanted to reduce it and xfer the space to /share:

[root@puma ~] lvreduce --size -40G --resizefs /dev/vg0/lvhome
fsck 1.39 (29-May-2006)
/dev/mapper/vg0/vg0-lvhome: /lost+found not found.  CREATED.
/dev/mapper/vg0/vg0-lvhome:  11/35225600 files (9.1% non-contiguous), 1128681/70443008 blocks
 Command failed with status code 5.

Darn.  Searching for that error code yielded not much, but some hints that the PV (physical volume) is corrupted, so that’s bad.  Hopefully, it’s something else.

So, I just removed the lvhome partition and grew the lvstud partition (the former students partition, which we are now using for /share):

[root@puma ~] lvremove -v /dev/vg0/lvhome
Using logical volume(s) on command line
Do you really want to remove active logical volume lvhome? [y/n]: y
    Archiving volume group "vg0" metadata (seqno 45).
    Found volume group "vg0"
    Removing vg0-lvhome (253:1)
    Releasing logical volume "lvhome"
    Creating volume group backup "/etc/lvm/backup/vg0" (seqno 46)
  Logical volume "lvhome" successfully removed
[root@puma ~] lvextend -v --size=+40G --resizefs /dev/vg0/lvstud 
    Finding volume group vg0
    Executing: fsadm --verbose check /dev/vg0/lvstud 
fsadm: "ext3" filesystem found on "/dev/mapper/vg0-lvstud"
fsadm: Skipping filesystem check for device "/dev/mapper/vg0-lvstud" as the filesystem is mounted on /share
    fsadm failed: 3
    Archiving volume group "vg0" metadata (seqno 46).
  Extending logical volume lvstud to 77.50 GB
    Found volume group "vg0"
    Found volume group "vg0"
    Loading vg0-lvstud table (253:5)
    Suspending vg0-lvstud (253:5) with device flush
    Found volume group "vg0"
    Resuming vg0-lvstud (253:5)
    Creating volume group backup "/etc/lvm/backup/vg0" (seqno 47).
  Logical volume lvstud successfully resized
    Executing: fsadm --verbose resize /dev/vg0/lvstud 81264640K 
fsadm: "ext3" filesystem found on "/dev/mapper/vg0-lvstud"
fsadm: Device "/dev/mapper/vg0-lvstud" size is 83214991360 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/vg0-lvstud"
fsadm: Resizing filesystem on device "/dev/mapper/vg0-lvstud" to 83214991360 bytes (9830400 -> 20316160 blocks of 4096 bytes)
fsadm: Executing resize2fs /dev/mapper/vg0-lvstud 20316160
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/vg0-lvstud is mounted on /share; on-line resizing required
Performing an on-line resize of /dev/mapper/vg0-lvstud to 20316160 (4k) blocks.
The filesystem on /dev/mapper/vg0-lvstud is now 20316160 blocks long.
[root@puma ~] df -H | grep share
/dev/mapper/vg0-lvstud     82G  40G   42G  49% /share

Good enough!

About CS SysAdmins

The CS Department System Administrators
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *