Re: shutting down/removing a software RAID array?



Dances With Crows wrote:
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.


Thanks. I either missed the --stop command the first time or it failed for some reason. I tried it last night and it worked. I rebooted and the RAID didn't start up this time.
.



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. ... ....the disk is 250 Marketing G or 238475 M in size. ... the last 75 M of the disk, and any softRAID superblock would die. ...
    (comp.os.linux.hardware)
  • Re: shutting down/removing a software RAID array?
    ... the md1 array instead of /dev/hdc3. ... If you're sure that you don't want to have any softRAID at all, ... the partition type of all former softRAID partitions to something other ... the md superblock info is stored at the *end* of the partition, ...
    (comp.os.linux.hardware)
  • Adding a new HD to soft raid
    ... I have had some problems with a partition hdg1. ... Luckily I also do twice a day a backup. ... that in one way or another on a softraid as well. ...
    (alt.os.linux.suse)