You are not logged in.

#1 2012-11-30 22:20:03

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 121

systemd mount units and fsck

So I've been using

/etc/systemd/system/var.mount

[Unit]
Description=Var Directory

[Mount]
What=/dev/disk/by-label/var
Where=/var
Type=ext4
Options=defaults,noatime

[Install]
WantedBy=local-fs.target

where the /var filesystem is on /dev/sda2. But now I've got

% dmesg | grep sda2 | grep fsck
[   13.534990] EXT4-fs (sda2): warning: maximal mount count reached, running e2fsck is recommended

and systemd doesn't seem to be doing anything about it....  In particular,

% systemctl --no-pager list-units | grep fsck

gets no hits. Isn't systemd supposed to automatically enable systemd-fsck@dev-sda2.service ?

man systemd.mount says there is a FsckPassNo option for mount units, but also says that this option

...exists purely for compatibility reasons and should not be used in newly written mount files.

Is there some auto-fsck systemd option somewhere that I'm missing? I could manually enable systemd-fsck@dev-sda2.service with a symlink, but I'd much rather entice systemd to do what it's supposed to...

Note: Please don't reply "why aren't you using /etc/fstab for this mount".

Offline

#2 2012-11-30 22:48:40

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: systemd mount units and fsck

FsckPassNo=2

Offline

#3 2012-11-30 22:58:12

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 121

Re: systemd mount units and fsck

Yeah, but FsckPassNo "should not be used in newly written mount files", implying that systemd should be fsck'ing my filesystem without using this option....

Offline

#4 2012-11-30 23:03:30

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: systemd mount units and fsck

Well, when you have a fstab and systemd generates the mount files, it uses this setting..... sooooooo.... whatever you want ot make of that.

Offline

Board footer

Powered by FluxBB