Define sda as the smallest disk

Thomas Lange lange at cs.uni-koeln.de
Mon Jan 29 17:30:47 CET 2024


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 <remy.d1 at gmail.com> 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


More information about the linux-fai mailing list