View previous topic :: View next topic |
Author |
Message |
sylvain.bonnemaison Apprentice
Joined: 13 Jan 2008 Posts: 152
|
Posted: Sun Oct 02, 2011 9:36 am Post subject: [raid] mdadm ne trouve plus les partitions (résolu) |
|
|
Bonjour,
Depuis la recompilation de mes kernel 2.6.38 et 2.6.39, le système ne démarre plus. Lors du démarrage, le système indique qu'il trouve bien les partition sda et sdb, et ensuite il indique les partitions /dev/md/1_00 et /dev/md/3_00. Avant la recompilation du kernel, les partitions radis étaient /dev/md1 et /dev/md3.
Ce changement de nom est-il normal ?
Est-ce un probleme du fichier /etc/mdadm.conf ?
Merci
Last edited by sylvain.bonnemaison on Wed Oct 19, 2011 8:16 am; edited 1 time in total |
|
Back to top |
|
|
GentooUser@Clubic l33t
Joined: 01 Nov 2004 Posts: 829
|
Posted: Sun Oct 02, 2011 10:07 am Post subject: |
|
|
Ce changement dois être normal, j'ai eu le même, par contre ça ne m'a posé aucun problème de boot.
Quelle est ta configuration précise de démarrage ? (partitionnement, options genkernel, ligne de commande du noyau, contenu du /etc/fstab...) |
|
Back to top |
|
|
sylvain.bonnemaison Apprentice
Joined: 13 Jan 2008 Posts: 152
|
Posted: Mon Oct 03, 2011 7:04 am Post subject: |
|
|
Maintenant je ne peux même plus démarrer à partir d'un cd live Gentoo. J'ai l'erreur suivante :
Quote: | Could not find the root block device in. |
J'ai réussi de démarré avec un live cd ubuntu 11.4. Voici les fichiers de config ci-après.
partitionnement:
Quote: | /dev/sda1 1 5 40131 83 Linux
/dev/sda2 6 1311 10490445 83 Linux
/dev/sda3 1312 121601 966229425 83 Linux
/dev/sdb1 1 5 40131 83 Linux
/dev/sdb2 6 1311 10490445 83 Linux
/dev/sdb3 1312 121601 966229425 83 Linux |
grub.conf :
Quote: | title=Gentoo Linux (2.6.39-gentoo-r3)
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-2.6.39-gentoo-r3 root=/dev/ram0 real_root=/dev/md/3_00 domdadm md=3,/dev/sda3,/dev/sdb3 vga=791 video=vesafb:ywrap,mtrr,1920x1080-32@60
initrd /boot/initramfs-genkernel-x86_64-2.6.39-gentoo-r3 |
genkernel.conf:
Quote: | # Configuration file for genkernel
# =========Common Command Line Option Defaults=========
# Run 'make oldconfig' before compiling this kernel?
OLDCONFIG="yes"
# Run 'make menuconfig' before compiling this kernel?
MENUCONFIG="no"
# Run 'make clean' before compilation?
# If set to NO, implies MRPROPER WILL NOT be run
# Also, if clean is NO, it won't copy over any configuration
# file, it will use what's there.
CLEAN="yes"
# Run 'make mrproper' before configuration/compilation?
MRPROPER="yes"
# Mount BOOTDIR automatically if it isn't mounted?
MOUNTBOOT="yes"
# Save the new configuration in /etc/kernels upon
# successfull compilation
SAVE_CONFIG="yes"
# Use Color output in Genkernel?
USECOLOR="yes"
# Genkernel uses an independent configuration for MAKEOPTS, and does not source
# /etc/make.conf . You can override the default setting by uncommenting and
# tweaking the following line. Default setting is set up by
# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j
# argument is: <number of processors>*<number of cores per processor>+1
MAKEOPTS="-j9"
# Add DMRAID support.
DMRAID="yes"
# Copy /etc/mdadm.conf to initramfs.
MDADM="yes"
# Enable disklabel support (copies blkid to initrd)
DISKLABEL="yes"
# Add new kernel to grub?
BOOTLOADER="grub"
# =========Low Level Compile Settings=========
# =========GENKERNEL LOCATION CONFIGURATION============
# Default share directory location
GK_SHARE="/usr/share/genkernel"
# Location of the default cache
CACHE_DIR="/var/cache/genkernel"
# Location of DISTDIR, where our source tarballs are stored
DISTDIR="${CACHE_DIR}/src"
# Log output file
LOGFILE="/var/log/genkernel.log"
# Debug Level
LOGLEVEL=1
# Default location of kernel source
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
#BUSYBOX_VER="1.7.4"
BUSYBOX_VER="1.18.1"
BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2"
BUSYBOX_DIR="busybox-${BUSYBOX_VER}"
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2"
DEVICE_MAPPER_VER="1.02.22"
DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}"
DEVICE_MAPPER_SRCTAR="${DISTDIR}/device-mapper.${DEVICE_MAPPER_VER}.tgz"
DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2"
#LVM_VER="2.02.28"
LVM_VER="2.02.74"
LVM_DIR="LVM2.${LVM_VER}"
LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"
LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"
DMRAID_VER="1.0.0.rc14"
DMRAID_DIR="dmraid/${DMRAID_VER}"
DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"
DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2"
#ISCSI_VER="2.0-871"
ISCSI_VER="2.0-872"
ISCSI_DIR="open-iscsi-${ISCSI_VER}"
ISCSI_SRCTAR="${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz"
ISCSI_BINCACHE="%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2"
#E2FSPROGS_VER="1.40.9"
E2FSPROGS_VER="1.41.14"
E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"
E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"
FUSE_VER="2.7.4"
FUSE_DIR="fuse-${FUSE_VER}"
FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz"
FUSE_BINCACHE="%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2"
UNIONFS_FUSE_VER="0.22"
UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"
MDADM_VER="3.1.4"
MDADM_DIR="mdadm-${MDADM_VER}"
MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2"
MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2" |
fstab:
Quote: | # Mounted file systems
/dev/md1 /boot ext2 noauto,noatime 1 2
/dev/md3 / ext3 noatime 0 1
/dev/sda2 none swap sw,pri=1 0 0
/dev/sdb2 none swap sw,pri=1 0 0
none /dev/shm tmpfs defaults 0 0 |
mdadm.conf:
Quote: | DEVICE /dev/sd[ac]1 /dev/sd[ac]3 |
J'ai modifié mdadm.conf en remplaçant [ac] par [ab]. J'ai recopié le contenu du fichier mdadm.conf de ma session ubuntu dans le fichier mdadm.conf sur la partition root du système gentoo. Le problème est toujours là.
Un point important, j'utilise un baselayout-2.
Merci pour ton aide. |
|
Back to top |
|
|
GentooUser@Clubic l33t
Joined: 01 Nov 2004 Posts: 829
|
Posted: Mon Oct 03, 2011 9:55 am Post subject: |
|
|
À pars le fstab qui n'est pas à jour je voit pas de problème.
C'est quoi le message d'erreur ?
C'est à quel niveau que ça plante ? L'initrd ?
C'est un raid version 0.90 ou 1.x ?
Tu ne devrais pas avoir besoin de "md=3,/dev/sda3,/dev/sdb3" normalement vu que l'initrd se charge d'assembler le raid en userspace (la ligne "Starting mdev" au démarrage)
Ma ligne de commande grub (j'utilise lvm par dessus mon raid) Code: |
linux /kernel doscsi domdadm dolvm real_root=/dev/mapper/localvg-root splash=verbose,theme:natural_gentoo console=tty1 quiet
initrd /initramfs
|
À tout hasard essaye de régénérer l'initrd avec CLEAR_CACHE_DIR="yes" dans le genkernel.conf, j'ai déjà eu des problèmes de conflit noyau/userspace avec ce cache. |
|
Back to top |
|
|
sylvain.bonnemaison Apprentice
Joined: 13 Jan 2008 Posts: 152
|
Posted: Mon Oct 03, 2011 2:57 pm Post subject: |
|
|
Après avoir corrigé fstab et modifié grub.conf, le système à redémarrer. Mais au seconde redémarrage, les devices ont été renommé en /dev/md/126_0 et /dev/md/127_0. Est-ce normal ?
J'ai bien positionné la variable CLEAR_CACHE_DIR="yes".
Est-il nécessaire de renseigner le fichier mdadm.conf ? |
|
Back to top |
|
|
GentooUser@Clubic l33t
Joined: 01 Nov 2004 Posts: 829
|
Posted: Mon Oct 03, 2011 3:14 pm Post subject: |
|
|
Les noms des devices raid ne devrait pas trop bouger
Pur mdadm.conf, normalement non tout est déjà dans les métadonnées, mais ça peut aider, perso j'ai pas de DEVICE renseigné dedans, par contre j'ai une ligne ARRAY.
Un petit mdadm --examine --scan sous Ubuntu devrait te fournir toutes les lignes nécessaires. |
|
Back to top |
|
|
GentooUser@Clubic l33t
Joined: 01 Nov 2004 Posts: 829
|
Posted: Thu Oct 06, 2011 12:40 am Post subject: |
|
|
Y'a eu du changement dans les derniers genkernel, voir /etc/genkernel.conf :
Code: |
# Includes mdadm/mdmon binaries in initramfs.
# Without sys-fs/mdadm[static] installed, this will build a static mdadm.
MDADM="yes"
# Specify a custom mdadm.conf.
# By default the ramdisk will be built *without* an mdadm.conf and will auto-detect
# arrays during bootup. Usually, this should not be needed.
MDADM_CONFIG="/etc/mdadm.conf"
|
Depuis que j'ai décommenté MDADM_CONFIG="/etc/mdadm.conf" mon array raid à retrouvé son nom normal.
J'utilise sys-kernel/genkernel-3.4.18 (~amd64), je ne sait pas depuis quand cette option est disponible.
EDIT: Cela suppose bien sur d'avoir un mdadm.conf bien renseigné (mdadm --examine --scan >> /etc/mdadm.conf) |
|
Back to top |
|
|
mp342 Apprentice
Joined: 03 Aug 2010 Posts: 165 Location: France
|
Posted: Mon Oct 17, 2011 2:07 pm Post subject: |
|
|
Par défaut, les raid sont numérotés de cette façon (127, 126 ...). Si tu veux une numérotation spécifique, tu dois utiliser un mdadm.conf comme l'indique GentooUser@Clubic. Mais si tu utilise genkernel, tu aurai plus intérêt à utiliser les uuid.
edit : pour le "_0", tu as peut être activé le support des partitions a l'intérieur du raid. Je ne l'ai jamais utilisé mais ça y ressemble. |
|
Back to top |
|
|
sylvain.bonnemaison Apprentice
Joined: 13 Jan 2008 Posts: 152
|
Posted: Wed Oct 19, 2011 8:15 am Post subject: |
|
|
Suite à vos conseils, le système à retrouvé ses partitions. Il y a bien des partitions sur le système raid.
Merci |
|
Back to top |
|
|
|