| To: | dcox@xxxxxxxxxx |
|---|---|
| Subject: | Re: mkfs.xfs option for RAID |
| From: | Steve Lord <lord@xxxxxxx> |
| Date: | Fri, 25 May 2001 08:46:59 -0500 |
| Cc: | Andi Kleen <ak@xxxxxxx>, "T.Hattori" <tomo@xxxxxxxxx>, linux-xfs@xxxxxxxxxxx |
| In-reply-to: | Message from Danny Cox <danscox@mindspring.com> of "Fri, 25 May 2001 07:41:47 EDT." <3B0E44FB.CC1BDF9B@mindspring.com> |
| Sender: | owner-linux-xfs@xxxxxxxxxxx |
> Andi,
>
> Andi Kleen wrote:
> >
> > Are you sure it works for MD automatically too? When I'm reading the code
> > correctly only LVM_BLK_MAJOR is checked for.
>
> No, I'm not sure. It's worked for me correctly in the past, but I've
> not updated from CVS lately. Russell?
>
There is mkfs code in there for querying MD devices:
/* MD volume */
if (sb.st_rdev >> 8 == MD_MAJOR) {
int fd;
/* Open device */
fd = open (dfile, O_RDONLY);
if (fd == -1)
return;
/* Is this thing on... */
if (ioctl (fd, GET_ARRAY_INFO, &md)) {
fprintf (stderr, "Error getting array info from %s\n",
dfile);
usage();
}
/* Check state */
if (md.state) {
fprintf (stderr, "MD array %s not in clean state\n",
dfile);
usage();
}
/* Deduct a disk from stripe width on RAID4/5 */
if (md.level == 4 || md.level == 5)
md.nr_disks--;
/* Update sizes */
*sunit = md.chunk_size >> 9;
*swidth = *sunit * md.nr_disks;
return;
}
Steve
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: Errr... what's all this about then?, Bruce Tenison |
|---|---|
| Next by Date: | Re: Errr... what's all this about then?, Steve Lord |
| Previous by Thread: | Re: mkfs.xfs option for RAID, Danny Cox |
| Next by Thread: | Re: mkfs.xfs option for RAID, Andi Kleen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |