HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Restoring external disk from crashed workstati...
Operating System - HP-UX
1832861
Members
2917
Online
110048
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-14-2002 06:17 AM
11-14-2002 06:17 AM
Recently, my HP C160 (HP-UX 10.20) crashed due to a processor
failure. The workstation had an external data disk for the
/home-directories, which was vg01.
In order to restore the data on the disk (as usual, our backup did not
work properly...), I want to add this disk to another HP-workstation
(C180), also with HP-UX 10.20. This workstation also has an external
disk, which is also called vg01.
What I want to do is plug in the old disk to save the data via network
to our data server.
So the question is how to do it.
If I understand correctly, the following procedure should be possible:
1. Add the disk to the C180 (with a different SCSI-switch-number)
2. Reboot and go to maintenance mode by doing
ISL> hpux -lm
3. Do a vgimport - but here is the problem: Can I import the disk as vg02 now?
Or do I have to use vg01, as it was used before? In this case, how do
I get rid of the other vg01-disk?
vgimport -v /dev/vg02 /dev/dsk/...
Can I do vgimport without a map-file? If not, I know that vgscan can
do the trick, but I do not know how to do it exactly.
Do I have to mkdir vg02 first if I do it this way and to do an mknod?
If so, what are correct parameters to mknod? Is it
mknod /dev/vg02/group 64 0x010000
?
4. After that I have to do
vgchange -a y vg02
in order to activate the volume and can then mount it, right?
5. Question is, is it then possible to mount it to another name, like
/home2, as /home is of course already occupied, or do I have to rename
the /home-directory on the C180 and then mount the external disk as
/home?
Sorry if all this has been discussed before here, but I could not find
the exact answers to these questions in the archives and am afraid of
destroying the data if I do something wrong.
failure. The workstation had an external data disk for the
/home-directories, which was vg01.
In order to restore the data on the disk (as usual, our backup did not
work properly...), I want to add this disk to another HP-workstation
(C180), also with HP-UX 10.20. This workstation also has an external
disk, which is also called vg01.
What I want to do is plug in the old disk to save the data via network
to our data server.
So the question is how to do it.
If I understand correctly, the following procedure should be possible:
1. Add the disk to the C180 (with a different SCSI-switch-number)
2. Reboot and go to maintenance mode by doing
ISL> hpux -lm
3. Do a vgimport - but here is the problem: Can I import the disk as vg02 now?
Or do I have to use vg01, as it was used before? In this case, how do
I get rid of the other vg01-disk?
vgimport -v /dev/vg02 /dev/dsk/...
Can I do vgimport without a map-file? If not, I know that vgscan can
do the trick, but I do not know how to do it exactly.
Do I have to mkdir vg02 first if I do it this way and to do an mknod?
If so, what are correct parameters to mknod? Is it
mknod /dev/vg02/group 64 0x010000
?
4. After that I have to do
vgchange -a y vg02
in order to activate the volume and can then mount it, right?
5. Question is, is it then possible to mount it to another name, like
/home2, as /home is of course already occupied, or do I have to rename
the /home-directory on the C180 and then mount the external disk as
/home?
Sorry if all this has been discussed before here, but I could not find
the exact answers to these questions in the archives and am afraid of
destroying the data if I do something wrong.
a real Klingon never comments his code.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 06:29 AM
11-14-2002 06:29 AM
Solution
You can vgimport the data disk and any VG you like as long as it does not currently exist on the target machine. If vg02 is not defined feel free to use it. A good way to identify existing disks and VG's is to issue a "strings /etc/lvmtab" command.
You next task is to create a
/dev/vg04 directory and a device node under it).
mknod c /dev/vg04 64 0x040000.
Note that the first two octal digits of the minor device number must be unique within the system. By convention,
0x010000 is used for vg01, 0x020000 is used for vg02, and so on but any unique minor device number will work.
You then run then vgimport command, vgchange -a y /dev/vg04, create amountpoints, and mount the filesystems.
You next task is to create a
/dev/vg04 directory and a device node under it).
mknod c /dev/vg04 64 0x040000.
Note that the first two octal digits of the minor device number must be unique within the system. By convention,
0x010000 is used for vg01, 0x020000 is used for vg02, and so on but any unique minor device number will work.
You then run then vgimport command, vgchange -a y /dev/vg04, create amountpoints, and mount the filesystems.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2002 06:38 AM
11-14-2002 06:38 AM
Re: Restoring external disk from crashed workstation
Hi:
You are thinking correctly. Yes, you can (should) 'vgimport' the disk with a new volume group name. In fact, that is the way to rename a volume group. Yes, too, you can mount filesystems on the imported disks under any directory name you choose.
The absence of 'vgimport' mapfiles is immaterial. In their absence the logical volume names will be build by default ("lvol1", "lvol2", etc. for each successfile logical volume. If this is not desired, you can pre-construct a mapfile that looks like this:
1 mylvol1
2 mylvol2
...
To 'vgimport' and change the name to 'vg02' do:
# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000
# vgimport -m mymapfile /dev/vg02 /dev/dsk/cXtYdZ
# vgchange -a y /dev/vg02
Now for each logical volume create a directory on which to mount it and mount it. You can edit 'etc/fstab' if you like and do a 'mount -a' or you can mount each one individually.
When you are done using the imported disk, simply use 'vgexport' to remove knowledge of it from the system. This will remove the 'dev/vg02/' directory and files and appropriately cleanup 'etc/lvmtab'. You will need to delete your mountpoints and you're done!
Regards!
...JRF...
Regards!
...JRF...
You are thinking correctly. Yes, you can (should) 'vgimport' the disk with a new volume group name. In fact, that is the way to rename a volume group. Yes, too, you can mount filesystems on the imported disks under any directory name you choose.
The absence of 'vgimport' mapfiles is immaterial. In their absence the logical volume names will be build by default ("lvol1", "lvol2", etc. for each successfile logical volume. If this is not desired, you can pre-construct a mapfile that looks like this:
1 mylvol1
2 mylvol2
...
To 'vgimport' and change the name to 'vg02' do:
# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000
# vgimport -m mymapfile /dev/vg02 /dev/dsk/cXtYdZ
# vgchange -a y /dev/vg02
Now for each logical volume create a directory on which to mount it and mount it. You can edit 'etc/fstab' if you like and do a 'mount -a' or you can mount each one individually.
When you are done using the imported disk, simply use 'vgexport' to remove knowledge of it from the system. This will remove the 'dev/vg02/' directory and files and appropriately cleanup 'etc/lvmtab'. You will need to delete your mountpoints and you're done!
Regards!
...JRF...
Regards!
...JRF...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP