Use of /dev/disk/by-path/... in disk_config?

Steffen Grunewald steffen.grunewald at aei.mpg.de
Thu Jan 18 16:08:32 CET 2018


On Thu, 2018-01-18 at 14:19:24 +0100, Thomas Lange wrote:
> >>>>> On Thu, 18 Jan 2018 14:09:49 +0100, Steffen Grunewald <steffen.grunewald at aei.mpg.de> said:
> 
>     > Thanks. Since the "find" command returns an unsorted list, how do you make sure
>     > you get the right order?
> I do not care, since I only match on the model type of the disk, not
> exactly which disk. You could use the serial number, or use the
> by-path directory.

I chose the latter, which is easier to obtain.
At least for built-in disks, the list is stable then, and of external
ones, ZFS keeps proper track. (Still remember that video showing how
robust ZFS is, with about a dozen USB thumb drives being pulled out and
replugged in random order...)

Talking about "path" - is there a trick to get multipath-tools installed
in the nfsroot? All my attempts fail due to initramfs not cooperating 
with dracut.

>     > Am I correct that "disk1" maps to the first item in the disklist, and so on?
> Yes.

Meanwhile I found that hidden in the end of the setup-storage man page.
The FAI guide itself contains no reference to disk$number.

>     > Between setting up the machine with FAI, and the reboot after maintenance,
>     > the number of external JBOD disks may have changed. (Cable failure?)
>     > Will md devices use the modified device names?
> I do not know. But I'm pretty sure that md uses some uuid on the
> partitions of the disks to assembly the md device.

I'll find out, the hard way. (This should be common, and have been
thought of by developers before, so I'm not afraid.)

>     > BTW, can I mix absolute and relative sizes (as in "500G-100%")?
> Yes. IIRC internally we convert everything to blocks.

Nice. If I get the disks mixed up, this can act as an emergency brake.
Would be nice if one could specify lower and upper capacity limits in
a disk_config template...

>     > Ah, OK... for now, partition and mountdisks hooks may do the trick...
> Yes, hooks always do the trick ;-)

Hooks, to hang yourself...

> I guess it would be fine if you could publish your zfs hooks here on
> the list. Others may be interested in them.

I'm still in the initial phases (planning, you know). Basically, I'll
get a list of JBOD disks (from /dev/disk/by-path, selecting "sas-ext"
instead of "ata"), split that into sets of n+2+1, pipe that through
"while read" to further split off one spare, and run a "zpool create".
For a very long time (10+ years???) I haven't looked into ZFS anymore,
time to dig out the old Sun admin guides, in addition to Aaron Toponce's
article series from 2012/13... ZIL and ARC will go to the extra SSD 
partitions, as you may have guessed.

Still a long way to go.

Thanks for your constant support.
 S


More information about the linux-fai mailing list