[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Install and RAID

On Tue, Jan 23, 2001 at 01:10:07AM +0100, Martin Waitz wrote:

(sorry for the long time it took to reply, I was quite busy :-/ )

> > The corresponding /dev/hdXX devices contain the data, are "mountable"
> > and work 100%, but if fstab tells the kernel that the /usr filesystem is
> > to be mounted from /dev/md2, no "raidless" kernel will figure out that
> > it needs to mount /dev/hda5 instead.
> will it work with filesystem labels?
> from mount(8):
>   -L label	Mount the partition that has the specified label.
> with something like this in /etc/fstab
> LABEL=label	/mnt ext2 default 0 2
> will the kernel be confused, if /dev/sda1 and /dev/md0 contain the same
> label, or will it just take /dev/md0?

It works. I just looked at the source of sid's current mount package

The function "uuidcache_init" in mount_by_label.c handles this case: It
first searches for any "md" devices matching the given label (so, IFF
your kernel has software RAID support, "mounting by label" ALWAYS mounts 
the correct md partition, and NEVER tries to mount a hd or sd partition
that happens to be part of your RAID1 set), and then, if it doesn't
succeed, tries the other devices (so, in case your kernel has no RAID
support, it will happily mount one of the disks that is part of the RAID
set). In case there are multiple matches, it takes the first found one.

> hmm, does label support work for the root-disk? haven't checked that

No, it doesn't. "label support" like we just discussed is in the 
/sbin/mount binary. The kernel gets the major and minor number of the 
device to boot from the boot loader (lilo, grub, ...) via the kernel 
command line, or falls back to hardcoded value (cf. man rdev).

AFAIK, no boot loader supports searching for devices by ext2 labels, as
the mount binary does.

So, now, IF a debian installer would insist of installing the system
onto a degraded RAID set (and not leave the option of installing it onto
normal partitions), AND it would setup filesystem labels for all created
partitions, and configure /etc/fstab to mount the partitions by
filesystem labels, the user STILL would need to re-install the boot
loader IF he/she will go from a kernel that supports software RAID to a 
kernel that doesn't.

So, please, make it optional ;)

Andreas Trottmann <andreas.trottmann@werft22.com>

Reply to: