0

I have a file based mount, used for nginx cache dir, so that the hundreds of thousands of little files don't clutter the main file system.

It's fstab line is the following:

/data/project/cache.img /data/project/cache ext4 discard,defaults,nofail 0 2

My problem that it cannot be unmounted cleanly at system restart. If I manually stop the nginx service and manually unmount it, then there are no problems, but automatically it generates the following journalctl logs:

May 17 01:09:44 hn systemd-fstab-generator[334]: Checking was requested for "/data/project/cache.img", but it is not a device.
May 17 01:09:44 hn systemd[1]: Mounting /data/project/cache...
May 17 01:09:44 hn systemd[1]: Mounted /data/project/cache.
--- reboot issued ---
May 17 01:21:25 hn systemd-fstab-generator[14467]: Checking was requested for "/data/project/cache.img", but it is not a device.
May 17 01:21:30 hn systemd-fstab-generator[14758]: Checking was requested for "/data/project/cache.img", but it is not a device.
May 17 01:21:31 hn systemd-fstab-generator[14783]: Checking was requested for "/data/project/cache.img", but it is not a device.
May 17 01:21:33 hn systemd-fstab-generator[15701]: Checking was requested for "/data/project/cache.img", but it is not a device.
May 17 01:21:33 hn systemd-fstab-generator[15724]: Checking was requested for "/data/project/cache.img", but it is not a device.
May 17 01:22:46 hn systemd[1]: Unmounting /data/project/cache...
May 17 01:22:46 hn umount[18509]: umount: /data/project/cache: target is busy.
May 17 01:22:46 hn systemd[1]: data-project-cache.mount: Mount process exited, code=exited status=32
May 17 01:22:46 hn systemd[1]: Failed unmounting /data/project/cache.

Ubuntu 18.04

0

Looks related to that 2 at the end of the corresponding /etc/fstab entry. Changing this 2 into a 0 would probably fix the issue, at the cost no not fscking your filesystem anymore.

See man fstab

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.