您尚未登录。

#1 2015-09-22 22:46:52

atmouse
会员
注册时间: 2011-08-24
帖子: 701

poweroff前,如何退出login session所有service再开始umount

我用systemctl --user enable psd.service
设置了当前用户登录的时候挂载 overlayfs分区,当我登录xorg,poweroff关机的时候

Sep 22 19:56:56 ArchCC systemd[1]: Stopped Session c2 of user atmouse.
Sep 22 19:56:56 ArchCC systemd[1]: Started Store Sound Card State.
Sep 22 19:56:56 ArchCC systemd[1]: Stopped uWSGI service unit.
Sep 22 19:56:56 ArchCC systemd[1]: Stopped Network Name Resolution.
Sep 22 19:56:56 ArchCC systemd[1]: Unmounted /run/user/1000/atmouse-icecat-jata83jp.new.
Sep 22 19:56:56 ArchCC systemd[1]: Unmounted /boot.
Sep 22 19:56:56 ArchCC systemd[1]: Stopped Initialize hardware monitoring sensors.
Sep 22 19:56:56 ArchCC mkinitcpio[2284]: ==> Starting build: none
Sep 22 19:56:56 ArchCC mkinitcpio[2284]: -> Running build hook: [sd-shutdown]
Sep 22 19:56:56 ArchCC wpa_supplicant[705]: p2p-dev-wlan0: CTRL-EVENT-TERMINATING
Sep 22 19:56:56 ArchCC kernel: wlan0: deauthenticating from 78:24:af:e6:41:14 by local choice (Reason: 3=DEAUTH_LEAVING)
Sep 22 19:56:56 ArchCC wpa_supplicant[705]: wlan0: CTRL-EVENT-DISCONNECTED bssid=78:24:af:e6:41:14 reason=3 locally_generated=1
Sep 22 19:56:56 ArchCC systemd-networkd[361]: wlan0: Lost carrier
Sep 22 19:56:56 ArchCC kernel: cfg80211: World regulatory domain updated:
Sep 22 19:56:56 ArchCC kernel: cfg80211:  DFS Master region: unset
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Sep 22 19:56:56 ArchCC kernel: cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
Sep 22 19:56:56 ArchCC sudo[2360]:  atmouse : TTY=unknown ; PWD=/home/atmouse ; USER=root ; COMMAND=/usr/sbin/psd-overlay-helper -v 23 -l /home/atmouse/.mozilla/icecat/jata83jp.new-backup -u
Sep 22 19:56:56 ArchCC systemd[1]: Unset automount umask=0077.
Sep 22 19:56:56 ArchCC systemd[1]: Unmounting /run/user/1000...
Sep 22 19:56:56 ArchCC systemd[1]: Removed slice system-uwsgi.slice.
Sep 22 19:56:56 ArchCC systemd[1]: Stopping Login Service...
Sep 22 19:56:56 ArchCC systemd[1]: Removed slice system-getty.slice.
Sep 22 19:56:56 ArchCC sudo[2360]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 22 19:56:56 ArchCC umount[2378]: umount: /run/user/1000: target is busy
Sep 22 19:56:56 ArchCC umount[2378]: (In some cases useful info about processes that
Sep 22 19:56:56 ArchCC umount[2378]: use the device is found by lsof(8) or fuser(1).)
Sep 22 19:56:56 ArchCC systemd[1]: Stopped A high performance web server and a reverse proxy server.
Sep 22 19:56:56 ArchCC systemd[1]: run-user-1000.mount: Mount process exited, code=exited status=32
Sep 22 19:56:56 ArchCC systemd[1]: Failed unmounting /run/user/1000.
Sep 22 19:56:56 ArchCC systemd[1]: Stopped target Local File Systems (Pre).
Sep 22 19:56:56 ArchCC systemd[1]: Stopped target Network.
Sep 22 19:56:56 ArchCC systemd[1]: Stopping Network Service...
Sep 22 19:56:56 ArchCC sudo[2360]: pam_unix(sudo:session): session closed for user root
Sep 22 19:56:56 ArchCC profile-sync-daemon[2292]: icecat sync successful
Sep 22 19:56:56 ArchCC mkinitcpio[2284]: ==> Build complete.
Sep 22 19:56:56 ArchCC systemd[1]: Started Generate shutdown-ramfs.
Sep 22 19:56:56 ArchCC systemd[1]: Stopped Network Service.
Sep 22 19:56:56 ArchCC systemd[1]: Stopping D-Bus System Message Bus...
Sep 22 19:56:56 ArchCC systemd[1]: Stopped D-Bus System Message Bus.
Sep 22 19:56:56 ArchCC wpa_supplicant[705]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Sep 22 19:56:56 ArchCC systemd[1]: Stopped Login Service.
Sep 22 19:56:56 ArchCC wpa_supplicant[705]: wlan0: CTRL-EVENT-TERMINATING
Sep 22 19:56:56 ArchCC systemd[1]: Stopped WPA supplicant daemon (interface-specific version).
Sep 22 19:56:56 ArchCC systemd[1]: Removed slice system-wpa_supplicant.slice.
Sep 22 19:56:56 ArchCC sudo[2424]:  atmouse : TTY=unknown ; PWD=/home/atmouse ; USER=root ; COMMAND=/usr/sbin/psd-overlay-helper -d /run/user/1000/atmouse-icecat-jata83jp.new mountdown
Sep 22 19:56:56 ArchCC sudo[2424]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 22 19:56:56 ArchCC sudo[2424]: pam_unix(sudo:session): session closed for user root
Sep 22 19:56:56 ArchCC profile-sync-daemon[2292]: icecat unsync successful
Sep 22 19:56:56 ArchCC systemd[2124]: Stopped Profile-sync-daemon.

Failed unmounting /run/user/1000. 这一行,无法umount /run/user/1000,因为当时这个文件还有在写,psd在关闭的时候会umount /run/user/1000/atmouse-icecat-jata83jp.new 并把修改同步到我的用户路径下。

就是因为Sep 22 19:56:56 ArchCC systemd[2124]: Stopped Profile-sync-daemon.
这一行没有在 Sep 22 19:56:56 ArchCC umount[2378]: umount: /run/user/1000: target is busy 这一行,之前,所以导致busy无法umount。

现在的問題是,我应该如何设置顺序,让 Stopped Profile-sync-daemon.这个服务后,才开始umount分区?

离线

页脚