cancel
Showing results for 
Search instead for 
Did you mean: 

lvreduce problem

Donny Jekels
Respected Contributor

lvreduce problem

--- Logical volumes ---
LV Name /dev/vg01/lvol1b
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 25704
Current LE 3213
Allocated PE 3213
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t10d2 46 46
/dev/dsk/c10t8d1 1078 1078
/dev/dsk/c10t8d2 1078 1078
/dev/dsk/c10t8d3 923 923
/dev/dsk/c10t8d7 88 88


how do I remove this disk, from the lvol?
/dev/dsk/c4t10d2. maybe my steps are #$%^&**
"Vision, is the art of seeing the invisible"
5 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: lvreduce problem

Hi:

If you truly want to "reclaim" the physical volume 'c4t10d2' from the volume group, then use 'pvmove' to move the physical extents allocated to that physical volume to another physical volume. If successful, you will be able to 'vgreduce' the physical volume out of the volume group. See the man pages for 'pvmove' for more information. BTW, do not interrupt or otherwise kill the 'pvmove'. It can leave things in an unusable state.

Regards!

...JRF...
Tim Adamson_1
Honored Contributor

Re: lvreduce problem

Hi Donny,

The lvol1b shows that this lvol has been split from a mirror.

You should be able to simly lvreduce it out

lvreduce /dev/vg01/lvol1b

It will ask it you really want to or some similar question so proceed with the removal.


Cheers!
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Brian Crabtree
Honored Contributor

Re: lvreduce problem

Two things. One, have you thought about backing up the volume group, recreating it, and restoring it? Might be easier.

Two, I apologize if this is obvious, but you will want to make sure you get a good backup of whatever is on this filesystem before you attempt to do the above commands.

Thanks,

Brian
Kevin O'Donovan
Regular Advisor

Re: lvreduce problem

Hi,

not sure if you understand the setup of lvm from your question, sorry if I've interpretted it wrongly, but hopefully this might be of help:

* each disk is associated with a single volume group, a volume group can have many disks
* each logical volume is associated with a single volume group, a volume group can have many logical volumes

disk1 disk2 ... diskn
\ | /
volume group1
/ | lvol1 lvol2 ... lvoln

From your output you can see what physical disk the data in your logical volume is in but when you're dealing with a logical volume you go to the volume group rather than disks.

Dunno why you want the stuff off that disk, guessing you want to either remove the disk or move the disk to another volume group? If so James suggestion would be the way forward methinks, pvmove the stuff off the disk and then vgreduce it out of the volume group.

Can't think of another reason to move stuff off a particular disk offhand, the logical volume can generally be 'striped' across physical volumes to increase performance.

Maybe you know all that already, but if not hopefully its some bit helpful!

Kevin.
Marco Santerre
Honored Contributor

Re: lvreduce problem

As it is already stated here, you're two options are either :

1) use pvmove to move the extents that you have on /dev/dsk/c4t10d2 to another disk already in that VG
(eg. pvmove -n /dev/vg01/lvol1b /dev/dsk/c4t10d2 /dev/dsk/c10t8d7)

2) take a backup of the LV itself, remove completely, and rebuild it then restore it.

I,for one, like to use the pvmove options. I like it cause it doesn't impact your users and it moves your data where you want it.
Cooperation is doing with a smile what you have to do anyhow.