Re: shutting down/removing a software RAID array?



Gary Dale staggered into the Black Sun and said:
Dances With Crows wrote:
Gary Dale staggered into the Black Sun and said:
I've been looking for [how to *stop*] a [softRAID] in Linux.
"mdadm misc /dev/mdN --stop" . This won't work if /dev/mdN is
mounted.

Was it mounted anywhere? You didn't make that clear.

#cat /proc/mdstat
md1 : active raid1 hdc[1]
60696128 blocks [2/1] [_U]

Somewhere along the line I must have inadvertently added /dev/hdc to
the md1 array instead of /dev/hdc3.
If you're sure that you don't want to have any softRAID at all,
change the partition type of all former softRAID partitions to
something other than 0xfd. And rm -rf /etc/mdadm* while you're at
it. (You can regenerate that dir structure when you rebuild your
softRAID setup properly.)
And after trying everything else I can think of to remove the software
traces of the RAID array, a reboot still gives me md1 containing hdc.
Expand on "everything else you can think of". What, precisely, were
the commands you executed?
I've already done almost everything you suggested and more.

Were there any error messages or strange things in dmesg when you did
those things? Reproduce those messages if they exist.

the partitions back to type 83 but that doesn't work on /dev/hdc -
it's a device not a partition. Can you expand on the "seek="?

mallory:~# fdisk -l /dev/sda
Disk /dev/sda: 250.0 GB, 250059350016 bytes

....the disk is 250 Marketing G or 238475 M in size. The softRAID
superblock is on the last few M of the disk or partition. So if I'd put
a softRAID superblock on /dev/sda by mistake, I could get rid of it by
doing "dd if=/dev/zero of=/dev/sda bs=1M seek=238400" . That'd zorch
the last 75 M of the disk, and any softRAID superblock would die.

I tried zeroing the superblocks but that gave problems because mdadm
won't touch a running RAID volume, which /dev/hdc is part of.

I thought you said you'd stopped it with --stop.

I uninstalled mdadm (with --purge) then removed everything that looked
like an mdadm configuration file. There is nothing in GRUB that refers
to /dev/md1. Still, the RAID array [shows] up.

It wouldn't surprise me if your distro's "emerge -C" attempts to keep
you from shooting yourself in the foot by refusing to delete critical
things. If /sbin/mdadm exists, the boot scripts almost certainly run it
with -As to auto-assemble arrays. If a softRAID superblock exists on
/dev/hdc , mdadm will probably find it and do its thing.

--
"Oh bother," said the Borg, "We've assimilated Pooh."
--MHR on alt.fan.pratchett
=======Hire me! http://crow202.dyndns.org:8080/~mhgraham/resume/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.



Relevant Pages

  • Re: shutting down/removing a software RAID array?
    ... If you're sure that you don't want to have any softRAID at all, ... traces of the RAID array, a reboot still gives me md1 containing hdc. ... it's a device not a partition. ... the last 75 M of the disk, and any softRAID superblock would die. ...
    (comp.os.linux.hardware)
  • Re: Softraid installation and extension
    ... If I'am writing on dev/md0 (the softraid) everything is fine. ... so the raid should continue with 2 partitions. ... (i guess without a spare disk) ... >Then you must think of what RAID-5 does and the answer to your question ...
    (alt.os.linux.suse)
  • Re: How does Linux inform me when a RAID disk has failed?
    ... I'd go with softraid or get ... making it pretty easy to write some script ... > disk is having problems it can detect, and when it deactivates a disk ... Linux software RAID systems if hardware RAID is out of the OP's budget. ...
    (comp.os.linux.misc)