Define sda as the smallest disk

2024-01-29 Diskussionsfäden Rémy Dernat
Hi,

I have a weird issue since Ubuntu 22.04.

It seems that disks are not in the right order; for example sda became
sdg, etc...
This is really annoying as my smallest disk should be used for system,
not the other disks. Normally, it was sda.

So, I would like to define something like disk1 / sda is :
fdisk -l 2>/dev/null |awk '/Disk / {print $2,$3}' |sort -n -k2 |head -1

Then, this would be used by setup-storage.

Any idea on how to do this ?

Best regards,


Re: Define sda as the smallest disk

2024-01-29 Diskussionsfäden Thomas Lange
FAI 6.2 now provides some helper functions to create your own disklist:

grepv_disks()
grep_disks()
notmatchdisks()
matchdisks()
smallestdisk()
largestdisk()
all_disks_by_size()
all_disks_and_size()
once_only()
checkdisk()
disks_by_id()


Here's an older script how to change the disklist:
https://fai-project.org/download/misc/99-disklist.sh


> On Mon, 29 Jan 2024 17:13:39 +0100, Rémy Dernat  said:


> So, I would like to define something like disk1 / sda is :
> fdisk -l 2>/dev/null |awk '/Disk / {print $2,$3}' |sort -n -k2 |head -1

> Then, this would be used by setup-storage.

-- 
regards Thomas