我遇到了一个大问题,我的 Ubuntu 服务器在重启后无法启动,Hetzner 数据中心的人启动了系统并在 sda 上发现了这个问题:
-----------------%<-----------------
5 Reallocated_Sector_Ct 0x0033 001 001 036 Pre-fail Always
FAILING_NOW 4095
-----------------%<-----------------
有3 个 1.5TB HDD 组成 RAID5,sda 上有引导加载程序。他们坚持要用新的硬盘替换 sda,所以我确认了。
之后他们又给我寄回了另一件东西,sdc 也损坏了……
直到今天早上 7:30 一切都正常。之后服务器冻结,重启后两个硬盘损坏……有点奇怪,但没有时间考虑这个。
他们returned corrupted sda back
,这样“我就可以恢复一些数据...”但问题是我被卡住了。我试图在live-rescue-system 并安装 grub,但有这个错误:
root@rescue ~ # grub-install /dev/sdb
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is
/dev mounted?).
root@rescue ~ # mkdir /media/sdb
root@rescue ~ # mount /dev/sdb /media/sdb
mount: you must specify the filesystem type
root@rescue ~ # mount /dev/sdb /media/sdb -t auto
mount: you must specify the filesystem type
root@rescue ~ # mount /dev/sdb /media/sdb -t ext3
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
有人可以帮我尝试启动 Ubuntu 服务器或者以某种方式从任何磁盘恢复数据吗?
额外信息:
root@rescue ~ # ll /dev/sd
brw-rw---T 1 root disk 8, 0 Nov 18 14:04 /dev/sda
brw-rw---T 1 root disk 8, 1 Nov 18 14:06 /dev/sda1
brw-rw---T 1 root disk 8, 2 Nov 18 14:06 /dev/sda2
brw-rw---T 1 root disk 8, 16 Nov 18 14:04 /dev/sdb
brw-rw---T 1 root disk 8, 17 Nov 18 14:04 /dev/sdb1
brw-rw---T 1 root disk 8, 18 Nov 18 14:04 /dev/sdb2
brw-rw---T 1 root disk 8, 32 Nov 18 14:06 /dev/sdc
root@rescue ~ # df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 12G 3.0M 12G 1% /
udev 12G 0 12G 0% /dev
188.40.24.212:/nfs 1.4T 592G 722G 46% /root/.oldroot/nfs
aufs 12G 3.0M 12G 1% /
tmpfs 2.4G 264K 2.4G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 4.8G 0 4.8G 0% /run/shm
root@rescue ~ # ll /dev/loo*
brw-rw---T 1 root disk 7, 0 Nov 18 14:04 /dev/loop0
brw-rw---T 1 root disk 7, 1 Nov 18 14:04 /dev/loop1
brw-rw---T 1 root disk 7, 2 Nov 18 14:04 /dev/loop2
brw-rw---T 1 root disk 7, 3 Nov 18 14:04 /dev/loop3
brw-rw---T 1 root disk 7, 4 Nov 18 14:04 /dev/loop4
brw-rw---T 1 root disk 7, 5 Nov 18 14:04 /dev/loop5
brw-rw---T 1 root disk 7, 6 Nov 18 14:04 /dev/loop6
brw-rw---T 1 root disk 7, 7 Nov 18 14:04 /dev/loop7
crw------T 1 root root 10, 237 Nov 18 14:04 /dev/loop-control
root@rescue ~ # fdisk -l
Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cdbda
Device Boot Start End Blocks Id System
/dev/sdb1 3906 1060289 528192 fd Linux raid autodetect
/dev/sdb2 1060290 2930272064 1464605887+ fd Linux raid autodetect
Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c5b77
Device Boot Start End Blocks Id System
/dev/sda1 3906 1060289 528192 fd Linux raid autodetect
/dev/sda2 1060290 2930272064 1464605887+ fd Linux raid autodetect
Disk /dev/md0: 540 MB, 540803072 bytes
2 heads, 4 sectors/track, 132032 cylinders, total 1056256 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
root@rescue ~ # cat /proc/mdstat
Personalities : [raid1]
md1 : inactive sda2[0](S)
1464605760 blocks
md0 : active raid1 sda1[0]
528128 blocks [3/1] [U__]
unused devices: <none>
答案1
您只能安装分区,不是全部设备. 设备 – 通常命名为陣容如果是 SATA 驱动器(可以容纳多个分区),则以它们所在的设备命名,并添加数字,例如sdx1对于第一个分区陣容。
对于您来说,显然在创建这两个目录之后,请尝试mount /dev/sdb1 /media/partition1
并。mount /dev/sdb2 /media/partition2