Moved this because it seems to be an issue specifically with rescan_scsi_bus.sh... it may be that there IS a kernel component too, but for now I was able to obliterate a system using "rescan-scsi-bus.sh -r" on a system wiht a pretty simple local FS setup: ubuntu@barbos:~$ mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,nosuid,relatime,size=32718576k,nr_inodes=8179644,mode=755,inode64) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=6555388k,mode=755,inode64) /dev/sda2 on / type ext4 (rw,relatime,stripe=128) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64) cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime) bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=131329) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M) mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime) configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) none on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700) tmpfs on /run/qemu type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64) /var/lib/snapd/snaps/lxd_24322.snap on /snap/lxd/24322 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /var/lib/snapd/snaps/snapd_18357.snap on /snap/snapd/18357 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/sdb1 on /data-sdb type ext4 (rw,relatime,stripe=64) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime) tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,noexec,relatime,size=6555388k,mode=755,inode64) nsfs on /run/snapd/ns/lxd.mnt type nsfs (rw) /var/lib/snapd/snaps/core20_1828.snap on /snap/core20/1828 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /var/lib/snapd/snaps/snapd_18596.snap on /snap/snapd/18596 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /var/lib/snapd/snaps/core20_1852.snap on /snap/core20/1852 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=6555384k,nr_inodes=1638846,mode=700,uid=1000,gid=1000,inode64) ubuntu@barbos:~$ sudo apt install sg3-utils Reading package lists... Done Building dependency tree... Done Reading state information... Done sg3-utils is already the newest version (1.46-1build1). sg3-utils set to manually installed. kiujln ,0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. ubuntu@barbos:~$ sudo rescan-scsi-bus.sh -r Syncing file systems Scanning SCSI subsystem for new devices and remove devices that have disappeared Scanning host 0 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg0 changed: LU not available (PQual 3) REM: Host: scsi0 Channel: 00 Id: 00 Lun: 00 DEL: Vendor: HPE Model: Smart Adapter Rev: 3.53 Type: Enclosure ANSI SCSI revision: 05 sg3 changed: LU not available (PQual 3) REM: Host: scsi0 Channel: 02 Id: 00 Lun: 00 DEL: Vendor: HPE Model: P408i-a SR Gen10 Rev: 3.53 Type: RAID ANSI SCSI revision: 05 sg1 changed: LU not available (PQual 3) REM: Host: scsi0 Channel: 01 Id: 00 Lun: 00 Vendor: HPE Model: LOGICAL VOLUME Rev: 3.53 DEL: Type: Direct-Access ANSI SCSI revision: 05 Scanning for device 0 1 0 1 ... 535: /usr/bin/sleep: Input/output error OLD: /usr/bin/rescan-scsi-bus.sh: line 153: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 154: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 155: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 161: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 162: cat: command not found OLD: /usr/bin/rescan-scsi-bus.sh: line 153: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 154: cat: command not foundd /usr/bin/rescan-scsi-bus.sh: line 155: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 161: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 162: cat: command not found /usr/bin/rescan-scsi-bus.sh: line 357: head: command not found /usr/bin/rescan-scsi-bus.sh: line 358: tail: command not found /usr/bin/rescan-scsi-bus.sh: line 358: pr: command not found 0 new or changed device(s) found. 0 remapped or resized device(s) found. 3 device(s) removed. \t[0:0:0:0]\n\t[0:2:0:0]\n\t[0:1:0:0]\nubuntu@barbos:~$ ubuntu@barbos:~$ mount -bash: /usr/bin/mount: Input/output error ubuntu@barbos:~$ sudo rescan-scsi-bus.sh -bash: /usr/bin/sudo: Input/output error Pretty sure this shouldn't remove mounted, active file systems, though to be fair I've not used this script in a very long time.