Gentoo Archives: gentoo-user

From: "刘洋" <amankwah7@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] System hangs when poweroff with NFS mounted
Date: Fri, 24 Jan 2014 15:45:48
Message-Id: CAGA4-wYCympzL0gPasx+0BKOT8RWr=aDxUpgWYP6Ye026CMLcQ@mail.gmail.com
In Reply to: Re: [gentoo-user] System hangs when poweroff with NFS mounted by "Canek Peláez Valdés"
1 journalctl --boot=-1
2 -- Logs begin at Tuesday 2013-12-24 21:48:33 CST, end at Friday
3 2014-01-24 22:38:38 CST. --
4 1月 24 21:54:22 diamond systemd[3061]: Failed to open private bus
5 connection: Failed to connect to socket
6 /run/user/1000/dbus/user_bus_socket: No such file or directory
7 1月 24 21:54:22 diamond systemd[3061]: Mounted /sys/kernel/config.
8 1月 24 21:54:22 diamond systemd[3061]: Mounted /sys/fs/fuse/connections.
9 1月 24 21:54:22 diamond systemd[3061]: Stopped target Bluetooth.
10 1月 24 21:54:22 diamond systemd[3061]: Stopped target Sound Card.
11 1月 24 21:54:22 diamond systemd[3061]: Starting Default.
12 1月 24 21:54:22 diamond systemd[3061]: Reached target Default.
13 1月 24 21:54:22 diamond systemd[3061]: Startup finished in 419ms.
14 1月 24 21:54:31 diamond pulseaudio[3293]: [pulseaudio] pid.c: Daemon
15 already running.
16 1月 24 21:54:31 diamond pulseaudio[3296]: [pulseaudio] pid.c: Daemon
17 already running.
18 1月 24 21:54:31 diamond pulseaudio[3299]: [pulseaudio] pid.c: Daemon
19 already running.
20 1月 24 21:54:31 diamond pulseaudio[3301]: [pulseaudio] pid.c: Daemon
21 already running.
22 1月 24 21:55:01 diamond sudo[3362]: amankwah : TTY=pts/4 ;
23 PWD=/home/amankwah ; USER=root ; COMMAND=/bin/sh
24 1月 24 22:34:32 diamond systemd[3061]: Stopping Default.
25 1月 24 22:34:32 diamond systemd[3061]: Stopped target Default.
26 1月 24 22:34:32 diamond systemd[3061]: Starting Shutdown.
27 1月 24 22:34:32 diamond systemd[3061]: Reached target Shutdown.
28 1月 24 22:34:49 diamond pulseaudio[3279]: [pulseaudio] core-util.c:
29 Failed to create secure directory (/run/user/1000/pulse): No such file
30 or directory
31
32 These are the output of the command on my system after hangs. but why
33 I saw nothing about my NFS directories?
34
35 I added the script to the path, and the system shutdown correctly, but
36 the time is too long, every NFS directory complained the timeout due
37 to and then umounted, maybe it took about 10 minutes for choosing the
38 shutdown under desktop to the system poweroff automatically.
39
40 2014/1/20 Canek Peláez Valdés <caneko@×××××.com>:
41 > On Sun, Jan 19, 2014 at 9:40 AM, Amankwah <amankwah7@×××××.com> wrote:
42 >> Hi all,
43 >> I swithed to Gnome3 last week, and the systemd is needed by
44 >> gnome3.8, so I used systemd to replace the openrc now. Howerver, my
45 >> system always hangs when I try to poweroff.
46 >> I have NFSv3 filesystem mounted via WiFi, it's managed by the
47 >> Networkmanager. so it seemed that the wireless connection was cut off
48 >> before the NFS was unmounted? I searched this problem and modified my
49 >> fstab line like this:
50 >>
51 >> NAS:/data /media/NAS nfs
52 >> _netdev,x-systemd.automount,x-systemd.device-timeout=10ms,rw,soft,vers=3
53 >> 0 0
54 >>
55 >> It's worked under the wired connnection, but the wireless connection
56 >> still hangs, Is there any thing should be changed? Or is it a bug?"
57 >
58 > I think it's a bug; systemd should stop NetworkManager.service only
59 > after all remote filesystems have been umounted. Could you boot up
60 > your machine after it hanged, and send the contents from "journalctl
61 > --boot=-1". That will give us the logs from the previous boot; perhaps
62 > we can see the problem.
63 >
64 >> I have to umount the NFS before poweroff everytime. Please tell me what can I do to
65 >> resove this problem?
66 >
67 > I think it's a bug, but in the meantime (as a workaround) you can put
68 > the following script in
69 > /usr/lib/systemd/system-shutdown/nfs-force-umount:
70 >
71 > ---------------------------------
72 > #!/bin/sh
73 > /bin/umount -l /media/NAS
74 > ---------------------------------
75 >
76 > Make sure the script is executable.
77 >
78 > Regards.
79 > --
80 > Canek Peláez Valdés
81 > Posgrado en Ciencia e Ingeniería de la Computación
82 > Universidad Nacional Autónoma de México
83 >

Replies

Subject Author
Re: [gentoo-user] System hangs when poweroff with NFS mounted "Canek Peláez Valdés" <caneko@×××××.com>