I am using a live Ubuntu USB disk (20.04) to repair a filesystem on another USB disk. The e2fsck command aborts because the filesystem is perceived as "in use".
- The filesystem is unmounted, and this is confirmed when I use the umount command.
- I run fuser to identify any processes using the unmounted filesystem.
- Fuser identifies 3 processes using the filesystem: cupsd, rsyslogd and unattended-upgrade...
- I try killing the processes but cupsd and rsyslogd simply restart.
- Afterwards, e2fsck still aborts
- If I reboot, the problem replicates itself.
You can see the code I've used and the results below. How can I repair this filesystem?
ubuntu@ubuntu:~$ sudo umount /dev/sdb5
umount: /dev/sdb5: not mounted.
ubuntu@ubuntu:~$ sudo e2fsck -p /dev/sdb5
/dev/sdb5 is in use.
e2fsck: Cannot continue, aborting.
ubuntu@ubuntu:~$ sudo fuser -m /dev/sdb5
/dev/sdb5: 1584 1590 1722
ubuntu@ubuntu:~$ ps -p 1584
PID TTY TIME CMD
1584 ? 00:00:00 rsyslogd
ubuntu@ubuntu:~$ ps -p 1590
PID TTY TIME CMD
1590 ? 00:00:00 cupsd
ubuntu@ubuntu:~$ ps -p 1722
PID TTY TIME CMD
1722 ? 00:00:00 unattended-upgr