Debian 丢失的文件系统。损坏的文件系统

-4 linux filesystems ext4 debian boot

我有一个文件系统错误/错误。我的专用服务器无法启动。OVH 以救援模式启动了我的专用服务器,并且:

root@rescue:~# parted /dev/sda 'print'
Model: ATA SAMSUNG MZ7LM240 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End    Size   Type     File system     Flags
 1      1049kB  240GB  240GB  primary                  boot
 2      240GB   240GB  536MB  primary  linux-swap(v1)
Run Code Online (Sandbox Code Playgroud)

所以问题是,在 sda 和 sdb 中没有文件系统。

所有数据都非常非常重要,所以我必须保存它们。请帮助我,如何在磁盘中创建文件系统并恢复所有内容?

我尝试了 testdisk 命令,但无法恢复文件系统。

当我尝试挂载时,我收到了这条消息:

root@rescue:/mnt# mount /dev/sdb1 /mnt/
mount: unknown filesystem type 'linux_raid_member'

root@rescue:/mnt# mount /dev/sda1 /mnt/
mount: unknown filesystem type 'linux_raid_member'
Run Code Online (Sandbox Code Playgroud)

而 fdisk 写的是:

root@rescue:/mnt# fdisk -l

Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 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
Disklabel type: dos
Disk identifier: 0xc6522a8b

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 467810303 467808256 223.1G 83 Linux
/dev/sda2       467810304 468856831   1046528   511M 82 Linux swap / Solaris

Disk /dev/sdb: 223.6 GiB, 240057409536 bytes, 468862128 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
Disklabel type: dos
Disk identifier: 0xa398617a

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1  *         4096 467810303 467806208 223.1G fd Linux raid autodetect
/dev/sdb2       467810304 468856831   1046528   511M 82 Linux swap / Solaris

Disk /dev/md1: 446.1 GiB, 479033556992 bytes, 935612416 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes

root@rescue:~# mount /dev/md1 /mnt/
mount: /dev/md1 is write-protected, mounting read-only
NTFS signature is missing.
Failed to mount '/dev/md1': Invalid argument
The device '/dev/md1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
Run Code Online (Sandbox Code Playgroud)

当我检查 dmesg 时:

root@rescue:~# dmesg | tail
[    8.724614]  md1: unknown partition table
[   10.430793] systemd-journald[389]: Received request to flush runtime journal from PID 1
[   18.468492] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   18.468494] 8021q: adding VLAN 0 to HW filter on device eth1
[  492.873958] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
[  492.942832] ip_set: protocol 6
[  517.742940] ip_set: protocol 6
[ 1599.096427] EXT4-fs (md1): VFS: Can't find ext4 filesystem
[ 1602.001332] EXT4-fs (md1): VFS: Can't find ext4 filesystem
[ 3396.499044] ip_set: protocol 6
Run Code Online (Sandbox Code Playgroud)

我收到了来自 OVH 的电子邮件:

下面是这个操作的详细信息: Diagnosis interface boot (rescue) Date 2016-08-11 19:55:22, elyess H made Diagnosis interface boot (rescue): 下面是执行的操作的详细信息: 服务器卡住期间引导阶段,带有消息:(错误:未知文件系统)在标准 OVH 内核(“netboot”)上重新启动不能纠正这种情况。

操作:将服务器重新启动到“救援”模式 (Linux)

结果:开机正常。救援模式可用。

建议:配置/错误由客户纠正

所以问题是:我丢失了文件系统,无法启动,也无法挂载磁盘。我在专用服务器中有 RAID-1,但我无法挂载 /dev/md1。

如何恢复文件系统?如何挂载磁盘?如何启动系统?我想如果我解决了文件系统,我就可以启动系统。

感谢您的帮助!

Ond*_*idr 5

简而言之,你遇到了严重的麻烦。从您作为评论发布的 mdstat 中,我可以看到您有 RAID-0,而不是 RAID-1 配置,请参阅:

root@rescue:~# cat /proc/mdstat 个性:[linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty] md1 : active raid0 sda1[0] sdb1[ 1] 467806208 阻止了 512k 块未使用的设备:

Raid-0 是剥离的raid - 您正在使用所有驱动器的所有容量,并且数据保存在所有磁盘上,但在设备出现故障的情况下没有冗余。

这就是您的服务器发生的情况。您的其中一个磁盘出现故障。这在服务器环境中很常见。但是因为您只有 RAID-0 配置,所以您搞砸了,您的所有数据都将丢失。

现在它取决于保存在服务器上的数据的价值。您可以尝试与 OVH 交谈以关闭服务器电源,取出这些驱动器并将其发送给一些专门从故障驱动器中抢救数据的公司。这是一项昂贵的服务,您无法保证他们会恢复 100% 的数据。恢复它肯定需要数天或数周的时间,并且您的服务器此时将处于离线状态。

另一种方法是恢复您的备份并接受损坏。

没有别的办法了,对不起。