How to use LVM (lvextend, lvdisplay, fsadm)

Configurare noua (How To)

Situatie

You have already a LVM created and you need to increase the size of a file system mounted from a logical volume.

Solutie

Pasi de urmat

Extend the size of a logical volume

  • lvextend
[root@OL4SAP001 dev]# lvextend -L+5000 /dev/vgoracleO19/lvoracleO19
Size of logical volume vgoracleO19/lvoracleO19 changed from <12.70 GiB (3250 extents) to <17.58 GiB (4500 extents).
Logical volume vgoracleO19/lvoracleO19 successfully resized.

Resize the filesystem

  • fsadm
[root@OL4SAP001 O19]# fsadm -l resize /dev/vgoracleO19/lvoracleO19 15G
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/mapper/vgoracleO19-lvoracleO19 is mounted on /oracle/O19; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/mapper/vgoracleO19-lvoracleO19 to 3932160 (4k) blocks.
The filesystem on /dev/mapper/vgoracleO19-lvoracleO19 is now 3932160 blocks long.

Size of logical volume vgoracleO19/lvoracleO19 changed from <17.58 GiB (4500 extents) to 15.00 GiB (3840 extents).
Logical volume vgoracleO19/lvoracleO19 successfully resized.
[root@OL4SAP001 O19]#

Tip solutie

Permanent

Voteaza

(5 din 27 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?