Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logical Volume Manager

Status
Not open for further replies.

nyck

Technical User
Mar 10, 2004
447
GB
Hello,

I have got a volume group that has got two physical volumes in it. I would like to remove one of those physical volumes but i'm not too sure how to do this. Could someone advise me on the syntax for this?

cheers
 

eg. To remove c0t2d2 from vg02

vgreduce /dev/vg01 /dev/dsk/c0t2d2

however, you first have to remove any logical volumes on the disk :

eg. lvremove /dev/vg01/lvol3

(a pvdisplay (pvdisplay -v /dev/dsk/c0t2d0 |pg) will show what lvols are on the disk)

Make sure you back up first

Martin
 
Spot the error -

2nd line should read:

vgreduce /dev/vg02 /dev/dsk/c0t2d2
 
You must make sure that there is no data on the disk you want to remove from the VG. Can use the 'pvdisplay -v /dev/dsk/cXtYdZ' to get this info.

Once confirmed do the lvremove or lvresuce, whichever you need.

Once the LVs are removed from the disk, can use the vgreduce command to free the disk.
 
.. that was what the pvdisplay -v /dev/dsk/c0t2d0 |pg was for ... :eek:)

I kinda assumed it was known that a lvremove removed data ...

Once the disk is out, it could be worth an pvreduve on the disk. Therefore if the disk is reused, the pvcreate option would not need a -f.

Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top