You are not logged in.

#1 2019-09-24 11:02:50

MS1
Member
Registered: 2018-02-02
Posts: 95

Partition will not stay unmounted

I have a partition set to mount in fstab like this

/dev/sda3 /mnt/cup f2fs noauto,x-systemd.automount 0 0

How can I stop systemd from mounting it after I manually "umount /mnt/cup" it so I can run fsck.f2fs on it?

Offline

#2 2019-09-24 11:16:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,410

Re: Partition will not stay unmounted

Remove the automount parameter would be the obvious choice, the less obvious choice would be masking/disabling the relevant mount units that systemd will have generated. https://wiki.archlinux.org/index.php/Sy … sing_units

Offline

#3 2019-09-24 12:02:05

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,682
Website

Re: Partition will not stay unmounted

To elaborate on the above -- when you add x-systemd.automount to the mount options, systemd creates an automount unit for that device which watches the mount point and mounts the filesystem whenever something accesses it. To stop that behaviour, you need to stop the automount unit.

# systemctl stop mnt-cup.automount

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2019-09-24 12:39:50

MS1
Member
Registered: 2018-02-02
Posts: 95

Re: Partition will not stay unmounted

I stopped the automount service and /mnt/cup is not mounted but something thinks it still is

# mount|grep cup
#

# fsck.f2fs -a /dev/sda3
Info: Fix the reported corruption.
	Error: In use by the system!

Offline

#5 2019-09-24 13:23:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,323

Re: Partition will not stay unmounted

# mount | grep sda3
# lsof | grep sda3

Offline

#6 2019-09-24 20:03:59

MS1
Member
Registered: 2018-02-02
Posts: 95

Re: Partition will not stay unmounted

For both commands I get no response, just a new prompt.

Offline

#7 2019-09-24 20:17:03

loqs
Member
Registered: 2014-03-06
Posts: 19,100

Re: Partition will not stay unmounted

Please post the full output from `mount`
Edit:
Also the output of

cat /etc/fstab
file /etc/mtab

Last edited by loqs (2019-09-24 20:18:09)

Offline

Board footer

Powered by FluxBB