Thursday, November 11, 2010

Extending a logical volume (LVM)

[seahumad@sahumada opt]$ sudo lvextend -L30G /dev/mapper/vg_sahumada-lv_opt
[sudo] password for seahumad:
Extending logical volume lv_opt to 30.00 GiB
Logical volume lv_opt successfully resized

[seahumad@sahumada opt]$ sudo umount /opt/

[seahumad@sahumada ~]$ sudo resize2fs /dev/mapper/vg_sahumada-lv_opt
resize2fs 1.41.10 (10-Feb-2009)
Please run 'e2fsck -f /dev/mapper/vg_sahumada-lv_opt' first.

[seahumad@sahumada ~]$ sudo e2fsck -f /dev/mapper/vg_sahumada-lv_opt
e2fsck 1.41.10 (10-Feb-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/vg_sahumada-lv_opt: 1900/1310720 files (0.1% non-contiguous), 4645039/5242880 blocks

[seahumad@sahumada ~]$ sudo resize2fs /dev/mapper/vg_sahumada-lv_opt
resize2fs 1.41.10 (10-Feb-2009)
Resizing the filesystem on /dev/mapper/vg_sahumada-lv_opt to 7864320 (4k) blocks.
The filesystem on /dev/mapper/vg_sahumada-lv_opt is now 7864320 blocks long.

[seahumad@sahumada ~]$ sudo mount /opt

No comments: