I have been suffering with gaps in email delivery from outside sources due
to continuing after-effects of the infamous "love bug" (gotta love NT mail
servers). I don't know if any responses to this have been posted since last
night (I had to grab this from a web archive just to read and respond to
it).
> I have looked through the Software RAID howto, the Bootable RAID
howto, the
> docs that come with raidtools 0.90 and the man pages and I haven't
been able
> to find any way to delete a raid device once it has been created.
since a raid device is just a virtual block device over other real
devices, it is a little vague what you mean by "delete". But, going
by
what I think you mean, you'll want to:
- rename /etc/raidtab (in case your distro has initscripts which try
to activate raidtab entries that aren't active in /proc/mdstat)
- raidstop the array(s) (check /proc/mdstat)
- if their partition types are "fd", make them "83" or another
appropriate value so your autodetect doesn't try to find it
(although
if the superblock isn't valid it won't start an array anyway)
- mke2fs (or whatever else) for giving new roles to your now-unused
partitions/drives
OK, I phrased the question wrong. What I am actually wanting to be able to
do is to remove the "persistent superblock" information. Changing the
partition tables requires me to boot completely free of any raid arrays
running (at least according to the strenuous warnings in the howto), which
requires me to reboot the system into a degraded mode (root/boot disk or
non-raid partition containing a copy of / with all raid entries in
/etc/fstab commented out) since the primary filesystems are RAID-1. Once
this machine goes into production that will be undesirable and I am trying
to plan ahead by creating unused partitions that I do not need today.
> I'm trying to get rid of a raid device (RAID 0 or 1) which was
created using
> the "persistent-superblock" option on Red Hat 6.2 (kernel source
2.2.14-12).
The persistent superblock isn't persistent in that manner :) Once the
array is raidstop'd, you can mke2fs the partition immediately (I do
just that all the time checking performance between disks and a s/w
raid
of them)
I ran mke2fs on multiple occasions on both partitions in the array (which
was stopped) and it did not wipe out the RAID-1 info in the superblock. I
tried various entries in /etc/raidtab, including commenting out the array I
wanted to get rid of. Each time on reboot it would restart the raid array,
though it was thoroughly broken due to the "mke2fs"'s.
This was with partition type "fd", however. I would like to be able to keep
these as "fd" in case I want to make a new raid array in the future and I
don't want to delete and reconstruct them just to be able to do this.
According to the howto document, the persistent superblock info "is written
in the beginning of all disks participating in the array." I assume this is
referring to the partition table area, but this is just a guess. I make no
claims to understanding all that goes on under the covers of fdisk and
similar utilities.
> Is there some kind of command/tool to do this that I haven't
stumbled
> across? It would be nice if the howto could say something on this
topic.
There could be... it'd be small since the above is about it, but
it's Jakob's call.
I think it would be useful to have a "rmraid" command or a special flag
option to an existing command which could do either:
a) delete the "persistent superblock" info for a specified raid array, or
b) update the "persistent superblock" info to match the definitions in the
/etc/raidtab file
I realize this is probably very dangerous unless sufficient checking and
warnings are coded into such a utility, but I don't claim to know much about
the software raid codebase and what its limitations or history may be. I'm
just an enduser/administrator and am new to the world of software raid on
Linux.