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

Bug#336514: yaird: falls down when new scsi/sata disks are added



On Mon, Oct 31, 2005 at 05:43:00PM +0100, Jonas Smedegaard wrote:
> > On Mon, Oct 31, 2005 at 12:37:49AM +0100, Jonas Smedegaard wrote:
> 
> > > In your case it would make sense to only have the image tied to the
> > > UUID, but in other cases perhaps it would make sense to ignore UUID
> > > and instead only use device names.
> > 
> > Even SCSI ID would be an improvement!  This is exposed via sysfs,
> > though not wonderfully.  Use the device path followed by block/.  But
> > that has plenty of failure modes too.
> 
> Yaird does discovery at ramdisk build time, but (to keep image minimal)
> not at boot time. And mdadm cannot be passed a SCSI ID, so I believe
> storing only SCSI ID with the image wouldn't work (without major changes
> to yaird).

My point is that you can map SCSI ID <-> device easily using sysfs:

drow@caradoc:~% ls -l /sys/block/sdc/device
lrwxrwxrwx  1 root root 0 Oct 31 11:46 /sys/block/sdc/device -> ../../devices/pci0000:00/0000:00:08.0/host2/target2:0:0/2:0:0:0/

drow@caradoc:~% ls -l /sys/block/sdc/device/block
lrwxrwxrwx  1 root root 0 Oct 31 11:47 /sys/block/sdc/device/block -> ../../../../../../block/sdc/

Similarly for IDE channel.  But I don't know if it's an improvement.

> > > What I believe will work (I haven't tried myself) is to
> > > edit /etc/yaird/Templates.cfg and at TEMPLATE mdadm remove the third
> > > line of the script (remember to also remove the trailing "\" in the
> > > line above).
> > 
> > The device nodes wouldn't be right.  The original failure was trying
> > to create /dev/sdb2, when there no longer was such a device (it only
> > had one partition).
> 
> My suggestion here is to _strip_ device nodes, leaving only UUID.
> 
> It should help in your scenario (same disks, device numbers moving
> around) but will not work for other scenarios.

It wouldn't because the right device nodes would not have been created.
mdadm would then fail to find the correct partitions since there
weren't any device nodes for them.

-- 
Daniel Jacobowitz
CodeSourcery, LLC



Reply to: