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

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



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 31 Oct 2005 11:48:31 -0500
Daniel Jacobowitz <dan@debian.org> wrote:

> 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:

...and mine is that mapping is done at ramdisk build time but not at
boot time. So such mapping wouldn't help your situation of the mapping
changing between build and boot.

If what you say is that yaird could be extended to also look at /sys at
boot time then we agree.


> > > > 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.

Ah, the mknod call. Yes, you are right.

Erik: Recent versions of mdadm supports a new option "auto" to
auto-create devices as needed. Perhaps that could be used at least on
Debian to avoid hardcoded device names?


 - Jonas


- -- 
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDZk/In7DbMsAkQLgRAttRAJ0cL0EIE0V9uo6/Wja91tpwMsIM+gCaA775
m4dhOaD3zc/kQHzBBBdshDQ=
=vUUb
-----END PGP SIGNATURE-----



Reply to: