- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Getting data off old disk (no longer part of VG?)
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
Discussions
Discussions
Forums
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
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
тАО11-09-2008 08:59 AM
тАО11-09-2008 08:59 AM
I have a single disk (/dev/dsk/c0t1d0) that is assigned to /dev/vg03. The VG contains no other physical volumes. The box's boot disk failed and the user ignited the box and ran a mod tape that recreated all the system software architecture (including recreating the VG's).
Knowing that he had no backups of the database on this box, he removed and replaced the c0t1d0 disk prior to rebuilding the box.
Now the box is working, the databases are there but empty, and all the VGs are mounting properly.
PROBLEM: the database backups are on the "old" c0t1d0 drive that WAS part of VG03. I replaced the "new" disk with the "old" disk to see if I could cp the files off it...but I cannot mount it, I get the "vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c0t1d0" " error.
I assume (not knowing yet how PV assignment works) that the system is trying to assign the PV to the VG but it knows that this is not the same physical disk that the VG is supposed to have...
How can I reassign VG03 to this existing disk vice the "new" disk and then cp off the data?
***given enough time, I would never ask this basic admin question...I would study and figure it out on my own but I am in a time crunch.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2008 09:11 AM
тАО11-09-2008 09:11 AM
Re: Getting data off old disk (no longer part of VG?)
# mkdir /dev/vg03
# mknod /dev/vg03/group c 64 0x030000
# vgimport -v /dev/vg03 /dev/dsk/c0t1d0
# vgchange -a y /dev/vg03
Now mount whatever directories you want on whatever logical volumes are available. Since we didn't define a mapfile, the logical volume names will be the default nomenclature ('lvol1', 'lvol2', etc).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2008 09:31 AM
тАО11-09-2008 09:31 AM
Re: Getting data off old disk (no longer part of VG?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2008 11:23 AM
тАО11-09-2008 11:23 AM
Re: Getting data off old disk (no longer part of VG?)
# mkdir /dev/vg03
this already exists, can I skip this?
# mknod /dev/vg03/group c 64 0x030000
Since vg03 is already in use with the "new" disk, I assume that this special file already exists also. right?
# vgimport -v /dev/vg03 /dev/dsk/c0t1d0
So, turn off the machine, replace the "new" c0t1d0 that is working within vg03 with the old one with the data I need. Boot into single user mode. Run this commned to "remap" the old now-installed c0t1d0 drive back to the existing vg03
# vgchange -a y /dev/vg03
Do I have to do this? the vg is already active...or do I have to "reactivate" it because I changed to disk?
What is telling the system that the old disk that I pulled out is not the real disk that vg03 needs? It WAS the vg03 disk prior to rebuilding the box and configuring LVM exactly as before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2008 03:40 PM
тАО11-09-2008 03:40 PM
Solution> I generally don't arbitrarily run commands from the internets on a system without understanding what I am doing
That's always wise. However, if you look at the rankings here, you'll see that for whatever its worth, I've been around a while and have contributed quite a bit :-)) Take the advice and read the manpages. After all, it was you who said, "...given enough time, I would never ask this basic admin question...I would study and figure it out on my own but I am in a time crunch."
If you already have a 'vg03' I'd make a different volume group. It doesn't matter what the physical volume was once assigned to in its former life. Use any unused minor number. Do an 'ls -l /dev/vg??/group' to see what's already taken and pick an open number that is less than your 'maxvgs' [default is 10 decimal counting from zero].
Assuming that minor number four (4) is available:
# mkdir /dev/vg04
# mknod /dev/vg04/group c 64 0x040000
# vgimport -v /dev/vg04 /dev/dsk/c0t1d0
# vgchange -a y /dev/vg04
Now, mount what you need to recover and when done, you can eliminate the volume group just created with:
# vgchange -a n /dev/vg04
# vgexport /dev/vg04
Keep the physical disk or reuse it by doing a 'pvcreate' on it.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2008 04:33 AM
тАО11-10-2008 04:33 AM
Re: Getting data off old disk (no longer part of VG?)
I would go with James suggestion if I am in your situation.
Import the "old disk with data" into new volume group and mount the logical volumes and copy the data to wherever you need.
I have a another thought if you still specically needs to import the "old disk with data" to VG03.
1. Just export the vg VG03 which has "new disk without any data". I am assuming that there is no data on new disk. If you have data just backed up before export it.
#vgexport /dev/vg03
2.Now VG03 is not there and system doesn't know anything about VG03. Create a directory for VG03 and group file for it. Use the appropriate minor numer (0x030000)
# mkdir /dev/vg03
# mknod /dev/vg03/group c 64 0x030000
3. Now import the "old disk with data" to the newly created vg03. It is not necessary that the "old disk with data" should have same device file.
#vgimport -v /dev/vg03 /dev/dsk/c0t1d0
4.Activate the VG
# vgchange -a y /dev/vg03
Now you are back to state before you rebuild the server. Mount the logical volumes and access the data. Only thing is that now the lv names will be standard like lvol1, lvol2..
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2008 06:00 AM
тАО11-10-2008 06:00 AM
Re: Getting data off old disk (no longer part of VG?)
I have a much better understanding of LVM now, thanks to your example and the MAN pages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2008 06:02 AM
тАО11-10-2008 06:02 AM