fsck not working on second hdd mounted via fstab

Feb 3, 2022
65
6
13
29
Hello everyone,

the PBS should check periodic the filesystem of the Backup Store aswell as the root Disk.
For the Root-Disk it works normally but I checked when the last check of the Datastore was and its 2 Years ago. Which cant be right because the periodic check is enabled todo after all 2 Reboots or 2 weeks whatever comes first.
What did I miss?

Bash:
cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pbs/root / ext4 errors=remount-ro 0 1
/dev/pbs/swap none swap sw 0 0
/dev/sdb1 /mnt/datastore/BackupStore ext4 defaults 0 2
proc /proc proc defaults 0 0

Bash:
tune2fs -l /dev/sdb1 | egrep -h 'Maximum mount count|Check interval|Last checked|Next check'
Maximum mount count:      2
Last checked:             Sun Aug  7 16:14:21 2022
Check interval:           1209600 (2 weeks)
Next check after:         Sun Aug 21 16:14:21 2022

Any help is really appreciated,

Kind regards
 
Hi,
what is the output of journalctl -u systemd-fsck@dev-sdb1?
 
Please try to run it manually by executing systemctl start systemd-fsck@dev-sdb1 and check the output of journalctl -u systemd-fsck@dev-sdb1 once again. According to man systemd-fsck your filesystems should be checked as passno is set to be non-zero in your fstab entry.
 
Please try to run it manually by executing systemctl start systemd-fsck@dev-sdb1 and check the output of journalctl -u systemd-fsck@dev-sdb1 once again. According to man systemd-fsck your filesystems should be checked as passno is set to be non-zero in your fstab entry.
The Output is:
Bash:
root@pbs01:~# journalctl -u systemd-fsck@dev-sdb1
Nov 14 16:59:42 pbs01 systemd[1]: Starting systemd-fsck@dev-sdb1.service - File System Check on /dev/sdb1...
Nov 14 16:59:42 pbs01 systemd[1]: Finished systemd-fsck@dev-sdb1.service - File System Check on /dev/sdb1.

Edit:

But still when I check via Tune2fs after a reboot:

Bash:
root@pbs01:~# tune2fs -l /dev/sdb1 | egrep -h 'Maximum mount count|Check interval|Last checked|Next check'
Maximum mount count:      2
Last checked:             Sun Aug  7 16:14:21 2022
Check interval:           1209600 (2 weeks)
Next check after:         Sun Aug 21 16:14:21 2022

also when I check via Journal it says Deactivated Successfully and stopped after reboot:
Bash:
Nov 14 17:00:19 pbs01 systemd[1]: systemd-fsck@dev-sdb1.service: Deactivated successfully.
Nov 14 17:00:19 pbs01 systemd[1]: Stopped systemd-fsck@dev-sdb1.service - File System Check on /dev/sdb1.

Edit2:

I could figure it out: there was a systemd Service file which was mounting the drive manually instead via fstab. Due to the boot que I assume that the service got loaded before fstab can mount the drive. I deleted the file and now its working.
As far as I know I created the mount via the gui this might created the file. Now its fixed:

Bash:
root@pbs01:~# tune2fs -l /dev/sdb1 | egrep -h 'Maximum mount count|Check interval|Last checked|Next check'
Maximum mount count:      2
Last checked:             Thu Nov 14 17:24:24 2024
Check interval:           1209600 (2 weeks)
Next check after:         Thu Nov 28 17:24:24 2024
 
Last edited:
  • Like
Reactions: waltar
systemd Service file which was mounting the drive manually
it happened because when you created datastore, you've checked removable datastore checkbox.