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
> noticed
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 $*
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 one
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
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 v
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 `class/20-hw
> 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 $FAI_BOOTS
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()
>
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
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
10 matches
Mail list logo