1833768 Members
1987 Online
110063 Solutions
New Discussion

vgreduce not working

 
boston
Occasional Contributor

vgreduce not working

Trying to break a mirror to replace a bad disk.
Ran-lvreduce –m 0 /dev/vg00/lvol#”1-11” /dev/dsk/c1t2d0

Once all of this was done I did my vgreduce /dev/vg00 /dev/dsk/c1t2d0,
This came back telling me that the disk was not cleared of items running from it.
Then I tried vgreduce –f /dev/vg00, this gave me the same message. Not sure how to get this server to let go of this drive?
7 REPLIES 7
Mel Burslan
Honored Contributor

Re: vgreduce not working

what does pvdisplay /dev/dsk/c1t2d0 say ?

also, it is not a good way of doing this but assuming you are using a fairly recent hardware, i.e., L/N class or newer machines, you can yank out the drive while the system is running, without performing the vgreduce, put the replacement hardware in and rebuild it.

pvcreate -f /dev/rdsk/c1t2d0
vgcfgrestore -n vg00 /dev/rdsk/c1t2d0
vgchange -a y vg 00

then resynchronize your logical volumes.

Hope this helps
________________________________
UNIX because I majored in cryptology...
boston
Occasional Contributor

Re: vgreduce not working

When I run the vgreduce command, I get back

(physical etents are still in use)
UVK
Trusted Contributor

Re: vgreduce not working

If you are trying to replace a bad disk, I dont see a need to do a vgreduce, Just pull out the disk from the server and replace it with a new on. You can creat a new mirror form there. using pvcreate and restore the VG config if you have a backup using vgcfsrestore. If no proceed with the root mirror creation procedure as below

http://www.hpux.ws/?p=21
-------------------------------------------
Like it or worked !! Click kudos !!
boston
Occasional Contributor

Re: vgreduce not working

I was under the impression you had to break the mirror before you replaced a disk?
Tim Nelson
Honored Contributor

Re: vgreduce not working

Beware that all the extents on the bad disk need to be marked as stale.

Read this for the best solutions.

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad_WP.pdf
Bijeesh
Respected Contributor

Re: vgreduce not working

hi
you already break the mirror by doing
>>>lvreduce â m 0 /dev/vg00/lvol#â 1-11â /dev/dsk/c1t2d0
post the output of #pvdisplay /dev/dsk/c1t2d0

Jeff Gyurko
Frequent Advisor

Re: vgreduce not working

You don't have to break the mirror to replace the disk. You could just yank it if the hardware supports this.

I wouldn't do that though. It's evident that the system still thinks it has extents in use on that device. I would try to figure out what's using them. vgdisplay -v will yield information about the number of extents on the device and the number of free extents on that device. If those numbers are not the same, you do in fact have them in use somewhere.

lvdisplay -v those logical volumes and find out which LV has the extents in use. Take appropriate action after that. If you're certain you removed the mirrors and then just yank the device and you were mistaken, you could corrupt or crash your server because you've now taken out the primary copy of an LV with no mirror.

Since you're this far into it, I would retrace my steps to insure everything is oK if you pull the disk.