Operating System - HP-UX
1823089 Members
3204 Online
109646 Solutions
New Discussion юеВ

Recover Data from Hard Disk

 
Raymond R Walsh Jr
Occasional Contributor

Recover Data from Hard Disk

I had to replace a second drive on a B3600 because the customer wanted a larger drive (18Gb to 72.8Gb) The replaced drive only had a single partition (lvol13). I attempted to tar the data but when I went to restore from the tar file, it stopped with a bad block error. How can I retrieve the data from the removed disk?
5 REPLIES 5
Peter Godron
Honored Contributor

Re: Recover Data from Hard Disk

Raymond,
did you get any errors when you created the tar? I would install the removed disk and generate another tar/backup, ensuring nothing went wrong.
Then swap the new disk in and restore, after making sure the disk is ok.
Tiziano Contorno _
Valued Contributor

Re: Recover Data from Hard Disk

Use cpio not to be limited to 2gigs files.
Reconnect the 18Gigs hard disk and be sure to have a good backup:

mt -f [your_tape_device] rew
find /mount_point_of_lvol13 -cpio [your_tape_device]

to restore:
cd /mount_point_of_lvol13 && cpio -i < [your_tape_device]

man cpio

Regards.
Raymond R Walsh Jr
Occasional Contributor

Re: Recover Data from Hard Disk

Yes there was an error during the tar but it occurred late in the process but what was untarred was a smidgeon of what appeared to have been archived. This is on a production system and I wanted to know if there is any way for me to be able to add the data disk to another B3600 and recover the data from there. In the original system
there was a single VG and the partition represented by this data disk was lvol13.
HPUX11.0 is the OS.
Tiziano Contorno _
Valued Contributor

Re: Recover Data from Hard Disk

mv /etc/lvmtab /etc/lvmtab.pre
mkdir /dev/source_workstation_vg_name # use the same vg name that was on the source workstation
mknod /dev/source_workstation_vg_name/group c 64 0xNN0000 # use the same minor number of the source workstation
insert disk from old workstation
ioscan -fnC disk
insf -C disk
vgscan -pv

1) if output of the vgscan above is good
vgscan -v
vgchange -a y old_workstation_vg_name
mount /dev/source_workstation_vg_name/lvol13 /wherever

2) if output is not good
mv /etc/lvmtab.pre /etc/lvmtab
report here what went wrong


Regards.
Robert-Jan Goossens
Honored Contributor

Re: Recover Data from Hard Disk

Hi Raymond,

It could be possible, depends a bit on how you removed (commands used)the disk from the original C3600. You could try below commands on a your spare workstation.

shutdown your spare WS, add the disk and boot the system, run "ioscan -fnCdisk" and note the added disk device file "/dev/dsk/cxtydz"

# ll /dev/*/group
crw-r----- 1 root sys 64 0x000000 Jun 29 01:34 /dev/vg00/group
note the vg number and minor number used on your WS volume group.
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgimport vg01 /dev/dsk/cxtydz
use the device file from your ioscan command.
# vgchange -a y vg01
# vgcfgbackup vg01
# vgdisplay -v vg01
# mkdir /mnt
# mount /dev/vg01/lvol1 /mnt

Check if you have access to your data.

Hope this helps,
obert-Jan