Mdadm: Cannot open /dev/sda1: Device or resource busy

Fermé
Signaler
Messages postés
145
Date d'inscription
vendredi 11 novembre 2011
Statut
Membre
Dernière intervention
7 avril 2021
-
Bonjour,
Quand j'essaie d'ajouter un ma partition / sda1 a mon raid md0 j'obtiens ce message d'erreur:
mdadm: Cannot open /dev/sda1: Device or resource busy

Surement du au fait que je suis booté sur mon sda1... comment faire pour corriger mon raid ?
Je suis avec un serveur ovh ks1... je peux booter en netboot au besoin...




sudo mdadm --examine /dev/sda1
mdadm: No md superblock detected on /dev/sda1.

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md0 : active raid1 sdb1[0]
20462464 blocks super 1.2 [2/1] [U_]

md1 : active raid1 sda2[2] sdb2[1]
522944 blocks super 1.2 [2/2] [UU]

md2 : active raid1 sda3[2] sdb3[1]
955623232 blocks super 1.2 [2/2] [UU]

unused devices: <none>


# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x00080135

Device Boot Start End Blocks Id System
/dev/sda1 * 4096 40962047 20478976 83 Linux
/dev/sda2 40962048 42008575 523264 82 Linux swap / Solaris
/dev/sda3 42008576 1953517567 955754496 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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 * 4096 40962047 20478976 fd Linux RAID autodetect
/dev/sdb2 40962048 42008575 523264 fd Linux RAID autodetect
/dev/sdb3 42008576 1953517567 955754496 fd Linux RAID autodetect

Disk /dev/md2: 978.6 GB, 978558189568 bytes
2 heads, 4 sectors/track, 238905808 cylinders, total 1911246464 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

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 535 MB, 535494656 bytes
2 heads, 4 sectors/track, 130736 cylinders, total 1045888 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

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md0: 21.0 GB, 20953563136 bytes
2 heads, 4 sectors/track, 5115616 cylinders, total 40924928 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

Disk /dev/md0 doesn't contain a valid partition table



# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 20G 1.1G 18G 6% /
/dev/root 20G 1.1G 18G 6% /
devtmpfs 3.9G 8.0K 3.9G 1% /dev
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 789M 256K 789M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 0 3.9G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/md2 897G 1.1G 851G 1% /home

# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md0 / ext4 errors=remount-ro,relatime 0 1
/dev/md1 swap swap defaults 0 0
/dev/md2 /home ext4 defaults,relatime 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devtmpfs /dev devtmpfs rw 0 0

contenu du fichier /etc/mdadm/mdadm.conf
...
# This file was auto-generated on Thu, 03 Oct 2013 19:08:09 -0400
# by mkconf $Id$
ARRAY /dev/md0 metadata=1.2 UUID=f6751fac:7c0dda7f:8b88b25f:e49338c1 ...
ARRAY /dev/md1 metadata=1.2 UUID=b5253834:413a6fca:8c74e9c6:94829f5e ...
ARRAY /dev/md2 metadata=1.2 UUID=c9615883:9b5af739:b1fcef1d:8d83a6b4 ...