Re: Define sda as the smallest disk

2024-03-13 Diskussionsfäden Rémy Dernat
Hi Diego, Nice catch for the scsi grep. Will try that ASAP. Thanks Le ven. 23 févr. 2024 à 14:35, Diego Zuccato a écrit : > > Just a followup. > My script had a serious bug (plus a typo), too: since it gets sourced, > $0 is not what I expected :( After many failed atttempts finally I >

Re: Define sda as the smallest disk

2024-02-23 Diskussionsfäden Diego Zuccato
Just a followup. My script had a serious bug (plus a typo), too: since it gets sourced, $0 is not what I expected :( After many failed atttempts finally I noticed it and patched. What I just tested: -8<-- root@fai:/srv/fai/config/class# cat 99-disklist.sh #! /bin/bash mydisks() { find

Re: Define sda as the smallest disk

2024-02-22 Diskussionsfäden Diego Zuccato
I think there's a bug (well, a missing piece) in 99-disklist.sh: egrep ignores SCSI disk, considering just ATA and NVME. If it can be useful, I also modified the script to look into 99-disklist.d for hostname-specific configs (I prefer having separate files instead of embedding in a bigger

Re: Define sda as the smallest disk

2024-01-31 Diskussionsfäden Thomas Lange
Hi all, that is the example how to change the shell variable $disklist: https://fai-project.org/download/misc/99-disklist.sh Create the script class/99-disklist.sh in your config space (/s/rv/fai/config) These are the imprtant lines: if [ -n "$newlist" ]; then echo New disklist: $newlist

Re: Define sda as the smallest disk

2024-01-31 Diskussionsfäden Rémy Dernat
I know I could change directly the subroutine code from the "set_disk_info" function, but if I can avoid doing this and doing something better / cleaner... Le mer. 31 janv. 2024 à 12:48, Rémy Dernat a écrit : > > Ok, Thanks Thomas. > > So, let's say I want to get a `$disklist` as an environment

Re: Define sda as the smallest disk

2024-01-31 Diskussionsfäden Rémy Dernat
Ok, Thanks Thomas. So, let's say I want to get a `$disklist` as an environment variable for the setup-storage step (or '-D'), and this disklist is : `$(newdisk_list=$(all_disks_by_size |sort -r | tr "\n" " ")` How could I change my disk_config file to use this new list ? By modifying

Re: Define sda as the smallest disk

2024-01-31 Diskussionsfäden Thomas Lange
> On Wed, 31 Jan 2024 11:15:46 +0100, Rémy Dernat said: > Hi Thomas, > That looks fantastic. Is there any examples to use these functions ? No, the documentation is really bad. In FAI the disk list is created by these two steps: set_bootstick all_disks_and_size | checkdisk

Re: Define sda as the smallest disk

2024-01-31 Diskussionsfäden Rémy Dernat
Hi Thomas, That looks fantastic. Is there any examples to use these functions ? Best regards, Rémy Le lun. 29 janv. 2024 à 17:31, Thomas Lange a écrit : > > FAI 6.2 now provides some helper functions to create your own disklist: > > grepv_disks() > grep_disks() > notmatchdisks() >

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

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