1833042 Members
2555 Online
110049 Solutions
New Discussion

Re: orphan pv

 
john_891
Occasional Advisor

orphan pv


i seems to have an orphan pv after reinstallation of OS, even i recreate my lvmtab using vgscan -a.
i can not recreate file system on /dev/dsk/c0t9d0, as system would prompt that is a LVM device, although it does not belong to any vg.

the question here is: is there any command that can let me reinitialize the disk? I can do that from "sam", but just want to check the possibility of doing so through command line.

thanks

here is my vgscan and ioscan output:
# vgscan
vgscan: The physical volume "/dev/dsk/c0t4d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t8d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t10d0" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c2t2d0":
Invalid argument


Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c0t9d0

ioscan output==>
ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 8/4.4.0 sdisk CLAIMED DEVICE SEAGATE ST34572WC
/dev/dsk/c0t4d0 /dev/rdsk/c0t4d0
disk 1 8/4.8.0 sdisk CLAIMED DEVICE SEAGATE ST34573WC
/dev/dsk/c0t8d0 /dev/rdsk/c0t8d0
disk 2 8/4.9.0 sdisk CLAIMED DEVICE SEAGATE ST34573WC
/dev/dsk/c0t9d0 /dev/rdsk/c0t9d0
disk 3 8/4.10.0 sdisk CLAIMED DEVICE SEAGATE ST34572WC
/dev/dsk/c0t10d0 /dev/rdsk/c0t10d0
disk 8 8/16/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5701TA
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: orphan pv

Hi,

Looks like it was previously used as an LVM disk so your 'pvcreate /dev/rdsk/c0t9d0' is failing. If you are sure that you can erase data on this disk, then use 'pvcreate -f /dev/rdsk/c0t9d0' and then add it to the VG or create a new VG. Otherwise, use the following process to import the VG using the disk.

#mkdir /dev/vg02
#mknod /dev/vg02/group c 64 0x020000
(I assume you don't have a vg vg02 already. Other use a different vg name. Also change the minor number to a unique one. TO find out the existing minors, run 'll /dev/*/group')
#vgimport vg02 /dev/dsk/c0t9d0

If it is successful, then you will see some lvols created under /dev/vg02 directory. Mount them manually and look at the data.
#vgchange -a y vg02
#mkdir /test
#mount /dev/vg02/lvol1 /test
#ll /test

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Stf
Esteemed Contributor

Re: orphan pv

Hello,

To reinitialize the disk for including it in a new volume group :

# pvcreate /dev/rdsk/c0t9d0

if it doesn't work you can use -f option to force :

# pvcreate -f /dev/rdsk/c0t9d0

Then add a VG to this disk, and look your /etc/lvmtab, normally /dev/dsk/c0t9d0 should appear in it.

Stf ;-)
john_891
Occasional Advisor

Re: orphan pv

Thanks all you guys, it really helps!!..thanks