LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Question about Logical Volume Extend (lvextend) (https://www.linuxquestions.org/questions/linux-general-1/question-about-logical-volume-extend-lvextend-4175527082/)

dan.pipe2014 12-02-2014 07:37 AM

Question about Logical Volume Extend (lvextend)
 
Hi,
Below is a sample question for Linux exam with solution. I'm unable to understand the red part, can someone explain please? Also, the term 'floating range' ... I am not familiar with it..

Question:
Change the logical capacity named vo from 190M to 300M and the size of the floating range should set between 280 and 320. (This logical volume has been mounted in advance.)

Solution:
# vgdisplay

# lvdisplay (check lv)
# lvextend -L +110M /dev/vg2/lv2
# resize2fs /dev/vg2/lv2

mount -a

Decrease lvm:
# umount /media
# fsck -f /dev/vg2/lv2
# resize2fs -f /dev/vg2/lv2 100M
# lvreduce -L 100M /dev/vg2/lv2
# mount -a
# lvdisplay (verify)

spardac 06-14-2017 07:29 AM

Did you get an answer for this?
 
Did you get an answer for this?

BW-userx 06-14-2017 09:49 AM

and the size of the floating range should set between 280 and 320.

break it down like a Math problem to the lest denominator, or one word at a time.

Just from first glance, I'd use the key word 'floating' which indicates what? fluctuation.

The next key word I'd use is 'range' which indicates what? between two limits hi - low ..

then that would give you an idea of what ?
look up 'offsets'

sundialsvcs 06-14-2017 12:48 PM

So far as I know, only Red Hat's exams use the term, "floating range," in reference to LVM. I see no mention of it, for example, in the relevant man-pages.

In an obligatory Google search, I see only many-more questions like the one that you asked.

And, to be perfectly frank, I have no idea what Red Hat's examiners are talking about, and I find no clues in the "solution" offered in post #1. :eek:

The fundamental operations that must take place are to resize the file-system and to alter the amount of physical storage allocated to the logical volume. The only, but extremely important(!), "trick" is that, if resizing downwards, you must shrink the filesystem first so that it won't have put anything in an area of storage that's about to disappear forever. (But, then again, who-the-hell resizes downwards, anyway?) :)

What Red Hat means by "floating range," I have no cucking floo. ;)

rknichols 06-14-2017 06:06 PM

Quote:

Originally Posted by sundialsvcs (Post 5722715)
The only, but extremely important(!), "trick" is that, if resizing downwards, you must shrink the filesystem first so that it won't have put anything in an area of storage that's about to disappear forever.

For a long time now the lvresize, lvextend, and lvreduce have all supported the "--resizefs" option to do the fs resizing as part of the operation, saving you the bother of calculating the size and remembering which operation has to be done first. Why none of the instructional material mentions this option is a complete mystery to me (as is why there are 3 separate commands, even though lvresize can do both growing and shrinking).

syg00 06-14-2017 09:45 PM

Quote:

Originally Posted by rknichols (Post 5722804)
For a long time now the lvresize, lvextend, and lvreduce have all supported the "--resizefs" option to do the fs resizing as part of the operation

Depending on filesystem type. Doesn't always work as advertised.


All times are GMT -5. The time now is 09:50 PM.