找不到分区

找不到分区

我有一台带有两块硬盘的服务器,处于救援模式,因为其中一个磁盘出现故障,必须更换。

我不得不聘请数据恢复服务,几天后他们告诉我数据已经恢复了,但他们无法打开终端来挂载文件系统。所以我打开了 SSH 终端并尝试挂载文件系统。

在救援模式下,我无法使用 fdisk 命令,不可用。因此我尝试使用 lsblk,结果如下:

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

然后我尝试使用 parted -l 列出分区,结果如下:

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:

然后我尝试使用 sgdisk -l /dev/sda 列出分区,结果如下:

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

然后我尝试列出第二个磁盘;sgdisk -l /dev/sdb 得到以下结果:

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

然后我用 dd if=/dev/sda|hexdump -C 检查了 sda 磁盘是否包含数据,结果是有的。但是 sdb 磁盘是空的:

dd if=/dev/sdb|hexdump -C
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*

然后我尝试使用 mdadm --query /dev/sda 获取 RAID 信息,结果如下:

/dev/sda: is not an md array

一些附加信息:我只能远程连接 SSH 终端,并且只能使用这些命令:

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

我该如何恢复分区?我认为这是不可能的,但我一直在尝试,因为他们告诉我数据仍然可以恢复。

非常感谢您的任何建议,提前致谢。

相关内容