On Fri, 27 Feb 2004 17:56:14, Miquel van Smoorenburg wrote: > On 2004.02.27 02:17, Neil Brown wrote: > > On Friday February 27, neilb@cse.unsw.edu.au wrote: > > > > > > Right. I missed a bit in the patch. > > > (I assume you are still wanting to boot off /dev/sda until you copy > > > the data into /dev/md/d0p* - then you will use root=/dev/md_d0p1) > > > > Sorry, that patch was wrong. > > This one, ontop of the original patch, works for me (I finally got > > around to testing it). > > Yes, it works! Great. > > Now how to enable RAID1 on an existing disk... Hmm. With a dynamic major, the system might fail at checking the root file system at boot. At that time, /dev is still read-only, and /dev/md/d0p1 might not be the correct device yet. So either mdp needs its own partition number, or we need a /dev/root device that's an alias for the current root (like /dev/console). Fortunately, that's very easy. Which makes me wonder why this hasn't been done before .. what am I overlooking ? Patch below uses 4,1 which is just arbitrary, ofcourse. Comments ? --- linux-2.6.3/fs/block_dev.c 2004-02-18 04:59:58.000000000 +0100 +++ linux-2.6.3-bk8-mdp/fs/block_dev.c 2004-02-28 01:58:27.000000000 +0100 @@ -339,6 +339,11 @@ struct block_device *bdget(dev_t dev) struct block_device *bdev; struct inode *inode; +#if 1 /* XXX miquels */ + if (dev == MKDEV(4, 1)) + dev = current->fs->pwdmnt->mnt_sb->s_dev; +#endif + inode = iget5_locked(bd_mnt->mnt_sb, hash(dev), bdev_test, bdev_set, &dev); Mike. - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html