我有一台 Ubuntu 20.04 服务器,愉快地运行 2 个 RAID1 阵列。
我有一堆旧磁盘,我想在决定是否在销毁之前进行备份之前检查它们。
我通过 SATA 转 USB 盒将磁盘连接到服务器。
有些磁盘是 RAID5 阵列的一部分,而我只有一个 USB 盒,所以我尝试(希望)至少安装它们以便能够检查内容 - 我只读取只读视图。
连接磁盘后lsblk
给出:
sdf 8:80 0 465.8G 0 disk
├─sdf1 8:81 0 290.2M 0 part
├─sdf2 8:82 0 486.4M 0 part
├─sdf4 8:84 0 1K 0 part
├─sdf5 8:85 0 133.3M 0 part
└─sdf6 8:86 0 464.8G 0 part
我fdisk -l
得到:
fdisk -l /dev/sdf
Disk /dev/sdf: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: 00AAKS-00A7B0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0xce16e76e
Device Boot Start End Sectors Size Id Type
/dev/sdf1 63 594404 594342 290.2M 83 Linux
/dev/sdf2 594405 1590434 996030 486.4M 83 Linux
/dev/sdf4 1590435 976768064 975177630 465G 5 Extended
/dev/sdf5 1590498 1863539 273042 133.3M 82 Linux swap / Solaris
/dev/sdf6 1863603 976494959 974631357 464.8G 83 Linux
Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 4 does not start on physical sector boundary.
Partition 5 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
在cat /proc/mdstat
我看到:
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md123 : inactive sdf6[0](S)
487315584 blocks
md124 : inactive sdf1[2](S)
297088 blocks
md125 : inactive sdf2[1](S)
497920 blocks
md126 : active raid1 sdg2[1]
1932533488 blocks super 1.0 [2/1] [_U]
md127 : inactive sdh1[0](S) sdg1[1](S)
41961600 blocks
我尝试扫描然后组装并安装:
mdadm --detail --scan /dev/md123
给出:
INACTIVE-ARRAY /dev/md123 metadata=0.90 UUID=9b990924:10915d87:0073689c:05407c1c
跑步mdadm --assemble --force /dev/md123 /dev/sdf6
mdadm: /dev/sdf6 is busy - skipping
尝试挂载:
mount /dev/md124 /mnt/usb/usb6
mount: /mnt/usb/usb6: can't read superblock on /dev/md124.
我尝试运行最重要的恢复,但它将相同类型的文件转储到文件夹中并且不保留名称。
foremost -dvT -i /dev/sdf6 -o /mnt/md0/share01/Backups/aa
我还能做什么来尝试安装磁盘以便获取内容?
我知道 RAID5 不能替代备份 - 但任何帮助都会很棒。
更新
输出mdadm --examine /dev/md*
(对于该磁盘):
MBR Magic : aa55
Partition[0] : 594342 sectors at 63 (type 83)
Partition[1] : 996030 sectors at 594405 (type 83)
Partition[3] : 975177630 sectors at 1590435 (type 05)
/dev/sdf1:
Magic : a92b4efc
Version : 0.90.00
UUID : c095f89e:9b0361e2:811403e5:de6bdc08
Creation Time : Fri May 30 10:44:30 2008
Raid Level : raid1
Used Dev Size : 297088 (290.13 MiB 304.22 MB)
Array Size : 297088 (290.13 MiB 304.22 MB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 0
Update Time : Sat Jul 23 04:52:57 2011
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 1
Spare Devices : 0
Checksum : fab347e0 - correct
Events : 871
Number Major Minor RaidDevice State
this 2 8 1 2 active sync /dev/sda1
0 0 8 33 0 active sync
1 1 8 17 1 active sync
2 2 8 1 2 active sync /dev/sda1
3 3 0 0 3 faulty removed
/dev/sdf2:
Magic : a92b4efc
Version : 0.90.00
UUID : 368a4374:23c334f1:cb272099:0827c1c2
Creation Time : Fri May 30 10:44:31 2008
Raid Level : raid1
Used Dev Size : 497920 (486.25 MiB 509.87 MB)
Array Size : 497920 (486.25 MiB 509.87 MB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 1
Update Time : Sat Jul 23 04:57:37 2011
State : active
Active Devices : 3
Working Devices : 3
Failed Devices : 1
Spare Devices : 0
Checksum : 707d0f08 - correct
Events : 54762505
Number Major Minor RaidDevice State
this 1 8 2 1 active sync /dev/sda2
0 0 8 34 0 active sync
1 1 8 2 1 active sync /dev/sda2
2 2 8 18 2 active sync
3 3 0 0 3 faulty removed
/dev/sdf4:
MBR Magic : aa55
Partition[0] : 273042 sectors at 63 (type 82)
Partition[1] : 974631420 sectors at 273105 (type 05)
mdadm: No md superblock detected on /dev/sdf5.
/dev/sdf6:
Magic : a92b4efc
Version : 0.90.00
UUID : 9b990924:10915d87:0073689c:05407c1c
Creation Time : Fri May 30 03:26:54 2008
Raid Level : raid5
Used Dev Size : 487315584 (464.74 GiB 499.01 GB)
Array Size : 1461946752 (1394.22 GiB 1497.03 GB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 2
Update Time : Sat Jul 23 12:45:47 2011
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 1
Spare Devices : 0
Checksum : 10f1fb29 - correct
Events : 20490276
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 0 8 38 0 active sync
0 0 8 38 0 active sync
1 1 8 54 1 active sync
2 2 8 70 2 active sync
3 3 0 0 3 faulty removed