所以我有一个带有两个硬盘的RAID 1。一个硬盘失败了,然后我更换了它,在这个新硬盘上重新安装了一个新的Linux。
现在,如果我输入fdisk -l,就会得到:
root@ns354729:/mnt/sdb2# fdisk -l
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0xbb5259be
Device Boot Start End Blocks Id System
/dev/sda1 * 4096 1495042047 747518976 83 Linux
/dev/sda2 1495042048 1496088575 523264 82 Linux swap / Solaris
Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 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: 0x00025c91
Device Boot Start End Blocks Id System
/dev/sdb1 4096 20975616 10485760+ fd Linux raid autodetect
/dev/sdb2 20975617 1464092672 721558528 fd Linux raid autodetect
/dev/sdb3 1464092673 1465144064 525696 82 Linux swap / Solaris我想访问第二个硬盘(sdb),所以我尝试像这样挂载sdb2:
mount /dev/sdb2 /mntTHis说:
root@ns354729:/mnt/sdb2# mount /dev/sdb2 /mnt
mount: block device /dev/sdb2 is write-protected, mounting read-only
mount: you must specify the filesystem type所以我试着给:
mount -t ext4 /dev/sdb2 /mnt我得到了:
mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so这上面写着:
root@ns354729:/mnt/sdb2# dmesg | tail
ufs_read_super: bad magic number
VFS: Can't find a romfs filesystem on dev sdb2.
UDF-fs: warning (device sdb2): udf_load_vrs: No VRS found
UDF-fs: warning (device sdb2): udf_fill_super: No partition found (2)
XFS (sdb2): Invalid superblock magic number
(mount,18813,1):ocfs2_fill_super:1038 ERROR: superblock probe failed!
(mount,18813,1):ocfs2_fill_super:1229 ERROR: status = -22
GFS2: not a GFS2 filesystem
GFS2: gfs2 mount does not exist
EXT4-fs (sdb2): VFS: Can't find ext4 filesystem有什么帮助吗?
发布于 2016-08-03 21:03:24
您需要组装(降级的) RAID数组,使用如下所示:
mdadm --assemble --readonly /dev/md0 /dev/sdb2当然,如果md0已经在使用,那么除了选择一个数字之外,还可以选择一个数字。然后您可以挂载/dev/md0 (或者,如果它实际上是LVM,等等,则继续向下链)。
在RAID1的情况下,您也可以使用回环设备&偏移量来实现这一点,但这要痛苦得多,而且只有在mdadm元数据被销毁的情况下才值得尝试。
发布于 2021-02-21 22:03:34
我发现德罗伯特氏的答案很有帮助,但我需要更多:
来自一个新的系统,以前从未通过USB驱动器端口将两个驱动器连接到外部的数组:
sudo apt update && sudo apt install mdadm -y
sudo mdadm --examine /dev/sd*
[output of above command showed two drives that were members of the original raid array, one a PARTITION, the other the entire device]
sudo mdadm --assemble /dev/md1 /dev/sdb1 dev/sdc --run
mdadm: /dev/sdb1 is busy - skipping
mdadm: /dev/md1 assembled from 1 drive - need all 2 to start it (use --run to insist).
sudo mdadm --assemble /dev/md1 /dev/sdb1 /dev/sdc --run
mdadm: /dev/sdb1 is busy - skipping
mdadm: /dev/md1 has been started with 1 drive (out of 2).
sudo mount /dev/md1 /mnt/md1
cd /mnt/md1
ls
backup lost+found pictures rsnapshot然后,我能够使用rsync将数据从单个挂载的raid成员/dev/sdc复制到另一个系统上经过验证的良好驱动器。
发布于 2017-07-26 14:10:08
看起来您有一个新的2gig,非RAID磁盘,并且您正在尝试读取一个旧的750 G RAID磁盘的内容。如果是这样的话,你可以这样做:
ls -l /dev/md/在我们的例子中,返回了以下内容:
total 0
lrwxrwxrwx 1 root root 8 Jul 26 08:30 sp:0 -> ../md126
lrwxrwxrwx 1 root root 8 Jul 26 08:30 sp:1 -> ../md127然后,我能够挂载阅读所需的分区:
mount /dev/md/sp:0 /mnt在上面的例子中,我相信在创建时,sp:0和sp:1是我命名的RAID分区。
https://unix.stackexchange.com/questions/300122
复制相似问题