You are not logged in.

#1 2015-10-11 19:34:34

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Seeking understanding with systemd media mount unit

Hello Archers,

I'm seeking further understanding of a particular issue I've had.  I have a workaround but would like to know more.  Links or responses are very welcome.

1.  I have an sdcard that is permanently inserted into my macbook air 6,2 mid 2013 (I have to unload/reload xhci_pci and xhci_hcd modules when suspending)
2.  Udev picks it up and maps it to /dev/sdb1 (initially)
3.  I mount it via udiskie in xinitrc
4.  After 1-10 suspend/resume cycles it will remap to /dev/sdc1
5.  When this device remap happens, media-mysdcard.mount fails in systemctl
6.  Udiskie then fails to mount /dev/sdc1 as it unmounts right away

Solution is to run

systemctl reset-failed

prior to mounting via udiskie.  I have added that line in my /usr/lib/systemd/system-sleep script under 'post' to work around this issue.

What I'm looking to educate myself on is:

1.Can systemd be more dynamic with their mount unit or is the only way being a manual intervention like the workaround above?
2. Does the mount unit need to be in existence or be maintained by systemd?  As in, is there a way to mount the sdcard without systemd?

Links I've read:
http://www.freedesktop.org/software/sys … mount.html
http://www.freedesktop.org/software/sys … .unit.html
https://wiki.archlinux.org/index.php/Systemd

Last edited by frank604 (2015-10-13 03:50:47)

Offline

Board footer

Powered by FluxBB