Subject: Re: admin/15840: "raidctl -s" useless when filesystem mounted
To: None <anne@alcor.concordia.ca>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-bugs
Date: 03/09/2002 19:04:35
On Fri, Mar 08, 2002 at 04:01:23PM -0800, anne@alcor.concordia.ca wrote:
> >Description:
> I made a RAID 5 set, created a 4.2BSD filesystem on it, and mounted the
> filesystem.  Issuing "raidctl -s raid0" while the filesystem is mounted
> results in "raidctl: unable to open device file: /dev/raid0d".  The
> same command after unmounting the filesystem works as expected.  This
> can't be right, since the point of hot spares and most RAID is to be
> able to recover from a failed disk without incurring downtime for the
> system or the applications.
> >How-To-Repeat:
> Make a RAID set, put a filesystem on it, mount the filesystem, and
> try "raidctl -s" on the RAID device.
> >Fix:
> No idea.

I guess you used /dev/raid0d for your filesystem, rigth ?
The raw device should not be used for filesystem, as this prevent other
operations on the device. This is true for raid as for other devices.
For example, if /dev/sd0d is mounted you can't use scsictl on it any more.

The solution is to create another partition to be mounted (eventually with
the same offset/size as the raw partition if there is only one partition on the
device) and lease the raw partition unused.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
--