Quote Originally Posted by karlmistelberger View Post
Revised script relied on mounting as a side effect, which no longer occurs with kernel 5.18:

New version explicitly mounts the device:
Code:
erlangen:~ # cat /usr/local/bin/scan-for-backup-disk             
#!/bin/bash  
echo "- - -" > /sys/devices/pci0000:00/0000:00:01.2/0000:04:00.1/ata1/host0/scsi_host/host0/scan 
until [ -L /dev/disk/by-uuid/f5177cae-4082-44ed-9471-b99030f06866 ] ; do echo Scanning backup disk ; sleep 1; done 
[ -d /HDD/backup ] || mount /HDD || true 
erlangen:~ #
Hide partitions from udisks:
Code:
erlangen:~ # cat /etc/udev/rules.d/10-local.rules                       
SUBSYSTEM=="block", ENV{ID_FS_UUID}=="2260f160-cc05-47cc-9893-cc32c050177d", ENV{UDISKS_IGNORE}="1" 
SUBSYSTEM=="block", ENV{ID_FS_UUID}=="f5177cae-4082-44ed-9471-b99030f06866", ENV{UDISKS_IGNORE}="1" 
erlangen:~ #
https://wiki.archlinux.org/title/Udi...ted_partitions