- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need to restore logical volume - pvcreate error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:15 PM
02-15-2002 12:15 PM
An HP tech had to restore disk array status to default. Now, disk from array is visible as unused in SAM, but I can't re-create the volume group, & re-add the logical volume because of this error:
"pvcreate: The physical vlume "/dev/dsk/c0t0d0" is already recorded in the /etc/lvmtab file. This is not a file I can edit. How can I remove the previous entry so I can re-add the same disk & restore?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:17 PM
02-15-2002 12:17 PM
Re: Need to restore logical volume - pvcreate error
# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:17 PM
02-15-2002 12:17 PM
Re: Need to restore logical volume - pvcreate error
You should be able to do a vgexport. e.g. vgexport /dev/vg99
Man vgexport for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:19 PM
02-15-2002 12:19 PM
Re: Need to restore logical volume - pvcreate error
I dont know whats your problem ( broken disk, lost of configuration...).
Begin with:
strings /etc/lvmtab # to see which vg is pointing that disk.
Then you can choose for vgexport -s -m, and try to vgimport again.
Maybe you should run vgcfgrestore....
Just ideas for a beginning...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:20 PM
02-15-2002 12:20 PM
Re: Need to restore logical volume - pvcreate error
try this
# mv /etc/lvmtab /etc/lvmtab.org
# vgscan -a
Or try vgexporting the VG
# vgexport /dev/vgxx
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:22 PM
02-15-2002 12:22 PM
SolutionAs SAM things the disk is unused, I presume that it was replaced. Therefore, you should be able to do:
# vgcfgrestore -n /dev/vgNN /dev/rdsk/cXtYdZ
# vgchange -a y /dev/vgNN
...to restore the LVM information and then reload your data from backup.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:24 PM
02-15-2002 12:24 PM
Re: Need to restore logical volume - pvcreate error
If you want to use the disk for the same vg and for the same lv as it was configure earlier, why do you want to do a "pvcreate". you can do a vgcfgrestore and this will restore the previous vg/lv info to the disk.
If you don't want to use the disk for the old vg/lv, then you have to do lvreduce and vgreduce to take the disk out of the info stored on the system.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:27 PM
02-15-2002 12:27 PM
Re: Need to restore logical volume - pvcreate error
The disk array was re-initialized -- it is exactly the same physical hardware.
It was setup as /dev/vg01 before.
I'm getting lots of different suggestions here. I'll assign points to all once I get the right recommendation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:34 PM
02-15-2002 12:34 PM
Re: Need to restore logical volume - pvcreate error
OK, the best option is to re-create your VG information with 'vgcfgrestore'
# vgcfgrestore -n /dev/vg01 /dev/rdsk/c0t0d0
This will recreate all your VG information on the disk. Then activate your VG
# vgchange -a y /dev/vg01
# vgdisplay -v /dev/vg01
Create file systems on the LVs
# newfs -F FS_type /dev/vg01/rlvol1 ( for all LV)
# mount -a ( assuming all mount options are defined in the /etc/fstab)
Then restore your data from backup.
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:35 PM
02-15-2002 12:35 PM
Re: Need to restore logical volume - pvcreate error
This is what we do,
Say we have 6 disk in one Vg, for eg: vg01
disk 4 (c4t4d0) goes bad. We get it replaced. Now to bring it back to the vg01, we just do a vgcfgrestore to this disk,
vgcfgrestore -n vg01 /dev/rdsk/c4t4d0
Then do a vgactivate the vg to activate the disk in the vg,
vgchange -a y /dev/vg01
Now do a vgsync to rebuild any mirrors, This may take some time, if the mirror is being rebuilt. depends on size
vgsync /dev/vg01
Then do a vgdisplay to check that the disk is indeed added and active,
vgdisplay -v /dev/vg01 |pg
This should show all the 6 disks in the list and all the lv's as available/syncd.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:37 PM
02-15-2002 12:37 PM
Re: Need to restore logical volume - pvcreate error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:55 PM
02-15-2002 12:55 PM
Re: Need to restore logical volume - pvcreate error
Here is a link which might be useful to you. Now as well as in future,
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=defa14690833a01079/screen=ckiDisplayDocument?docId=200000058036738
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 12:59 PM
02-15-2002 12:59 PM
Re: Need to restore logical volume - pvcreate error
Any other precautions necessary?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 01:02 PM
02-15-2002 01:02 PM
Re: Need to restore logical volume - pvcreate error
No, you can use these commands in multiuser mode too. Make sure you are giving correct parameters ( vg_name, pv_name).
Good luck !
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 01:03 PM
02-15-2002 01:03 PM
Re: Need to restore logical volume - pvcreate error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2002 01:05 PM
02-15-2002 01:05 PM
Re: Need to restore logical volume - pvcreate error
you can run "vgcfgrestore" and "vgchange" commands in multi-user mode. You can run these commands even if the vg01 is active.
Hope this helps.
Regds