View previous topic :: View next topic |
Author |
Message |
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 3:32 am Post subject: [Raid1] mdadm - Bad magic number in super-block while... |
|
|
Setup:
- 2 disque de 3TB remplie de photos de mon fils + fichiers importants
- raid 1 pour plus de sécurité "matériel"
- Aucun backup externe "J'ai acteté un 3TB usb pour des cold backup, mais aucun backup.. AGGGRRRrrrr"
- Un reboot et puis paf ... plus capable d'accéder au disque
J'ai épluché google pendant toute la fin de semaine, rien a faire!
Et je ne peut me premettre de perdre les données sur le disque.
A L'AIDE...
Code: | POK6 ~ # fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
Disk /dev/sdd: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdd1 1 2930277167 1465138583+ ee GPT
Disk /dev/sde: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 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: 0x0008488f
Device Boot Start End Blocks Id System
/dev/sde1 * 2048 264191 131072 83 Linux
/dev/sde2 264192 8652799 4194304 82 Linux swap / Solaris
/dev/sde3 8652800 117231407 54289304 83 Linux |
Code: | POK6 ~ # mdadm --examine /dev/sda1
/dev/sda1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a0418036:3b2a859f:80576533:d588528d
Name : POK6:0 (local to host POK6)
Creation Time : Sun May 20 01:26:41 2012
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 5860268032 (2794.39 GiB 3000.46 GB)
Array Size : 2930133824 (2794.39 GiB 3000.46 GB)
Used Dev Size : 5860267648 (2794.39 GiB 3000.46 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
State : clean
Device UUID : b217be5c:ac8473e6:dd535d83:5f3d39ec
Update Time : Mon May 21 19:39:26 2012
Checksum : 82cbca20 - correct
Events : 56
Device Role : Active device 1
Array State : .A ('A' == active, '.' == missing)
POK6 ~ # mdadm --examine /dev/sdb1
/dev/sdb1:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : a0418036:3b2a859f:80576533:d588528d
Name : POK6:0 (local to host POK6)
Creation Time : Sun May 20 01:26:41 2012
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 5860268032 (2794.39 GiB 3000.46 GB)
Array Size : 2930133824 (2794.39 GiB 3000.46 GB)
Used Dev Size : 5860267648 (2794.39 GiB 3000.46 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 2a9cca72:681b0fb9:e10339fd:d1ac8699
Update Time : Mon May 21 19:39:26 2012
Checksum : 929d04c7 - correct
Events : 56
Device Role : Active device 0
Array State : A. ('A' == active, '.' == missing) |
Code: | POK6 ~ # mdadm --assemble --scan -v
mdadm: looking for devices for /dev/md0
mdadm: no recogniseable superblock on /dev/md0
mdadm: cannot open device /dev/sr0: No medium found
mdadm: no recogniseable superblock on /dev/sdf3
mdadm: no recogniseable superblock on /dev/sdf2
mdadm: Cannot assemble mbr metadata on /dev/sdf1
mdadm: Cannot assemble mbr metadata on /dev/sdf
mdadm: no recogniseable superblock on /dev/sde3
mdadm: no recogniseable superblock on /dev/sde2
mdadm: no recogniseable superblock on /dev/sde1
mdadm: Cannot assemble mbr metadata on /dev/sde
mdadm: no recogniseable superblock on /dev/sdd1
mdadm: Cannot assemble mbr metadata on /dev/sdd
mdadm: Cannot assemble mbr metadata on /dev/sdc2
mdadm: Cannot assemble mbr metadata on /dev/sdc1
mdadm: Cannot assemble mbr metadata on /dev/sdc
mdadm: no RAID superblock on /dev/sdb
mdadm: /dev/sda1 is busy - skipping
mdadm: no RAID superblock on /dev/sda
mdadm: /dev/md0 is already in use.
|
Code: | POK6 ~ # mdadm --detail --scan
ARRAY /dev/md0 metadata=1.2 name=POK6:0 UUID=a0418036:3b2a859f:80576533:d588528d |
Code: | POK6 ~ # cat /etc/mdadm.conf | grep md0
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=a0418036:3b2a859f:80576533:d588528d |
Code: | POK6 ~ # cat /etc/fstab | grep md0
/dev/md0 /mnt/data/hdd_01/ ext4 noatime 0 1 |
Code: | POK6 ~ # mount -t ext4 /dev/md0 /mnt/data/hdd_01/
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so |
Code: | POK6 ~ # fsck -n /dev/md0
fsck from util-linux 2.21.1
e2fsck 1.42.1 (17-Feb-2012)
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/md0
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
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> |
|
|
Back to top |
|
|
netfab Veteran
Joined: 03 Mar 2005 Posts: 1902 Location: 127.0.0.1
|
Posted: Tue May 22, 2012 8:28 am Post subject: |
|
|
Et tu as essayé de restaurer manuellement le superblock depuis un backup, comme indiqué dans le dernier message ?
Quote: |
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
|
L'option -b de e2fsck (exemple)
(il y a 2 sortes d'admin, ceux qui n'ont jamais eu de crash disque, et ceux qui font leurs backups)
Bonne chance. |
|
Back to top |
|
|
scherz0 Apprentice
Joined: 02 Oct 2008 Posts: 154
|
Posted: Tue May 22, 2012 9:24 am Post subject: |
|
|
netfab wrote: | Et tu as essayé de restaurer manuellement le superblock depuis un backup, comme indiqué dans le dernier message ? |
Non. Il est préférable de ne rien écrire sur les disques tant que le problème n'est pas identifié. Si md0 n'a pas été assemblé correctement, c'est logique qu'il semble ne pas contenir un FS correct.
Cette opération risque d'écrire des données aléatoires sur les disques.
Dans cette situation : pas de précipitation, et pas d'opération irréversible. |
|
Back to top |
|
|
netfab Veteran
Joined: 03 Mar 2005 Posts: 1902 Location: 127.0.0.1
|
Posted: Tue May 22, 2012 9:47 am Post subject: |
|
|
C'est vrai. Je suis allé un peu vite sur ce coup là.
Quote: |
Un reboot et puis paf ...
|
Et tu as fait quoi avant le reboot ? mises à jour ? quelle version du kernel, quelle version de mdadm ? ton emerge --info ? |
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 12:25 pm Post subject: |
|
|
Quote: | Et tu as fait quoi avant le reboot ? |
J'ai changé mes interface réseau pour faire fonctionner Virtualbox
Peutêtre, la machine n'avit pas redémarer depuis un certain temps. Toutefois, il est vrai que j'ai fait des updates
Quote: | quelle version du kernel ? |
Code: | POK6 ~ # uname --all
Linux POK6 3.3.1-gentoo #4 SMP Sun Apr 15 09:30:17 EDT 2012 x86_64 AMD Phenom(tm) 9600 Quad-Core Processor AuthenticAMD GNU/Linux |
Quote: | quelle version de mdadm ? |
Code: | POK6 ~ # mdadm -V
mdadm - v3.2.4 - 9th May 2012 |
Quote: | ton emerge --info ? |
Code: | POK6 ~ # emerge --info
Portage 2.1.10.62 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.15-r2, 3.3.1-gentoo x86_64)
=================================================================
System uname: Linux-3.3.1-gentoo-x86_64-AMD_Phenom-tm-_9600_Quad-Core_Processor-with-gentoo-2.1
Timestamp of tree: Tue, 22 May 2012 03:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.7 [enabled]
app-shells/bash: 4.2_p28
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.3-r2, 3.2.3
dev-util/ccache: 3.1.7
dev-util/cmake: 2.8.8-r2
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.1-r1
sys-apps/openrc: 0.9.9.3
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.69
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.5
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.5.3-r2
sys-devel/gcc-config: 1.7.1
sys-devel/libtool: 2.4.2
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc: 2.15-r2
Repositories: gentoo x-layman sabayon
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/maven-bin-3.0/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.arcticnetwork.ca/ http://gentoo.gossamerhost.com rsync://gentoo.gossamerhost.com/gentoo-distfiles/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US linguas_en fr fr_CA linguas_fr"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman /var/lib/layman/sabayon"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 amr apache apache2 apng aspell berkdb bluetooth bonjour bzip2 cairo caps cgi cgid cli cman consolekit cracklib crypt ctype cuda cups curl cxx dbus divx dri encode exif expat extras faac ffmpeg filter fontconfig fortran ftp fuse gd gd-externa gdbm geoip gif gnutls google google-gadgets gpm gps gstreamer gz hal health html http httpd https iconv inotify ipv4 ipv6 jadetex java javascript jboss jpeg jpg js json lastfm libdvdread libnotify lm_sensors log mailwrapper matroska md5sum memcache minizip mmx mng modules mp3 mp4 mpeg mpi-threads mudflap multilib mysql mysqli ncurses nls nptl nptlonly nvidia odbc opengl openmp openssl pam pcre perl phonon php pic png posix pppd pulseaudio pvr python qt3support readline rss samba savedconfig semantic-desktop session setup sftp sip skin slp snmp spl sql sse sse2 ssh ssl static-libs svg svnserve syslog taglib tar tcpd threads thumbnail tiff tk truetype udev unicode upnp usb utils vhosts video vlc webdav webkit wifi xhtml xorg xscreensaver xsl xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias auth_basic expires" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="earthmate evermore gpsclock itrax nmea ntrip oceanserver oldstyle oncore superstar2 timing tnt tripmate tsip ubx" INPUT_DEVICES="synaptics evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US linguas_en fr fr_CA linguas_fr" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON |
|
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 12:46 pm Post subject: |
|
|
Dans un monde idéal, je récupère mes données et ensuite je répare le bobo.
Comme c'est un raid1 les 2 disque sont quasi identique. Mais je ne suis pas capable de les monter individuellement. Est-ce qu'il existe une manière pour voir le contenu du disque.
J'aimerais juste tout backuper sur le 3TB usb et formater mon raid pour le refaire ...! |
|
Back to top |
|
|
guilc Bodhisattva
Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue May 22, 2012 1:22 pm Post subject: |
|
|
Primo, je vois des disques GPT, donc fdisk aide en rien.
Please, histoire d'y voir clair, un petit :
Code: | gdisk -l /dev/sda
gdisk -l /dev/sdb |
Deuxio, GPT + kernel mis à jour me dit... support GPT dans le kernel configuré ? Il l'était peut-être dans l'ancien kernel mais pas le nouveau !
Code: | zgrep CONFIG_EFI_PARTITION /proc/config.gz |
_________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
|
RaX Apprentice
Joined: 16 Aug 2007 Posts: 166
|
Posted: Tue May 22, 2012 1:31 pm Post subject: |
|
|
Salut,
As-tu essayé de ne monter le raid qu'avec un seul disque ?
# mdadm --stop /dev/md0
# mdadm --assemble /dev/md0 /dev/sda1 --run
# mount /dev/md0 /mnt/data/hdd_01
Essayer avec sdb1 si pas de mieux.
A noter que cette action va casser ton raid et qu'il faudra donc que ré-ajoute la partition manquante dans le raid1 après avoir éventuellement récupéré tes données. (mdadm --manage --add /dev/md0 /dev/sdXX)
Bonne chance. |
|
Back to top |
|
|
RaX Apprentice
Joined: 16 Aug 2007 Posts: 166
|
Posted: Tue May 22, 2012 5:24 pm Post subject: |
|
|
J'ajoute aussi qu'un bon test serait de pouvoir booter sur SystemRescueCD par exemple pour exclure/confirmer un problème logiciel. |
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 5:27 pm Post subject: |
|
|
guilc wrote: | Primo, je vois des disques GPT, donc fdisk aide en rien.
Please, histoire d'y voir clair, un petit :
Code: | gdisk -l /dev/sda
gdisk -l /dev/sdb |
|
Code: | POK6 ~ # gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.4
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 6DF3C9F1-7B33-4748-B8EA-D80D86E81FED
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 5860532223 2.7 TiB 0700
POK6 ~ # gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.4
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 267AD846-E961-4F6E-84BA-3FAEC97E5F7A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 5860532223 2.7 TiB 0700 |
guilc wrote: | Deuxio, GPT + kernel mis à jour me dit... support GPT dans le kernel configuré ? Il l'était peut-être dans l'ancien kernel mais pas le nouveau !
Code: | zgrep CONFIG_EFI_PARTITION /proc/config.gz |
|
Code: | POK6 ~ # cat /usr/src/linux/.config | grep CONFIG_EFI_PARTITION
CONFIG_EFI_PARTITION=y |
|
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 5:28 pm Post subject: |
|
|
RaX wrote: | Salut,
As-tu essayé de ne monter le raid qu'avec un seul disque ?
# mdadm --stop /dev/md0
# mdadm --assemble /dev/md0 /dev/sda1 --run
# mount /dev/md0 /mnt/data/hdd_01
Essayer avec sdb1 si pas de mieux.
A noter que cette action va casser ton raid et qu'il faudra donc que ré-ajoute la partition manquante dans le raid1 après avoir éventuellement récupéré tes données. (mdadm --manage --add /dev/md0 /dev/sdXX)
Bonne chance. |
Quel est l'effet de briser le raid?
Est-ce que c'est réversible? |
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 5:29 pm Post subject: |
|
|
RaX wrote: | J'ajoute aussi qu'un bon test serait de pouvoir booter sur SystemRescueCD par exemple pour exclure/confirmer un problème logiciel. |
J'ai essayé {Gentoo liveCD + chroot} et c'est la même chose. Impossible de monter /dev/mdo |
|
Back to top |
|
|
Poussin l33t
Joined: 08 Jun 2007 Posts: 659 Location: Liège
|
Posted: Tue May 22, 2012 6:05 pm Post subject: |
|
|
Je ne vais pas dire que ça me fait plaisir, mais je me sens moins seul.
Quelques précisions, je suis personnellement en RAID5.
Extrait de mon rc.log:
Code: |
* Starting up RAID devices ...
* mdadm main: failed to get exclusive lock on mapfile
mdadm: /dev/md0 is already in use.
[ !! ]
* Setting up the Logical Volume Manager ...
File-based locking initialisation failed.
* Failed to setup the LVM
[ !! ]
* ERROR: lvm failed to start
* Checking local filesystems ...
/sbin/fsck.xfs: XFS file system.
/dev/sda1: clean, 59/16384 files, 45544/65536 blocks
/sbin/fsck.xfs: UUID=0982023f-a4a6-4b1a-ad03-c79b93eb3262 does not exist
Failed to open the device 'UUID=ba450c5d-88b5-4a0f-94ca-2bbed09fccca': No such file or directory
* Operational error
[ !! ]
* Remounting root filesystem read/write ...
[ ok ]
|
C'est louche ces problèmes de locking. Certains volumes LVM sont sur le raid, d'autres non. Meme le VG ne contenant aucun espace du RAID foire... sauf qu'au runlevel default, lvm se relance (tiens pourquoi...?) et ensuite je dois monter les LV à la main (mount -a)
Je ne sais pas trop si les problèmes sont liés |
|
Back to top |
|
|
scherz0 Apprentice
Joined: 02 Oct 2008 Posts: 154
|
Posted: Tue May 22, 2012 6:29 pm Post subject: |
|
|
pokstar, ce raid1 est-il partitionné ? D'après les infos que tu as données il semble que non.
Dans ce cas, essaie d'arrêter md0, puis de monter sda1 en read-only |
|
Back to top |
|
|
Poussin l33t
Joined: 08 Jun 2007 Posts: 659 Location: Liège
|
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 7:00 pm Post subject: |
|
|
scherz0 wrote: | pokstar, ce raid1 est-il partitionné ? D'après les infos que tu as données il semble que non. |
Code: | POK6 ~ # fdisk -l /dev/sda
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.
POK6 ~ # fdisk -l /dev/sdb
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary. |
scherz0 wrote: | Dans ce cas, essaie d'arrêter md0, puis de monter sda1 en read-only |
Est-ce que c'est comme sa?
Code: | mdadm --stop /dev/md0
mount -t ext4 -ro /dev/sda1 /mnt/data/hdd_01 |
|
|
Back to top |
|
|
guilc Bodhisattva
Joined: 15 Nov 2003 Posts: 3326 Location: Paris - France
|
Posted: Tue May 22, 2012 7:14 pm Post subject: |
|
|
Rappel : inutile de donner des fdisk -l : avec des partitions GPT, ça ne marche pas c'est gdisk (ou parted) qui servent
pokstar wrote: |
Est-ce que c'est comme sa?
Code: | mdadm --stop /dev/md0
mount -t ext4 -ro /dev/sda1 /mnt/data/hdd_01 |
|
Non : mount -t ext4 -o ro /dev/sda1 /mnt/data/hdd_01 _________________ Merci de respecter les règles du forum.
Mon site perso : https://www.xwing.info
Mon PORTDIR_OVERLAY : https://gentoo.xwing.info ou layman -a xwing |
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Tue May 22, 2012 8:31 pm Post subject: |
|
|
guilc wrote: | ...
Non : mount -t ext4 -o ro /dev/sda1 /mnt/data/hdd_01 |
Code: | POK6 ~ # mount -t ext4 -o ro /dev/sda1 /mnt/data/hdd_01
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 |
Sa regarde mal
Est-ce que je peut réparer l'erreur bad superblock on /dev/sda1? |
|
Back to top |
|
|
ghoti Advocate
Joined: 30 Dec 2002 Posts: 3634 Location: Belgium
|
Posted: Tue May 22, 2012 11:17 pm Post subject: |
|
|
pokstar wrote: | Est-ce que je peut réparer l'erreur bad superblock on /dev/sda1? |
Comme on l'a dit plus haut, ne travaille surtout pas directement sur la partition. Un fsck est irréversible !
Fais d'abord une copie binaire (dd) de la partition vers un fichier et travaille plutôt sur ce fichier de secours.
La raison du "bad superblock", tient au fait que madm a été écrire son propre superblock (format version 1.2 d'après tes infos) dans les 4 premiers K de la partition, zone d'habitude utilisée par le filesystem pour y écrire son propre superblock.
Sur le volume raid, le superblock du fs est à la bonne place mais il est décalé du point de vue d'une partition simple.
Pour info, avec certains anciens formats de superblock RAID, ce décalage ne se produisait pas car les données étaient écrites à la fin de la partition.
Plus de détails ici : https://raid.wiki.kernel.org/index.php/RAID_superblock_formats
Je ne sais pas si un fsck va permettre de rétablir immédiatement la situation mais c'est à essayer.
Une autre approche serait de tronquer les quatre premiers K du fichier de secours afin de supprimer le décalage.
Mais au risque d'être lourd : travaille sur le fichier de secours ! C'est une ancienne victime qui parle ! |
|
Back to top |
|
|
Poussin l33t
Joined: 08 Jun 2007 Posts: 659 Location: Liège
|
Posted: Wed May 23, 2012 5:59 am Post subject: |
|
|
Alors, chezmoiçaamarché... :
Code: |
mdadm --stop /dev/md0
rm /etc/mdadm.conf
mdadm --examine --scan > /etc/mdadm.conf
mdadm --assemble /dev/md0
|
Je suis ça d'un vgchange qui va bien et d'un mount -a et tout est OK.
Par contre, ça ne fonctionne que jusqu'au reboot. Je vais tenter de désactiver l'autodetect au boot (raid="noautodetect" ou un truc comme ça a passer au kernel), mais je n'ai pas eu le temps hier soir, je teste en rentrant du boulot. |
|
Back to top |
|
|
scherz0 Apprentice
Joined: 02 Oct 2008 Posts: 154
|
Posted: Wed May 23, 2012 6:52 am Post subject: |
|
|
pokstar, est-ce que l'une des commandes suivantes rend autre chose que "Couldn't find valid filesystem superblock" ?
Code: | dumpe2fs /dev/sda1 -o superblock=8193 |
Code: | dumpe2fs /dev/sda1 -o superblock=16384 |
Code: | dumpe2fs /dev/sda1 -o superblock=32768 |
|
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Wed May 23, 2012 2:02 pm Post subject: |
|
|
scherz0 wrote: | pokstar, est-ce que l'une des commandes suivantes rend autre chose que "Couldn't find valid filesystem superblock" ? |
scherz0 wrote: | Code: | dumpe2fs /dev/sda1 -o superblock=8193 |
|
Code: | POK6 ~ # dumpe2fs /dev/sda1 -o superblock=8193
dumpe2fs 1.42.1 (17-Feb-2012)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sda1
Couldn't find valid filesystem superblock. |
scherz0 wrote: | Code: | dumpe2fs /dev/sda1 -o superblock=16384 |
|
Code: | POK6 ~ # dumpe2fs /dev/sda1 -o superblock=16384
dumpe2fs 1.42.1 (17-Feb-2012)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sda1
Couldn't find valid filesystem superblock. |
scherz0 wrote: | Code: | dumpe2fs /dev/sda1 -o superblock=32768 |
|
Code: | POK6 ~ # dumpe2fs /dev/sda1 -o superblock=32768
dumpe2fs 1.42.1 (17-Feb-2012)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: a668eb1f-539d-425b-9a6b-dfced3cb1ed1
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: not clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 183148544
Block count: 732566272
Reserved block count: 36628313
Free blocks: 721019450
Free inodes: 183148533
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 849
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Wed Feb 29 02:58:09 2012
Last mount time: n/a
Last write time: Wed Feb 29 02:58:13 2012
Mount count: 0
Maximum mount count: -1
Last checked: Wed Feb 29 02:58:09 2012
Check interval: 0 (<none>)
Lifetime writes: 137 MB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: 64bcea74-7a9b-4231-a58d-dff58580313d
Journal backup: inode blocks
Journal superblock magic number invalid! |
|
|
Back to top |
|
|
scherz0 Apprentice
Joined: 02 Oct 2008 Posts: 154
|
Posted: Wed May 23, 2012 3:06 pm Post subject: |
|
|
Code: | mount -r -o sb=131072 /dev/sda1 /mnt/data/hdd_01 |
Si ça ne passe pas :
Code: | mount -r -o sb=131072,noload /dev/sda1 /mnt/data/hdd_01 |
|
|
Back to top |
|
|
pokstar n00b
Joined: 22 May 2012 Posts: 20
|
Posted: Wed May 23, 2012 3:36 pm Post subject: |
|
|
Salut scherz0,
Est-ce que tu peux m'expliquer les commandes? |
|
Back to top |
|
|
scherz0 Apprentice
Joined: 02 Oct 2008 Posts: 154
|
Posted: Wed May 23, 2012 3:50 pm Post subject: |
|
|
man mount
Ça fonctionne, ou pas ? |
|
Back to top |
|
|
|