ich habe zwei 2TB Festplatten, auf denen Debian als Softraid eingerichtet ist. Der PC lief etliche Jahre nicht, jetzt wollte ich eine HDD davon unter einem anderen Debian 12 mounten, was aber nicht klappt. Ich habe zuerst mal eine Kopie der HDD mit dd gemacht, es kann also nichts passieren. Ich vermute, einmal habe ich sie mir schon mit e2fsck zerschossen.
Code: Alles auswählen
mdadm --stop /dev/md127
e2fsck /dev/sdb2 -y
Informationen:
Code: Alles auswählen
root@Mini-PC:~# fdisk -l
[...]
Disk /dev/sdb: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: IB-1232CL-U3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 19531775 19529728 9,3G 82 Linux swap / Solaris
/dev/sdb2 19531776 3907028991 3887497216 1,8T fd Linux raid autodetect
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : inactive sdb2[3](S)
1943617536 blocks super 1.2
unused devices: <none>
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# mdadm --detail --scan --verbose
INACTIVE-ARRAY /dev/md127 num-devices=1 metadata=1.2 name=nas:0 UUID=9017c714:2de40547:30949c89:eb86b030
devices=/dev/sdb2
root@Mini-PC:~#
Fehlermeldung:
Code: Alles auswählen
root@Mini-PC:~# mount /dev/md127 /mnt/alte-nas-platte/
mount: /mnt/alte-nas-platte: can't read superblock on /dev/md127.
dmesg(1) may have more information after failed mount system call.
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# dmesg -e
[...]
[Sep 2 06:32] EXT4-fs (md127): unable to read superblock
[...]
https://linuxexpresso.wordpress.com/201 ... in-ubuntu/
Code: Alles auswählen
root@Mini-PC:~# fsck.ext4 -v /dev/sdb
e2fsck 1.47.0 (5-Feb-2023)
/dev/sdb is in use.
e2fsck: Cannot continue, aborting.
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# fsck.ext4 -v /dev/sdb
e2fsck 1.47.0 (5-Feb-2023)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdb
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Found a dos partition table in /dev/sdb
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# mke2fs -n /dev/sdb
mke2fs 1.47.0 (5-Feb-2023)
/dev/sdb is apparently in use by the system; will not make a filesystem here!
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
root@Mini-PC:~# mke2fs -n /dev/sdb
mke2fs 1.47.0 (5-Feb-2023)
Found a dos partition table in /dev/sdb
Proceed anyway? (y,N) y
Creating filesystem with 488378646 4k blocks and 122101760 inodes
Filesystem UUID: 30694072-17d5-445b-afcf-65c409477798
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
root@Mini-PC:~#
Code: Alles auswählen
root@Mini-PC:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
root@Mini-PC:~# e2fsck -b 32768 /dev/sdb
e2fsck 1.47.0 (5-Feb-2023)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Found a dos partition table in /dev/sdb
root@Mini-PC:~#
Weiterer Versuch (statt /dev/sdb dieses mal mit /dev/sdb2):
Code: Alles auswählen
root@Mini-PC:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
root@Mini-PC:~# mke2fs -n /dev/sdb2
mke2fs 1.47.0 (5-Feb-2023)
/dev/sdb2 contains a linux_raid_member file system labelled 'nas:0'
Proceed anyway? (y,N) y
Creating filesystem with 485937152 4k blocks and 121487360 inodes
Filesystem UUID: fb081b2e-bb9d-44f4-a91c-5d6c759a9120
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
root@Mini-PC:~# e2fsck -b 32768 /dev/sdb2
e2fsck 1.47.0 (5-Feb-2023)
/dev/sdb2 is in use.
e2fsck: Cannot continue, aborting.
root@Mini-PC:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
root@Mini-PC:~# e2fsck -b 32768 /dev/sdb2
e2fsck 1.47.0 (5-Feb-2023)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb2
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
/dev/sdb2 contains a linux_raid_member file system labelled 'nas:0'
root@Mini-PC:~#