/dev/md127 RAID5 array that consisted of four drives. I managed to hot remove them from the array and currently
/dev/md127 does not have any drives:
cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sdd1 sda1 304052032 blocks super 1.2 [2/2] [UU] md1 : active raid0 sda5 sdd5 16770048 blocks super 1.2 512k chunks md127 : active raid5 super 1.2 level 5, 512k chunk, algorithm 2 [4/0] [____] unused devices: <none>
mdadm --detail /dev/md127 /dev/md127: Version : 1.2 Creation Time : Thu Sep 6 10:39:57 2012 Raid Level : raid5 Array Size : 8790402048 (8383.18 GiB 9001.37 GB) Used Dev Size : 2930134016 (2794.39 GiB 3000.46 GB) Raid Devices : 4 Total Devices : 0 Persistence : Superblock is persistent Update Time : Fri Sep 7 17:19:47 2012 State : clean, FAILED Active Devices : 0 Working Devices : 0 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 512K Number Major Minor RaidDevice State 0 0 0 0 removed 1 0 0 1 removed 2 0 0 2 removed 3 0 0 3 removed
I’ve tried to do
mdadm --stop /dev/md127 but:
mdadm --stop /dev/md127 mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?
I made sure that it’s unmounted,
umount -l /dev/md127 and confirmed that it indeed is unmounted:
umount /dev/md127 umount: /dev/md127: not mounted
I’ve tried to zero superblock of each drive and I get (for each drive):
mdadm --zero-superblock /dev/sde1 mdadm: Unrecognised md component device - /dev/sde1
Here's output of
lsof | grep md127:
lsof|grep md127 md127_rai 276 root cwd DIR 9,0 4096 2 / md127_rai 276 root rtd DIR 9,0 4096 2 / md127_rai 276 root txt unknown /proc/276/exe
What else can I do? LVM is not even installed so it can't be a factor.
After much poking around I finally found what was preventing me from stoping the array. It was SAMBA process. After service smbd stop I was able to stop the array. It’s strange though because although the array was mounted and shared via SAMBA at one point in time, when I tried to stop it it was already unmounted.