X

Linux Mount Point Extension

Suppose if you want to extend the filesystem by another 400mb then follow below steps:

1. Extend the LV first using below command.

[root@mann ~]# lvextend -L +400 /dev/myvg/lvol0

Extending logical volume lvol0 to 600.00 MiB

Logical volume lvol0 successfully resized

2. Now resize the lv using resize2fs command.

[root@mann ~]# resize2fs /dev/myvg/lvol0

resize2fs 1.41.12 (17-May-2010)

Filesystem at /dev/myvg/lvol0 is mounted on /test; on-line resizing required

old desc_blocks = 1, new_desc_blocks = 3

Performing an on-line resize of /dev/myvg/lvol0 to 614400 (1k) blocks.

The filesystem on /dev/myvg/lvol0 is now 614400 blocks long.

3.Now check whether the mountpoint extended or not using df -h

[root@mann ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda2              16G  2.0G   13G  14% /

tmpfs                1012M     0 1012M   0% /dev/shm

/dev/sda1             291M   29M  248M  11% /boot

/dev/mapper/myvg-lvol0

                      582M  6.3M  575M   2% /test

———————————————————————————

The Above output states that mountpoint is now extended by 400MB.

To Know all the topics related to LINUX please click below link.

Linux Topics.