unmount a busy drive
"target is busy": something still uses the drive. Find it, stop it, then unmount.
disks
steps
-
sudo lsof +f -- /mnt/pointthe open files on it, and their programs
-
sudo fuser -vm /mnt/pointthe programs using it
-
cd ~your own shell may be the one inside it
-
sudo umount /mnt/pointunmount it
-
sudo umount -l /mnt/pointlazy: detach it now, finish when nothing uses it
commands used
lsoffuserumount
Each has a page in lore: lore lsof opens it.
create a large file
Make a file of a given size, for testing disks, uploads or swap.
disk full but df says there is room
"No space left on device" with free gigabytes: the disk is out of inodes, the slots for files. Find the folder with too many small files.
find big files
Find the files that take the most room, on a whole disk or in a folder.
free disk space
Find what fills a disk, then clear what is safe to clear: old package files, logs, caches.