LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Using LVM and adding a drive (https://www.linuxquestions.org/questions/fedora-35/using-lvm-and-adding-a-drive-487803/)

reeseslover531 09-28-2006 04:40 PM

Using LVM and adding a drive
 
ok so this is my setup. I am running FC5 on my server here. Everything is currently on seperate drives, meaning there is no LVM setup besides the default that FC5 does on install which is wrap the boot drive into a lvm. My first question is; is there any way to shrink my "/" drive through lvm? Now my second question is based on the fact that I have a 115 gig drive wtih stuff on it. It has only 1.5 gigs left on it. I found a 80 gig drive laying around and it works. I put that in. Now, what I want to do is create a LVM setup so that I can have the 115gig drive and the new 80 gig drive turn into what looks like just one drive. I don't have the space to move the 115gigs of stuff from that drive so I would like to not reformat it and erase everything. Is there any way to do this, and how? I would love to do this graphically, but I am comfortable in the shell.

Thanks you very much,
Joe

Brian1 09-28-2006 05:03 PM

I know of no way to do this if you have no room to store the 115 gig too. Here is an idea but not the nicest way. Goto a local staples or circuit city or other and get one of those 200gb USB drives. Move data to it and when all is done remove the data and set it back to the way it was. Then return it to the store for refund.

Brian1

reeseslover531 09-30-2006 08:59 AM

are you sure there is no way to do this? I can try and do this, but how would I go about doing the LVM between the 115 and the 80? Are there any good articles around?

Brian1 09-30-2006 11:03 AM

Ok you can try it this way. The way I see it you will end up creating 3 LVM partitions instead of two with 2 blank drives when done. Take the 80 and blow all partitions and create an LVM on it. Create the logical volume inside the LVM. Copy as much data from the 115 gig to the new logical volume on the 80 gig LVM drive. Now unmount the 115 gig partition and using the tool parted or the gui gkparted. Now shrink the 115 gig partition down to say 10 gig larger than the space the files are taking up. That would be 115-80=35+10=45gig. Now with the 115 gig partition shrunk down to 45 gig. Create a new LVM on the 115 gig drive with the remaining space. Add a new logical volume and attach it to the logical volume on the 80 gig. Now you would have an 80+70=150 gig logical partition. Mount the 45 gig partition on the 115 gig drive and copy the rest of the data over. Now unmount the 45gig partition and delete it. Create the rest of this space as a 3rd LVM paritition and add to the logical volume. Now you have a total of 80+70+45= 195 gig total. Now edit /etc/fstab to reflect the correct partiton setup to mount at boot.

Brian1


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