dimkr wrote: ↑Mon Jan 02, 2023 6:58 am
Does umount -l
work?
Also, I'd recommend you to dump the out of lsof
to a file, just before that umount
- maybe some process tries to access the mount point?
I took out the "sync" and "sleep 1", replaced with just this:
Code: Select all
lsof /mnt/${aDEV}
umount /dev/$aDEV
And lsof did not output anything, furthermore no busy message, all partitions unmounted:
Code: Select all
# export UEFIflg=1
# /usr/local/limine-installer/find-installations
Found Windows
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Pyro64 1.3
Found Easy Pyro64 1.3
Found Easy Dunfell64 2.7.3
Found Easy Dunfell64 2.7.3
Found Easy Buster64 2.6.1
Found Easy Buster64 2.4.92
Found Easy Buster64 2.5.1
Found Easy Buster64 2.5.3
Found Easy Buster64 2.5.5
Found Easy Buster64 2.5
Found Easy Buster64 2.4.1
Found Easy Buster64 2.6.1
Found Easy Pyro64 1.3
Found Puppy EasyPup
Found Puppy EasyPup
Found Easy Dunfell64 3.4.4
Found Easy Dunfell64 4.2.2
Found Easy Dunfell64 3.4.7
Found Easy Dunfell64 4.1
Found Easy Dunfell64 4.2.2
Found Linux Quirky Buster64 8.8.1
Found Easy Dunfell64 4.4.2
Found Easy Dunfell64 4.4.1
Found Easy Dunfell64 4.3.4
Found Easy Dunfell64 4.5
Found Easy Dunfell64 4.3
Found Easy Dunfell64 4.5.2
Found Easy Dunfell64 4.4
Found Easy Dunfell64 4.5.1
Found Easy Dunfell64 4.5.3
Found Easy Dunfell64 4.2.3
Found Easy Dunfell64 4.2.7
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Dunfell64 4.3
#
Go back to how it was before, no sleep, no sync either, as it shouldn't be required with the partitions mounted read-only, get this:
Code: Select all
# /usr/local/limine-installer/find-installations
Found Windows
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Pyro64 1.3
Found Easy Pyro64 1.3
umount: can't unmount /mnt/sda2: Resource busy
Found Easy Dunfell64 2.7.3
Found Easy Dunfell64 2.7.3
Found Easy Buster64 2.6.1
Found Easy Buster64 2.4.92
Found Easy Buster64 2.5.1
Found Easy Buster64 2.5.3
Found Easy Buster64 2.5.5
Found Easy Buster64 2.5
Found Easy Buster64 2.4.1
Found Easy Buster64 2.6.1
umount: can't unmount /mnt/sda4: Resource busy
Found Easy Pyro64 1.3
umount: can't unmount /mnt/sda5: Resource busy
Found Puppy EasyPup
Found Puppy EasyPup
Found Easy Dunfell64 3.4.4
Found Easy Dunfell64 4.2.2
Found Easy Dunfell64 3.4.7
Found Easy Dunfell64 4.1
Found Easy Dunfell64 4.2.2
umount: can't unmount /mnt/sda6: Resource busy
Found Linux Quirky Buster64 8.8.1
Found Easy Dunfell64 4.4.2
Found Easy Dunfell64 4.4.1
Found Easy Dunfell64 4.3.4
Found Easy Dunfell64 4.5
Found Easy Dunfell64 4.3
Found Easy Dunfell64 4.5.2
Found Easy Dunfell64 4.4
Found Easy Dunfell64 4.5.1
Found Easy Dunfell64 4.5.3
Found Easy Dunfell64 4.2.3
Found Easy Dunfell64 4.2.7
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Dunfell64 4.3
#
Now trying with "mount -l /dev/$aDEV":
Code: Select all
# /usr/local/limine-installer/find-installations
Found Windows
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Pyro64 1.3
Found Easy Pyro64 1.3
Found Easy Dunfell64 2.7.3
Found Easy Dunfell64 2.7.3
Found Easy Buster64 2.6.1
Found Easy Buster64 2.4.92
Found Easy Buster64 2.5.1
Found Easy Buster64 2.5.3
Found Easy Buster64 2.5.5
Found Easy Buster64 2.5
Found Easy Buster64 2.4.1
Found Easy Buster64 2.6.1
Found Easy Pyro64 1.3
Found Puppy EasyPup
Found Puppy EasyPup
Found Easy Dunfell64 3.4.4
Found Easy Dunfell64 4.2.2
Found Easy Dunfell64 3.4.7
Found Easy Dunfell64 4.1
Found Easy Dunfell64 4.2.2
Found Linux Quirky Buster64 8.8.1
Found Easy Dunfell64 4.4.2
Found Easy Dunfell64 4.4.1
Found Easy Dunfell64 4.3.4
Found Easy Dunfell64 4.5
Found Easy Dunfell64 4.3
Found Easy Dunfell64 4.5.2
Found Easy Dunfell64 4.4
Found Easy Dunfell64 4.5.1
Found Easy Dunfell64 4.5.3
Found Easy Dunfell64 4.2.3
Found Easy Dunfell64 4.2.7
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Dunfell64 4.3
#
All partitions have unmounted.
In the case of using lsof, it would seem to have provided just enough delay for whatever is keeping the partitions busy, to have completed. I tried this (without a sync):
Code: Select all
# /usr/local/limine-installer/find-installations
Found Windows
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Pyro64 1.3
Found Easy Pyro64 1.3
Found Easy Dunfell64 2.7.3
Found Easy Dunfell64 2.7.3
Found Easy Buster64 2.6.1
Found Easy Buster64 2.4.92
Found Easy Buster64 2.5.1
Found Easy Buster64 2.5.3
Found Easy Buster64 2.5.5
Found Easy Buster64 2.5
Found Easy Buster64 2.4.1
Found Easy Buster64 2.6.1
umount: can't unmount /mnt/sda4: Resource busy
Found Easy Pyro64 1.3
Found Puppy EasyPup
Found Puppy EasyPup
Found Easy Dunfell64 3.4.4
Found Easy Dunfell64 4.2.2
Found Easy Dunfell64 3.4.7
Found Easy Dunfell64 4.1
Found Easy Dunfell64 4.2.2
Found Linux Quirky Buster64 8.8.1
Found Easy Dunfell64 4.4.2
Found Easy Dunfell64 4.4.1
Found Easy Dunfell64 4.3.4
Found Easy Dunfell64 4.5
Found Easy Dunfell64 4.3
Found Easy Dunfell64 4.5.2
Found Easy Dunfell64 4.4
Found Easy Dunfell64 4.5.1
Found Easy Dunfell64 4.5.3
Found Easy Dunfell64 4.2.3
Found Easy Dunfell64 4.2.7
Found Easy Dunfell64 4.5.3
Found Easy Buster64 2.3.2
Found Easy Dunfell64 4.3
#
Very interesting, almost succeeded. OK:
...this time, all partitions unmounted.
This PC has two 1TB nvme SSDs and one 8TB HDD. Maybe there is something strange about the HDD.
Whatever, this behaviour is a worry, as I have so many scripts that mount a partition, read something off it, then unmount the partition. Standard practice is to have a "sync" before the umount. But now it is looking like have to put in a delay before unmounting.