How to manage LVM with Visual LVM, from 0 to ∞ (22) - Resize LV
Section 4 : The Logical Volume operations
Author : weLees
Contents and compilations published on this website by the providers are subject to international copyright laws. Reproduction, editing, distribution as well as the use of any kind outside the scope of the copyright law require written permission of the author or weLees.
Section 4.4 Change Logical Volume settings
Section 4.4.1 Resize Volume
Resizing Logical Volume is the most common operation of Logical Volume modifying.
It is very easy for resizing Logical Volume without care the detail, especialy shrinking. You just need write the new size with resize command :
lvresize /volgroup/lv xxxx(new size)
But it is not easy very much with extending or detail setting, such as specify the host Physical Volume or host section. You need to check all the components you focus on to get the information and convert to affirm the unit, and calculating, and writing the endlessly command to implement it.
a sample of enlarge a RAID5 logical volume:
lvcreate -L3271557120B -n R5 USAF --type raid5 -i2 -I64K -R64K -C n -Z n /dev/sdb6:93-208 /dev/sdb6:891-1167 /dev/sdc1:93-484 /dev/sdd1:306-350 /dev/sdd1:2910-3068 /dev/sdd1:3386-3574
But, the resizing operation is easy with Visual LVM:
To shrink volume, you can type the new size in Volume Size box or drag the resize bar.
Caution : YOU CANNOT RESIZE SECTION WHICH IS NOT THE LAST ONE. WHEN ONE SECTION WAS TOTALLY SHRINKED, THE RESIZE BAR WILL SHOW ON BOTH THE TAIL OF PREVOUS SECTION AND THE HEADER OF CURRENT SECTION. YOU CAN EXTEND SIZE IN SECTION OR SHRINK MORE IN PREVIOUS SECTION.
To extend volume, there are follow cases:
1. The simple/spanning volume.
Selecting one or multiple Physical Volumes with spare space and drag resize bar/input new size to change.
When Physical Volume was selected, it will be shown in PV list box, you can change the order, the rule of dragging operation likes creating Logical Volume.
Resize Simple type volume
2. The complex type (except Stripe/RAID 0).
The rule is the same as simple/spanning, except that you must select the same number of Physical Volumes as the existing Physical Volumes in the Logical Volume, or you cannot change the size. And when you resize the logical volume size by dragging one resize bar, the bars on other physical volumes changing synchronously.
Resize RAID1 type volume
3. The stripe/RAID 0 type.
The stripe/RAID 0 type is the same as the other complex types, except that the number of Physical Volumes for extending MAY NOT EQUAL with the number of existing in the Logical Volume. So it is possible that there are 3 sections in existing volume and 5 sections in extending part.
Resize Stripe/RAID0 type volume
The size of volume will be calculated by volume format when dragging.
Here we finished the operations guide of Visual LVM, wish it makes your work easier & efficient!
To be continue >>
weLees we are storage expert who specialize in storage systems, provide better user experience for users, reduce your investment in non-core targets, and increase your work efficiency.