LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-02-2014, 07:37 AM   #1
dan.pipe2014
LQ Newbie
 
Registered: Dec 2014
Posts: 3

Rep: Reputation: Disabled
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)
 
Old 06-14-2017, 07:29 AM   #2
spardac
LQ Newbie
 
Registered: Jun 2017
Posts: 1

Rep: Reputation: Disabled
Did you get an answer for this?

Did you get an answer for this?
 
Old 06-14-2017, 09:49 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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'

Last edited by BW-userx; 06-14-2017 at 10:01 AM.
 
Old 06-14-2017, 12:48 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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.

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.

Last edited by sundialsvcs; 06-14-2017 at 12:58 PM.
 
Old 06-14-2017, 06:06 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by sundialsvcs View Post
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).
 
Old 06-14-2017, 09:45 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Quote:
Originally Posted by rknichols View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help to Extend a Logical Volume on Centos 6.2 baldur2630 Linux - Server 2 03-28-2012 05:05 AM
[SOLVED] Adding disk space to root logical volume with pvresize and lvextend bortbortresson Linux - Software 13 12-27-2009 11:59 PM
Help - can't extend logical volume ? Vilius AIX 5 05-31-2008 05:49 PM
logical volume question binary_0011 Other *NIX 3 01-11-2007 08:43 AM
Logical volume management question smoker Linux - Software 2 08-17-2005 12:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration