You are not logged in.

#1 2009-03-25 06:40:16

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

need help with LVM again

so i had set up an LVM a couple weeks ago to toy around with, and store some data until i had sorted through it. right now, theres two 320gb drives, and a 200gb, theres about 250gb of data, which im hoping is all on the 2 320gb drives.....because when i try pvmove on teh 200gb, it says theres no extents to move or something

anyway, im trying to remove the 200gb drive from the LVM, since i need it in another box. been looking at the wiki, and the howto page linked on teh wiki. and somethings not working for me. could someone help me out here, step by step, maybe explain the commands a little more in depth if possible

right now im trying this

vgreduce home /dev/hdg/

and basically, it just tells me its still in use....i unmounted the lvm, so i dont get how its still in use. but what i understand there, is vgreduce, shrinks it, obviously, home, the name of my lvm volume? and /dev/hdg, is the disk i want to remove from the LVM group....what am i doing wrong here?


this is a signature

Offline

#2 2009-03-25 11:19:33

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: need help with LVM again

Have you reduced the Logical Volume before trying to reduce the Volume Group?

EDIT: and don't forget to reduce the File System before the LV wink

Remeber the stack looks like this:
   - File System
   - Logical Volume
   - Volume Group
   - Physical Volume
   - Device

When growing, you need to work from the bottom up.
When reducing, you need to work from the top down.

Last edited by fukawi2 (2009-03-25 11:21:03)

Offline

#3 2009-03-25 16:29:12

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: need help with LVM again

i reduced the filesystem to 400gb.

but then when i try vgreduce, it says its still in use, like i posted above

but i guess thats skipping a step, because that would reduce the volume group, so what am i missing in the steps that shrinks the logical volume?

Last edited by ssl6 (2009-03-25 16:31:45)


this is a signature

Offline

#4 2009-03-25 16:42:43

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: need help with LVM again

nvm, i figured it out, i think i got it. i did lvreduce to 405gb, then vgreduce, then pvremove, i hope i didn't lost anything


this is a signature

Offline

#5 2009-03-25 23:26:24

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: need help with LVM again

That should be right

   - File System (resize2fs or equivalent for your fs)
   - Logical Volume  (lvreduce)
   - Volume Group  (vgreduce)
   - Physical Volume  (pvremove)
   - Device  (unplug cable tongue)

Offline

Board footer

Powered by FluxBB