1828402 Members
3588 Online
109977 Solutions
New Discussion

clean disk mirror.

 
SOLVED
Go to solution
Eberno
Regular Advisor

clean disk mirror.

My friends,

I have one big problem.
I have one disk, that don´t are reduce the lvol.
Was three lvols.
I did lvreduce , pvcreate -f, but not do.

--- Physical volumes ---
PV Name /dev/dsk/c3t15d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 3
PE Size (Mbytes) 16
Total PE 4374
Free PE 3524
Allocated PE 850
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol5 12 12
/dev/vg00/lvol11 13 13
/dev/vg00/lvol98 825 825

Please I need help.
17 REPLIES 17
Torsten.
Acclaimed Contributor

Re: clean disk mirror.

What is the LVOL you want to remove?

Check if it is mounted, umount it and lvremove, e.g.

lvremove /dev/vg00/lvol98

Be carefull, pvcreate -f will destroy all data on the disk!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Marvin Strong
Honored Contributor

Re: clean disk mirror.


Not really sure what you want to do.

to break the mirrors

lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c3t5d0

you need to do that for each logical volume.
By telling it what disk you know which disk it will remove the mirror from.

Then if you want to pvcreate the disk

vgreduce vg00 /dev/dsk/c3t5d0

pvcreate /dev/rdsk/c3t5d0

then you can use that disk in another volume group.

I would suggest you do a vgdisplay and see if you reduced the lvols off the other physical disk.
Robert-Jan Goossens
Honored Contributor

Re: clean disk mirror.

Hi Eberno,

I'm not sure what you would like to do.

would you like to remove all three logical volumes from this disk?
/dev/vg00/lvol5
/dev/vg00/lvol11
/dev/vg00/lvol98

Robert-Jan
Eberno
Regular Advisor

Re: clean disk mirror.

My friend,

I need umount, my lvol?
The lvol are in disk mirror, and I want clean.
look this pvdisplay of the disk mirror.

Torsten.
Acclaimed Contributor

Re: clean disk mirror.

I guess I know now what you want.

You want to free the disk /dev/dsk/c3t15d0, right?

So assuming the LVOLs 5, 11, and 98 are mirrored, you need to break the mirror first.

e.g.

lvreduce -m 0 /dev/vg00/lvol5 /dev/rdsk/c3t15d0

After this, check pvdisplay again. You should see now an empty disk.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Marvin Strong
Honored Contributor

Re: clean disk mirror.

If those logical volumes are mirrors you can just remove the mirror see my above post.

If they are not mirrors, then you will need to either do pvmove and move them to the other disk. Or umount them and do an lvremove.

Eberno
Regular Advisor

Re: clean disk mirror.

My friends
I need to clean the record that this with some lvols, that they had been taken off the espelhamento. Ja I made the commands lvreduce, vgreduce and finally pvcreate - f to clean the record and not yet I obtained clean it.
Eberno
Regular Advisor

Re: clean disk mirror.

I took off the mirror of lvols and exactly thus still they remain in the record.
Torsten.
Acclaimed Contributor

Re: clean disk mirror.

"remain in the record"

What remains where?

If possible, describe the problem again and post some more information, like vgdisplay, lvdisplay and so on.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Robert-Jan Goossens
Honored Contributor

Re: clean disk mirror.

sometime even a pvcreate -f will not destroy all lvm information on the disk. What you can do is to dd a large file or some empty space to the first part of the disk.

# dd if=/dev/null of=/dev/rdsk/c3t15d0 bs=1024k count=10
# pvcreate -f /dev/....

Robert-Jan
Eberno
Regular Advisor

Re: clean disk mirror.

My friends,

In file, the pvdisplay, lvdisplay and vgdisplay.
Torsten.
Acclaimed Contributor
Solution

Re: clean disk mirror.

Look, your LVOLs are not mirrored (at least now) but spanning across different disks:

--- Logical volumes ---
LV Name /dev/vg00/lvol98
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 15008
Current LE 938
Allocated PE 938
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/c1t15d0 113 113
/dev/dsk/c3t15d0 825 825


Do you want to delete the LVOLs completly?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eberno
Regular Advisor

Re: clean disk mirror.

Thanks my friend.
Marvin Strong
Honored Contributor

Re: clean disk mirror.

Well seems to me that your other physical disk is not large enough to contain all the data from the disk you want "clean".

you only have 85 PE free and the 3 lvols you are trying to remove from the disk take up

12 13 and 825. = 850 PE's

you could pvmove lvol5 and lvol11 to c1t15d0

pvmove -n /dev/vg00/lvol5 /dev/dsk/c1t15d0
pvmove -n /dev/vg00/lvol11 /dev/dsk/c1t15d0

but disk c1t15d0 does not have enough free space to hold all of lvol98. You would need to lvreduce the size of lvol98. Thus shrinking the volume group in order to completely clean the c1t15d0 disk.

Marvin Strong
Honored Contributor

Re: clean disk mirror.

Well seems to me that your other physical disk is not large enough to contain all the data from the disk you want "clean".

you only have 85 PE free and the 3 lvols you are trying to remove from the disk take up

12 13 and 825. = 850 PE's

you could pvmove lvol5 and lvol11 to c1t15d0

pvmove -n /dev/vg00/lvol5 /dev/dsk/c1t15d0
pvmove -n /dev/vg00/lvol11 /dev/dsk/c1t15d0

but disk c1t15d0 does not have enough free space to hold all of lvol98. You would need to lvreduce the size of lvol98. Thus shrinking the logical volume in order to completely clean the c1t15d0 disk.

Torsten.
Acclaimed Contributor

Re: clean disk mirror.

I hope you didn't the "dd" command already, because this will corrupt these LVOLs.

As mentioned, the data in the LVOL is on 2 different disks (and NOT mirrored!).

If you delete one disk, you delete the data too and corrupt it.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eberno
Regular Advisor

Re: clean disk mirror.

Thank you very much, my friends.