[systemd-devel] unit A is WantedBy unit B but unit B does not Want unit A?
Andrei Borzenkov
arvidjaar at gmail.com
Sat Nov 1 09:42:59 PDT 2014
Sometimes device gets Wants on mount point; sometimes not. I do not
really understand why. Also different mount units apparently behave
differently - e.g. mnt.mount "forgets" its history. It almost looks like
mnt.mount is destroyed after it is unmounted and t.mount not ...
cat /etc/fstab
UUID=ec5c431d-52a3-4e50-b7d0-2086c82d6f4b swap swap defaults 0 0
UUID=8b291227-1d97-4dcf-b7a7-35be000a3643 / ext4 acl,user_xattr 1 1
UUID=cdae3bb7-7462-4b86-bc30-ff7e48f815d0 /boot ext2 acl,user_xattr 1 2
UUID="ee092e94-48c8-464a-958d-967810227fff" /t btrfs nofail 1 2
cat /etc/systemd/system/mnt.mount
[Unit]
Description=/mnt
[Mount]
What=/dev/disk/by-uuid/ee092e94-48c8-464a-958d-967810227fff
Where=/mnt
Type=btrfs
Options=rw
systemctl status t.mount mnt.mount
t.mount - /t
Loaded: loaded (/etc/fstab)
Active: inactive (dead) since Sat 2014-11-01 19:38:01 MSK; 2min 53s ago
Where: /t
What: /dev/disk/by-uuid/ee092e94-48c8-464a-958d-967810227fff
Process: 1293 ExecMount=/bin/mount -n -t btrfs -o nofail /dev/disk/by-uuid/ee092e94-48c8-464a-958d-967810227fff /t (code=exited, status=0/SUCCESS)
mnt.mount - /mnt
Loaded: loaded (/etc/systemd/system/mnt.mount; static)
Active: inactive (dead)
Where: /mnt
What: /dev/disk/by-uuid/ee092e94-48c8-464a-958d-967810227fff
systemctl show -p WantedBy t.mount mnt.mount
WantedBy=local-fs.target dev-disk-by\x2duuid-ee092e94\x2d48c8\x2d464a\x2d958d\x2d967810227fff.device
WantedBy=dev-disk-by\x2duuid-ee092e94\x2d48c8\x2d464a\x2d958d\x2d967810227fff.device
systemctl show -p Wants dev-disk-by\x2duuid-ee092e94\x2d48c8\x2d464a\x2d958d\x2d967810227fff.device
Wants=t.mount
More information about the systemd-devel
mailing list