[linux-lvm] Find Correct LE Size of ext4 Partition (16TB)
pattonme at yahoo.com
Tue Oct 8 22:58:55 UTC 2013
>> So I set the partition to 16TB. Now I'm wasting space on the LV
>> which I would like to again be reduced to the minimum size of the
>> partition (16TB).
>> Has anyone an idea to exactly calculate the amount of logical extends
>> (LE) needed for holding the 16TB partition?
The whole point of using LVM is to dispense with the malarky of hard disk partitions so I don't know why you're resizing them. If I read your email correctly you're going about this dangerously.
1) resize2fs down to say 15.8TB.
2) lvresize to 16TB
3) resize2fs (no args) <LV device>
Step 3 will resize the FS to as close as the LV size allows and won't let you write past the LV's endpoint like your method makes so easy to screw up when doing the extent calculation. Maybe your maths are always perfect but I wouldn't risk my data for a measly few bytes. Do it the fool-proof way.
More information about the linux-lvm