Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd-216: mount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4222

PostPosted: Sat Aug 23, 2014 4:28 pm    Post subject: systemd-216: mount Reply with quote

systemd-216 manages somehow to obtain full control over mount points:

If a mount unit for some filesystem exists (which is unavoidable if this is in /etc/fstab) then this mount point can neither be mounted nor umounted with the "mount" and "umount" commands, only by starting or stopping the systemd units.

How is this possible?

And - more important - how can I prevent this new BS of systemd-216? So far, the only "workaround" to this annoying behaviour seems to be to link the unit to /dev/null - even a ConditionNull in the unit does not stop this broken behaviour of systemd.
Back to top
View user's profile Send private message
TheCubeIsALie
n00b
n00b


Joined: 11 Sep 2013
Posts: 19

PostPosted: Sat Aug 23, 2014 8:29 pm    Post subject: Reply with quote

Odd, I'm using systemd-216 as well yet I do not have this problem. I have an external hard drive mounted at /mnt/drive that's listed in my fstab that I can mount and unmount as ease using their respective commands.

Here's what /run/systemd/generator/mnt-drive.mount looks like on my system
Code:
# Automatically generated by systemd-fstab-generator

[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target

[Mount]
What=/dev/disk/by-partuuid/4b6676ba-ad27-40ef-a1b4-8d6c8e8f4302
Where=/mnt/drive
Type=btrfs
Options=noatime,space_cache,inode_cache,compress=lzo,autodefrag


Perhaps the fstab generator is the problem here? Booting Linux with the kernel parameter fstab="no" should stop systemd from handling these mount points, perhaps this would fix your problem.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4222

PostPosted: Sun Aug 24, 2014 9:26 am    Post subject: Reply with quote

Thanks for the reply.

Meanwhile I found that it is necessary that the mount-device is from /dev/mapper.
Thus, the existence of the following unit prevents the manual mounting/umounting of /srv/foo (note that even ConditionNull is used...):

/etc/systemd/system/srv-foo.mount wrote:
[Mount]
ConditionNull=false
What=/dev/mapper/nonexistent
Where=/srv/foo
Type=dummy

In the moment when the "Where" directory is changed or "/dev/mapper/nonexistent" is modified to "/nonexistent" the mounting of /srv/foo is possible
(Of course, "systemctl daemon-reload" has to be used when making such modifications).

TheCubeIsALie wrote:
Perhaps the fstab generator is the problem here?

It is undesired here, since I actually do not want a unit for the corresponding mount-point, but it is of course not the "cause" for this misbehaviour of systemd.
Quote:
Booting Linux with the kernel parameter fstab="no"

This is not a solution for me, since most of my partitions should be mounted automatically. I cuold as well mask the wrongly generated units. B[/i]ut both is a lot of work and prevents me from copying my /etc/systemd configuration to my other systems which have different mount-points.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum