Portál AbcLinuxu, 4. listopadu 2025 08:34
Řešení dotazu:
root@ubuntu:/home/ubuntu# mount -t ext4 -o ro /dev/sda2 /backup/
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
mdadm vytvořit RAID 1 pole s jedním diskem (degradované) a tím vznikne /dev/md123 - další fyzické zařízení a to se mountuje. možná ho tam už i máš.
mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdb1 missing
fdisk /dev/md1
Command (m for help): p
Disk /dev/md0: 70.0 GB, 70025936896 bytes
2 heads, 4 sectors/track, 17096176 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x34814bf5
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-17096176, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-17096176, default 17096176):
Using default value 17096176
Command (m for help): p
Disk /dev/md0: 70.0 GB, 70025936896 bytes
2 heads, 4 sectors/track, 17096176 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x34814bf5
Device Boot Start End Blocks Id System
/dev/md0p1 1 17096176 68384702 83 Linux
ale kdyz jsem to zkusil pripojit tak to dopadlo zase stejne:
root@ubuntu:/home/ubuntu# mount -t ext4 -o ro /dev/md0p1 /backup/
mount: wrong fs type, bad option, bad superblock on /dev/md0p1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
mdadm --create sa vytvára nové pole. Pôvodný raid si tým možno už zabil. Na poskladanie havarovaného poľa slúži mdadm --assemble
fdisk -l
cat /proc/mdstat
cat /etc/mdadm/mdadm.conf+ vypisy z logu /var/log/messages z doby, kdy to pole behalo a ted.
root@ubuntu:/home/ubuntu# fdisk -l Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00033ad1 Device Boot Start End Blocks Id System /dev/sda1 * 1 1216 9764864 fd Linux raid autodetect /dev/sda2 1216 9730 68384768 fd Linux raid autodetect*******************
root@ubuntu:/home/ubuntu# cat /proc/mdstat Personalities : unused devices: none******************* Ten posledni soubor neexistuje. Raid jsem nastavoval behem instalace Ubuntu a ne pomoci mdadm. Ted pracuji na live CD ubuntu.
fdisk /dev/sda2 Command (m for help): t No partition is defined yet! Command (m for help):
fdisk /dev/sda Command (m for help): p Device Boot Start End Blocks Id System /dev/sda1 1 1216 9764864 fd Linux raid autodetect /dev/sda2 1216 9730 68384768 fd Linux raid autodetect Command (m for help): t Partition number (1-4): 1 Hex code (type L to list codes): 83 Command (m for help): p Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00033ad1 Device Boot Start End Blocks Id System /dev/sda1 1 1216 9764864 83 Linux /dev/sda2 1216 9730 68384768 fd Linux raid autodetectTak to se povedlo, ale Zadna zmena u mount:
root@ubuntu:/home/ubuntu# mount -t ext4 /dev/sda1 /backup/
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
root@ubuntu:/home/ubuntu# mdadm --examine /dev/sda2
/dev/sda2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : e5cb84f0:a7c87e70:04b5dd61:64d01b73
Name : ubuntu:1 (local to host ubuntu)
Creation Time : Tue Oct 30 19:27:29 2012
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 136638464 (65.15 GiB 69.96 GB)
Array Size : 136587008 (65.13 GiB 69.93 GB)
Used Dev Size : 136587008 (65.13 GiB 69.93 GB)
Data Offset : 131072 sectors
Super Offset : 8 sectors
State : active
Device UUID : 187f41fc:584f0f1d:9264cc51:2bc4d615
Update Time : Tue Oct 30 19:57:04 2012
Checksum : b1d8b911 - correct
Events : 7
Array Slot : 1 (0, 1, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed, failed)
Array State : uU 126 failed
root@ubuntu:/home/ubuntu#
mdadm --assemble /dev/md0 /dev/sda2 missing
mount -t ext4 -o ro /dev/md0 /backup/
To mdadm bude mozna chtit --force.
Pozor, nepouzivat --create nebo --build, vytvari novy raid => znici puvodni!
Creation Time : Tue Oct 30 19:27:29 2012a pokud neni bitova zaloha dat, tak uz to muze byt docela strelba na slepo pokusit se ty data zachranit. pokud bylo to --create spustene pouze na sda2, tak by jsme mohli jeste nejake dulezite udaje vycist z
mdadm --examine /dev/sda1jak bylo to puvodni pole vytvorene? Priblizne kdy / v jake distribuci? Jde o to, zda tam puvodne nebyl napriklad raid s verzi metadat 0.90 nebo 1.0, pricemz nove live CD vytvareji automaticky metadata verze 1.2 a tim prepisuji prvnich 2 MB dat. Pak se daji data zachranit jeste tak, ze se vytvori pole s verzi metadat 0.90 a spusti se na to fsck.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.