Use of /dev/disk/by-path/... in disk_config?
Steffen Grunewald
steffen.grunewald at aei.mpg.de
Thu Jan 18 14:09:49 CET 2018
On Thu, 2018-01-18 at 13:12:24 +0100, Thomas Lange wrote:
> >>>>> On Thu, 18 Jan 2018 12:40:16 +0100, Steffen Grunewald <steffen.grunewald at aei.mpg.de> said:
>
> > 1. Is it possible to map "/dev/disk/by-path/pci-0000:00:11.4-ata-1" to
> > "disk1" (etc.) for easier reference later?
> Yes. I use a script class/99-disklist.sh for changing the list of disks to
> my local meeds. The script is attached. It uses the disks model numbers
> to get a new order of the disks. The same should work with the serial
> number or path.
Thanks. Since the "find" command returns an unsorted list, how do you make sure
you get the right order?
(The way the disklist gets overwritten looks a bit, um, non-standard, but
efficient...)
Am I correct that "disk1" maps to the first item in the disklist, and so on?
> > 2. Would the following work (with that mapping merged):
>
> > or do I have to take additional measures to make sure that the md devices
> > "find" their components?
> I do not understand what you mean by "find". Here's an raid1 example
> from me. Also have a look at the nice feature sameas:disk1.
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?
"sameas" is useful, and I've seen that before, but I have diverging plans
for the third partition.
> disk_config disk1 align-at:1M
> primary - 30G-100G - -
> logical swap 1G-10G swap sw
> logical - 1G-500G - -
> logical - 1G- - -
BTW, can I mix absolute and relative sizes (as in "500G-100%")?
I want setup-storage to fail if for an unknown reason it picked up
the wrong disks...
> disk_config disk2 sameas:disk1
>
> disk_config raid fstabkey:uuid preserve_reinstall:1,2
> raid1 / disk1.1,disk2.1 ext4 rw,noatime,errors=remount-ro createopts="-m15"
> raid1 /home disk1.6,disk2.6 ext4 rw,noatime,nosuid createopts="-m1" tuneopts="-c0 -i0"
> raid1 /srv disk1.7,disk2.7 ext4 rw,noatime,nosuid createopts="-m1" tuneopts="-c0 -i0"
Oh, I never learned about "tuneopts" before... very handy!
> > 3. Has anyone setup ZFS using FAI?
> Kerim, who wrote the btrfs code for setup-storage was thinking about
> adding ZFS support in the past. Maybe the interested people can do
> some funding to get this implemented.
Ah, OK... for now, partition and mountdisks hooks may do the trick...
Thanks, Steffen
More information about the linux-fai
mailing list