Sixth step: Adjust the size of the file system online
[Email protected] users]# lvextend-l 32M/DEV/MYVG/MYLV1 = = "This is physical expansion Extending logical Volume MYLV1 to 32.00 MB Logical Volume MYLV1 successfully resized
[[email protected] users]# LVS LV VG Attr lsize Origin snap% Move Log copy% MYLV1 Myvg-wi-ao 32.00M [[email protected] users]# resize2fs-p/DEV/MYVG/MYLV1 = = "This is the logical expansion RESIZE2FS 1.39 (29-may-2006) Filesystem at/dev/myvg/mylv1 is mounted on/users; On-line resizing required Performing an on-line resize of/dev/myvg/mylv1 to 32768 (1k) blocks. The filesystem on/dev/myvg/mylv1 is now 32768 blocks long.
[Email protected] users]# DF-LH Filesystem Size used Avail use% mounted on /dev/sda2 3.8G 3.3G 384M 90%/ /dev/sda3 14G 1.1G 12G 9%/Home /DEV/SDA1 46M 11M 34M 24%/boot Tmpfs 252M 0 252M 0%/dev/shm /dev/mapper/myvg-mylv1 32M 1.1M 30M 4%/users
[Email protected] users]# Cat/users/inittab # # Inittab This file describes how the INIT process should set up # The system in a certain run-level. # # Author:miquel van Smoorenburg, <[email protected]>
Through the logical architecture diagram of LVM, it needs to be clear that if the file system is to be scaled up, it should be divided into 2 steps, first physical capacity expansion, then logical expansion. The so-called physical expansion, from the physical point of view, the LV expansion, of course, the size of LV itself received the limitations of the VG, the so-called logical expansion, by the logical boundary of the file system is re-determined, is dependent on the physical boundary. |