Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-16-2017, 11:28 PM
|
#1
|
Member
Registered: Jan 2017
Location: karachi,Pakistan
Distribution: Centos,Ubuntu
Posts: 34
Rep: 
|
doubtful about lvm
hi ,
i have a question in my mind about lvm ,as i am new to linux i want you guys to help me out in this..so let me explain
suppose i have created lvm on my hard disk which is of 80gb . i have some data of about 40 gb inside that lv and now i want to reduce that lv from 80 to 60 gb .now the question is, where will my data go ? i mean will it remain in that 60 gb part or it will be divided which i guess should not happen .or the data will be lost ?
thanks in advance ,
Haseem saeed.
|
|
|
01-17-2017, 04:41 AM
|
#2
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
Look at: lvresize -r (--resizefs) in man page
Basically, this is often done; if done right, no loss; if done wrong, disaster!
Shrinking the device without first shrinking the filesystem will destroy the filesystem.
Here's a LQ Thread that might be relevant, found from a web-search of:
lvreduce|lvresize tutorial move data
Welcome to LQ! Let us know what you will try or further questions after reading for a while.
p.s. post relevant info, like: pvs;vgs;lvs;lsblk -fp ... etc
Last edited by Jjanel; 01-17-2017 at 05:17 AM.
|
|
|
01-17-2017, 06:06 AM
|
#3
|
Member
Registered: Jan 2017
Location: karachi,Pakistan
Distribution: Centos,Ubuntu
Posts: 34
Original Poster
Rep: 
|
"thank you so much"
Quote:
Originally Posted by Jjanel
Look at: lvresize -r (--resizefs) in man page
Basically, this is often done; if done right, no loss; if done wrong, disaster!
Shrinking the device without first shrinking the filesystem will destroy the filesystem.
"thank you so much"
it is indeed very informative . but the thing is, i am actually finding something for my own logic. i mean i know for shrinking or for reducing a logical volume you first have to unmount it and then the resizing thing .but what i have asked for is that what will happen with the data i mean on which side it will go .i mean i need the concept and definitely the explanation for it ..
thank you again
Here's a LQ Thread that might be relevant, found from a web-search of:
lvreduce|lvresize tutorial move data
Welcome to LQ! Let us know what you will try or further questions after reading for a while.
p.s. post relevant info, like: pvs;vgs;lvs;lsblk -fp ... etc
|
"thank you so much"
it is indeed very informative . but the thing is, i am actually finding something for my own logic. i mean i know for shrinking or for reducing a logical volume you first have to unmount it and then the resizing thing .but what i have asked for is that what will happen with the data i mean on which side it will go .i mean i need the concept and definitely the explanation for it ..
thank you again
|
|
|
01-18-2017, 08:50 AM
|
#4
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,201
|
When you resize the volume, one option that's available will (first) resize the file system, thus protecting your data. (Any data that is located in areas of the volume that are about to disappear will be moved out of harm's way.)
In my opinion, you always want to use LVM, and you'll see why the moment that your hard drive fills up.
Without LVM, that's a very messy situation to get out of. With LVM it is easy: just add another physical volume, map it to the appropriate logical pool, and resize the filesystem upward. Done. (And you don't even have to reboot the system.)
LVM separates the logical notion of a "mount point" from the physical resource(s) that correspond to it, allowing the data to be distributed among many physical volumes in various useful ways.
Don't be "doubtful" about this important feature. Use it! 
Last edited by sundialsvcs; 01-18-2017 at 08:52 AM.
|
|
1 members found this post helpful.
|
01-18-2017, 10:51 PM
|
#5
|
Member
Registered: Jan 2017
Location: karachi,Pakistan
Distribution: Centos,Ubuntu
Posts: 34
Original Poster
Rep: 
|
Quote:
Originally Posted by sundialsvcs
When you resize the volume, one option that's available will (first) resize the file system, thus protecting your data. (Any data that is located in areas of the volume that are about to disappear will be moved out of harm's way.)
In my opinion, you always want to use LVM, and you'll see why the moment that your hard drive fills up.
Without LVM, that's a very messy situation to get out of. With LVM it is easy: just add another physical volume, map it to the appropriate logical pool, and resize the filesystem upward. Done. (And you don't even have to reboot the system.)
LVM separates the logical notion of a "mount point" from the physical resource(s) that correspond to it, allowing the data to be distributed among many physical volumes in various useful ways.
Don't be "doubtful" about this important feature. Use it! 
|
thanks .definitely i will :-)
|
|
|
01-18-2017, 11:25 PM
|
#6
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
Hi again. I hope you have the info you wanted.
>what will happen with the data[?] on which side it will go[?]
It will be moved to the filesystem ['side']. Like Windows <<<<link
I find info like this <<<<link from a web-search of: lvresize move data
By "doubt", I believe you mean "question" (not disbelieve).
Best wishes! Your questions are welcome; feel free to ask!
p.s. IF resolved, please use ThreadTools, at top, to mark '[SOLVED]'.
Last edited by Jjanel; 01-18-2017 at 11:33 PM.
|
|
|
All times are GMT -5. The time now is 06:56 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|