I have a server with two hard disk – in rescue mode because one of the disk failed and had to be replaced -.
I had to hire a data recovery service, few days later they told me that it was ready, but they couldn’t open a terminal in order to mount the filesystem. So I opened a SSH terminal and I tried to mount the filesystem.
In rescue mode I can’t use fdisk command, is not available. So I tried with lsblk with this result:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 190.9M 1 loop
sda 8:0 0 232.9G 0 disk
sdb 8:16 0 232.9G 0 disk
Then I tried to list partitions with parted -l with this result:
Error: /dev/sda: unrecognised disk label
Model: ATA Hitachi HDT72502 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Error: /dev/sdb: unrecognised disk label
Model: ATA Hitachi HDT72502 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Then I tried to list partitions with sgdisk -l /dev/sda with this result:
GPT fdisk (gdisk) version 1.0.6
Warning: Partition table header claims that the size of partition table entries is 257317316 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Warning: Partition table header claims that the size of partition table entries is 164259508 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Disk /dev/sda: 488397168 sectors, 232.9 GiB
Model: Hitachi HDT72502
Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 6252014C-6128-5CBC-64B3-43B93D2746D4
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 488397134 Partitions will be aligned on 2048-sector boundaries Total free space is 488397101 sectors (232.9 GiB)
Number Start (sector) End (sector) Size Code Name
And then I tried to list with second disk; sgdisk -l /dev/sdb with this result:
GPT fdisk (gdisk) version 1.0.6
Warning: Partition table header claims that the size of partition table entries is 0 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Warning: Partition table header claims that the size of partition table entries is 0 bytes, but this program supports only 128-byte entries.
Adjusting accordingly, but partition table may be garbage.
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Disk /dev/sdb: 488397168 sectors, 232.9 GiB
Model: Hitachi HDT72502
Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): CBA264B1-5BCC-54F3-BF89-23B5C2B3733B
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 488397134 Partitions will be aligned on 2048-sector boundaries Total free space is 488397101 sectors (232.9 GiB)
Number Start (sector) End (sector) Size Code Name
Then I checked if sda disk contained data with dd if=/dev/sda|hexdump -C and yes. But sdb disk was empty:
dd if=/dev/sdb|hexdump -C
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
Then I tried to get RAID info with mdadm –query /dev/sda with this result:
/dev/sda: is not an md array
Some additional information: I can only connect with SSH terminal in remote and only can use these commands:
agetty devlink e2undo fsck.reiserfs ip lvconvert lvscan mkfs.msdos pvchange route sysctl vgextend
badblocks dhcpcd ethtool fsck.vfat ipmaddr lvcreate mdadm mkfs.reiserfs pvck rtacct tc vgimport
blkdeactivate dmeventd fatlabel fsck.xfs iptunnel lvdisplay mdmon mkfs.vfat pvcreate rtmon telinit vgimportclone
blkdiscard dmraid findfs fsfreeze isosize lvextend mii-tool mkfs.xfs pvdisplay runlevel tipc vgmerge
blkid dmraid-activate fixparts fstab-decode jfs_debugfs lvm mkdosfs mkhomedir_helper pvmove runuser tune2fs vgmknodes
blkzone dmsetup fsadm fstrim jfs_fsck lvmconfig mke2fs mkreiserfs pvremove setcap tunefs.reiserfs vgreduce
blockdev dmstats fsck gdisk jfs_fscklog lvmdiskscan mkfs mkswap pvresize sgdisk unix_chkpwd vgremove
bridge dosfsck fsck.btrfs getcap jfs_logdump lvmdump mkfs.bfs nameif pvs shadowconfig unix_update vgrename
capsh dosfslabel fsck.cramfs getpcaps jfs_mkfs lvmpolld mkfs.btrfs parted pvscan shutdown vgcfgbackup vgs
cgdisk dumpe2fs fsck.ext2 getty jfs_tune lvmsadc mkfs.cramfs partprobe rarp slattach vgcfgrestore vgscan
chcpu e2fsck fsck.ext3 halt killall5 lvmsar mkfs.ext2 pivot_root raw start-stop-daemon vgchange vgsplit
coldreboot e2image fsck.ext4 hdparm kpartx lvreduce mkfs.ext3 plipconfig reboot sulogin vgck wipefs
ctrlaltdel e2label fsck.fat hwclock ldconfig lvremove mkfs.ext4 pm-hibernate reiserfsck swaplabel vgconvert xfs_repair
debugfs e2mmpstatus fsck.jfs ifconfig logsave lvrename mkfs.fat pm-suspend reiserfstune swapoff vgcreate zramctl
debugfs.reiserfs e2scrub fsck.minix init losetup lvresize mkfs.jfs pm-suspend-hybrid resize2fs swapon vgdisplay
debugreiserfs e2scrub_all fsck.msdos installkernel lvchange lvs mkfs.minix poweroff resize_reiserfs switch_root vgexport
How can I recover the partitions?. I think it’s impossible, but I keep trying because they told me that the data could still be recovered.
Any suggestion is highly appreciated, thanks in advance.