Linux - NewbieThis 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.
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.
My Linux OS is mounted on a LVM spread across an 8GB SD Card and a 4GB Flash Drive. I've used about 6GB and have about 2.xGB left. I'm trying to download Sabayon and I don't quite have enough space to store DVD size iso. I have extra 2GB Flash Drive that I am not using and can converted to a PV and that would give me the nesscary space I need to store the ISO. Now the ISO would spread from 4GB Flash to my 2GB Flash. My question is complicated, so bare with me. I want to know by adding 2GB PV into LogGroup and then remove it from the same LogGroup and then added back later. Would the data still exists and accessible? What happenes to the data when I remove it the first time, would be automatically deleted, or stay hidden to plug back in?
Thanks for anyone who could help me understand with this...
If you use pvremove to remove the PV from the volumegroup then any LVs (filesystems) with an allocation on that PV either in part or in full will be deleted during the pvremove processing.
If you mean just physically remove the flash drive while the volume group is offline, without running pvremove, then the volume group will fail to come online the next time you try and activate it as it won't work without all it's member PVs being available. However, once all its member PVs are available again you should be able to bring it online without any data loss (assuming you haven't done anything to it in the mean time).
If you mean physically remove the flash drive while the volume group is still online, then you're almost certainly looking at corruption and data-loss.
In short, I don't think what you're thinking of doing will work, though I'm not clear why you need to add it, remove it and then add it again.
I see, no matter what, the data will be lost by adding and removing it.. Someone told me that offline, I remove it, the system will continue to boot, but just complain that it is not there...
I hate having 2 flash drives sticking out of my notebook in fear that one would hit something and fail. So I was thinking if it was possible to temporally use it when I want to and keep aside when I don't want too, and keep the data intact using lvm. Simply using it as a flash drive won't work because it doesn't have enough room for the type of application I wanted to use it for. Combining with the rest of my drive was preferred way I wanted it to be..
I'm utter-ally broke otherwise I would have sprung for new HDD after mines failed...
I see, no matter what, the data will be lost by adding and removing it.. Someone told me that offline, I remove it, the system will continue to boot, but just complain that it is not there...
That's true as long as your root-filesystem isn't also on that same volume-group. In your example if you had put your rootfs on the 8G sd card, and the two flash drives as PVs in a separate volumegroup just for your data, then you could safely take them offline and unplug the two flash drives whenever you wanted. If all 3 are in the same volume group, then all 3 need to be available to boot the system.
You can force a volume group online that has missing PVs, but it's not advisable and should really only be done in a recovery situation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.