[opensuse] Why is systemd mounting devices when I didn't ask for it?
I've got a USB-attached SATA drive with 2 partitions, and I think a thumb drive as well. Normally, only one of the SATA partitions is mounted. Twice now, I'm using the SATA drive, and I get I/O errors, and see that both partitions are mounted, and I've normal usage of the one which _should_ be mounted. Doesn't clear up until I manually umount, mount, etc. Tonight I find the following in /var/log/messages: 2013-12-07T22:55:30.616422-05:00 binkenlights systemd[1]: Unmounting /data5... 2013-12-07T22:55:30.656153-05:00 binkenlights umount[29066]: umount: /data5: target is busy. 2013-12-07T22:55:30.656377-05:00 binkenlights umount[29066]: (In some cases useful info about processes that use 2013-12-07T22:55:30.656430-05:00 binkenlights umount[29066]: the device is found by lsof(8) or fuser(1)) 2013-12-07T22:55:30.656494-05:00 binkenlights systemd[1]: data5.mount mount process exited, code=exited status=32 2013-12-07T22:55:30.656812-05:00 binkenlights systemd[1]: Failed unmounting /data5. 2013-12-07T22:55:30.896650-05:00 binkenlights mtp-probe: checking bus 4, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb4/ 4-2" 2013-12-07T22:55:30.914347-05:00 binkenlights mtp-probe: bus: 4, device: 4 was not an MTP device 2013-12-07T22:55:32.030377-05:00 binkenlights systemd[1]: Found device ST2000DM001-1E6164. 2013-12-07T22:55:32.034794-05:00 binkenlights systemd[1]: Found device ST2000DM001-1E6164. 2013-12-07T22:55:32.034953-05:00 binkenlights systemd[1]: Starting File System Check on /dev/disk/by-id/ata-ST2000DM001-1E6164 _W1E4R7CL-part2... 2013-12-07T22:55:32.221292-05:00 binkenlights systemd-fsck[29094]: /dev/sde2: clean, 219049/54992896 files, 38956703/219942400 blocks 2013-12-07T22:55:32.298043-05:00 binkenlights systemd[1]: Started File System Check on /dev/disk/by-id/ata-ST2000DM001-1E6164_ W1E4R7CL-part2. 2013-12-07T22:55:32.298506-05:00 binkenlights systemd[1]: Mounting /data6... 2013-12-07T22:55:32.388914-05:00 binkenlights systemd[1]: Mounted /data6. /data5 is the one I normally have mounted, and the above operations screwed me up files become inaccessible to me. /data6 is normally not mounted, but after (whatever systemd is up to), it is mounted and stays that way until I manually fix it. I've googled, and grepped half my fs to find signs of what is going on here, but no luck. TIA, Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 08/12/13 01:24, Michael Fischer escribió:
I've googled, and grepped half my fs to find signs of what is going on here, but no luck.
Post your /etc/fstab.. -- "Judging by their response, the meanest thing you can do to people on the Internet is to give them really good software for free". - Anil Dash -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sun, Dec 08, Cristian Rodríguez wrote:
El 08/12/13 01:24, Michael Fischer escribió:
I've googled, and grepped half my fs to find signs of what is going on here, but no luck.
Post your /etc/fstab..
Below. Note that /data3 and /data4 are legacy (and copied from an older install). Not plugged in anymore. /dev/disk/by-id/ata-ST2000DM001-9YN164_Z1E1NQNT-part4 swap swap defaults 0 0 /dev/disk/by-id/ata-ST2000DM001-9YN164_Z1E1NQNT-part6 / ext4 acl,user_xattr 1 1 /dev/disk/by-id/ata-ST2000DM001-9YN164_Z1E1NQNT-part2 /boot/efi vfat umask=0002,utf8=true 0 0 /dev/disk/by-id/ata-ST2000DM001-9YN164_Z1E1NQNT-part7 /home ext4 acl,user_xattr 1 2 proc /proc proc defaults 0 0 sysfs /sys sysfs noauto 0 0 debugfs /sys/kernel/debug debugfs noauto 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0 /dev/disk/by-id/ata-WDC_WD20EARX-00PASB0_WD-WMAZA5608669-part1 /data3 ext3 noatime,user,noauto,acl,user_xattr 0 0 /dev/disk/by-id/ata-WDC_WD20EARX-00PASB0_WD-WMAZA5608669-part2 /data4 ext3 noatime,user,noauto,acl,user_xattr 0 0 /dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part1 /data5 ext4 noatime,user,acl,user_xattr,nofail 1 2 /dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part2 /data6 ext4 noatime,user,acl,user_xattr,nofail 1 2 Thanks. Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 08/12/13 01:50, Michael Fischer escribió:
On Sun, Dec 08, Cristian Rodríguez wrote:
El 08/12/13 01:24, Michael Fischer escribió:
I've googled, and grepped half my fs to find signs of what is going on here, but no luck.
Post your /etc/fstab..
Below. Note that /data3 and /data4 are legacy (and copied from an older install). Not plugged in anymore.
proc /proc proc defaults 0 0 sysfs /sys sysfs noauto 0 0 debugfs /sys/kernel/debug debugfs noauto 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0
remove all those, they are not needed and may break something.
/dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part1 /data5 ext4 noatime,user,acl,user_xattr,nofail 1 2 /dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part2 /data6 ext4 noatime,user,acl,user_xattr,nofail 1 2
set noauto in /data6 if you do not want systemd to mount it, otherwise it will do so, as expected. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sun, Dec 08, Cristian Rodríguez wrote:
Below. Note that /data3 and /data4 are legacy (and copied from an older install). Not plugged in anymore.
proc /proc proc defaults 0 0 sysfs /sys sysfs noauto 0 0 debugfs /sys/kernel/debug debugfs noauto 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0
remove all those, they are not needed and may break something.
/dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part1 /data5 ext4 noatime,user,acl,user_xattr,nofail 1 2 /dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part2 /data6 ext4 noatime,user,acl,user_xattr,nofail 1 2
set noauto in /data6 if you do not want systemd to mount it, otherwise it will do so, as expected.
Ok, I've done your suggestions. I'll report back if I get further trouble on this front. Thank you. Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-12-08 06:04, Cristian Rodríguez wrote:
/dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part1 /data5 ext4 noatime,user,acl,user_xattr,nofail 1 2 /dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part2 /data6 ext4 noatime,user,acl,user_xattr,nofail 1 2
set noauto in /data6 if you do not want systemd to mount it, otherwise it will do so, as expected.
Hey, no, it is expected they be mounted at boot, or when the admin uses "mount -a". It is not expected that they are mounted after the admin has umounted them manually. -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar)
В Sun, 08 Dec 2013 14:34:02 +0100 "Carlos E. R." <robin.listas@telefonica.net> пишет:
On 2013-12-08 06:04, Cristian Rodríguez wrote:
/dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part1 /data5 ext4 noatime,user,acl,user_xattr,nofail 1 2 /dev/disk/by-id/ata-ST2000DM001-1E6164_W1E4R7CL-part2 /data6 ext4 noatime,user,acl,user_xattr,nofail 1 2
set noauto in /data6 if you do not want systemd to mount it, otherwise it will do so, as expected.
Hey, no, it is expected they be mounted at boot, or when the admin uses "mount -a". It is not expected that they are mounted after the admin has umounted them manually.
No, this statement (taken "as is" without context) is incorrect. systemd will not mount filesystem "after the admin has umounted them manually". What happens here is - when filesystem is entered in /etc/fstab with "auto,nofail", systemd tries to mount this filesystem as soon as it sees device for it. Without "nofail" it would have failed on boot already. When filesystem is unmounted using GUI, device is deleted from system, so next time device appears it is attempted to be mounted. This behavior is rather unexpected to me as well and seems new in systemd coming with 13.1. I cannot say whether this is intentional change or not.
В Sun, 8 Dec 2013 20:27:33 +0400 Andrey Borzenkov <arvidjaar@gmail.com> пишет:
What happens here is - when filesystem is entered in /etc/fstab with "auto,nofail", systemd tries to mount this filesystem as soon as it sees device for it. Without "nofail" it would have failed on boot already. When filesystem is unmounted using GUI, device is deleted from system, so next time device appears it is attempted to be mounted.
This behavior is rather unexpected to me as well and seems new in systemd coming with 13.1. I cannot say whether this is intentional change or not.
Actually it seems to be present for quite some time. For filesystems with "auto" systemd implicitly adds Wants dependency from device to mount unit. Thinking about it, it does not sound that weird. You asked for device to be automatically mounted and it ensures it *is* automatically mounted as soon as it is present. Of course, this is one of many silent assumptions made by systemd which better be documented ...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-12-08 19:40, Andrey Borzenkov wrote:
Thinking about it, it does not sound that weird. You asked for device to be automatically mounted and it ensures it *is* automatically mounted as soon as it is present.
It breaks things. I may umount a partition temporarily to do an image backup of it, for instance (or any other reason of my choice). If it gets mounted while I do the imaging, it will be useless. I want it mounted automatically at boot, but not later on its own. - -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKkwPYACgkQtTMYHG2NR9UIZQCfey3aQThD6MHOcya/3A6J+oUR n5MAoIVn6xH0Ax5IEE4vycW4epxpYyev =Lyph -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Sun, 08 Dec 2013 19:56:54 +0100 "Carlos E. R." <carlos.e.r@opensuse.org> пишет:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2013-12-08 19:40, Andrey Borzenkov wrote:
Thinking about it, it does not sound that weird. You asked for device to be automatically mounted and it ensures it *is* automatically mounted as soon as it is present.
It breaks things.
I may umount a partition temporarily to do an image backup of it, for instance (or any other reason of my choice). If it gets mounted while I do the imaging, it will be useless.
I repeat it once more - it does not get mounted after you unmount it. Please show evidence that it happens.
I want it mounted automatically at boot, but not later on its own.
- -- Cheers / Saludos,
Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlKkwPYACgkQtTMYHG2NR9UIZQCfey3aQThD6MHOcya/3A6J+oUR n5MAoIVn6xH0Ax5IEE4vycW4epxpYyev =Lyph -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlKkwZoACgkQR6LMutpd94xd9wCfQmCko1+5WaGvdjp3B0jMB+g5 vWwAn1Q5uyTNo8DI11Mynd+9rmR9ZKu1 =HRZY -----END PGP SIGNATURE----- N▀╖╡ФЛr╦⌡yИ ┼Z)z{.╠О╝·к⌡╠йБmЙ)z{.╠Й+│:╒{Zrшaz▄'z╥╕j)h╔ИЛ╨г╬ё ч╝┼^·к╛z┼Ю
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-12-08 19:59, Andrey Borzenkov wrote:
I repeat it once more - it does not get mounted after you unmount it. Please show evidence that it happens.
That is what I understand it happened to the OP. - -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlKkwjoACgkQtTMYHG2NR9X+iQCfSQya4PPHs/fndwiPThT3qEJ0 crsAn0noi2jeSnM/00awJVx9eJDmDrBn =AL+K -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 В Sun, 08 Dec 2013 20:02:18 +0100 "Carlos E. R." <carlos.e.r@opensuse.org> пишет:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2013-12-08 19:59, Andrey Borzenkov wrote:
I repeat it once more - it does not get mounted after you unmount it. Please show evidence that it happens.
That is what I understand it happened to the OP.
OP did not provide enough information to draw such conclusion. It is unknown what exactly was done and in which sequence. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlKkxkIACgkQR6LMutpd94y8wQCgwEegbCQI5UTCfMI6tiDeMkiY /90AoI02LG5sSo4ntRRq4rfT7xT8/mRb =ZH0N -----END PGP SIGNATURE----- N▀╖╡ФЛr╦⌡yИ ┼Z)z{.╠О╝·к⌡╠йБmЙ)z{.╠Й+│:╒{Zrшaz▄'z╥╕j)h╔ИЛ╨г╬ё ч╝┼^·к╛z┼Ю
On Sun, Dec 08, Andrey Borzenkov wrote:
В Sun, 08 Dec 2013 20:02:18 +0100 "Carlos E. R." <carlos.e.r@opensuse.org> пишет:
On 2013-12-08 19:59, Andrey Borzenkov wrote:
I repeat it once more - it does not get mounted after you unmount it. Please show evidence that it happens.
That is what I understand it happened to the OP.
OP did not provide enough information to draw such conclusion. It is unknown what exactly was done and in which sequence.
OP here. Hadn't checked the list in a couple of days. I have a USB-attached SATA drive with 2 partitions. Previous incarnations had had the 'noauto' in fstab. For whatever reasons, the current incarnation wound up not having that bit in their /etc/fstab stanzas. Upshot is that without the 'noauto', once per day, systemd would decide to mount both partitions - which is not what I wanted. I wanted (and previously had) the behavior that those partitions were only mounted OR unmounted when I did so manually. Systemd choosing to mount those partitions screwed up my workflow, in ways not unlike Carlos' example. With 'user,noauto' in their /etc/fstab stanzas, I seem to be back to my desired system behavior. Thanks all. Michael -- Michael Fischer michael@visv.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Andrey Borzenkov
-
Carlos E. R.
-
Carlos E. R.
-
Cristian Rodríguez
-
Michael Fischer