You are not logged in.

#1 2012-10-13 10:54:38

Syrius00
Member
From: Perugia, Italy
Registered: 2012-10-01
Posts: 16

[SOLVED] Systemd Shutdown not finishing

Hello everyone

I have Arch on a pure systemd installation but my shutdown hangs. I enabled the debug shell and this is the final part of journalctl output:

Oct 11 23:24:00 eternal-archer systemd[1]: Closed D-Bus System Message Bus Socket.
Oct 11 23:24:00 eternal-archer systemd[1]: Stopping Encrypted Volumes.
Oct 11 23:24:00 eternal-archer systemd[1]: Stopping Setup Virtual Console...
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounting /home...
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounting /var...
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounting /boot...
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounting /tmp...
Oct 11 23:24:00 eternal-archer dmeventd[366]: There are still devices being monitored.
Oct 11 23:24:00 eternal-archer dmeventd[366]: Refusing to exit.
Oct 11 23:24:00 eternal-archer ntfs-3g[393]: Unmounting /dev/mapper/isw_cdifdhhabf_Storagep1 (Storage)
Oct 11 23:24:00 eternal-archer systemd[1]: Started Console System Shutdown Logging.
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounted /run/media/et3rnity/Storage.
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounted /boot.
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounted /tmp.
Oct 11 23:24:00 eternal-archer systemd[1]: Unmounted /var.
Oct 11 23:24:01 eternal-archer systemd[1]: Unmounted /home.
Oct 11 23:24:01 eternal-archer systemd[1]: Starting Unmount All Filesystems.
Oct 11 23:24:01 eternal-archer systemd[1]: Reached target Unmount All Filesystems.
Oct 11 23:24:01 eternal-archer systemd[1]: Stopping Local File Systems (Pre).
Oct 11 23:24:01 eternal-archer systemd[1]: Stopped target Local File Systems (Pre).
Oct 11 23:24:01 eternal-archer systemd[1]: Stopping Remount Root and Kernel File Systems...
Oct 11 23:24:01 eternal-archer systemd[1]: Stopped Remount Root and Kernel File Systems.

... and then system sits here until a systemctl --force poweroff.

It may be helpful to add that I uninstalled mdadm because of conflicts with dmraid. Anyway, before that, even if I could not use properly my (bios) raid configuration, the system could shutdown normally.

Thanks for any help smile

Last edited by Syrius00 (2012-10-14 11:53:50)

Offline

#2 2012-10-13 10:56:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,096
Website

Re: [SOLVED] Systemd Shutdown not finishing

Syrius00 wrote:

It may be helpful to add that I uninstalled mdadm because of conflicts with dmraid.

You picked the wrong one to uninstall. mdadm will assemble your fakeraid just fine. The devices will change names, but everything should just work. As an added bonus, mdadm has a living upstream. dmraid does not.

Last edited by falconindy (2012-10-13 10:56:43)

Offline

#3 2012-10-13 11:31:24

Syrius00
Member
From: Perugia, Italy
Registered: 2012-10-01
Posts: 16

Re: [SOLVED] Systemd Shutdown not finishing

Thank you very much for your answer smile

I decided to keep dmraid because was the software used by the latest live Ubuntu distro and it could read, mount, umount the Raid normally and shutdown gracefully. I know mdadm can do the same, but something does not work. I can mount the volume from Nautilus (btw, I am using Gnome 3) but I can't umount it (device busy) so the shutdown process still does not finish. Here is the output of lsblk, focused on the RAID drives:

sdc      8:32   0 298.1G  0 disk 
└─sdc1   8:33   0 298.1G  0 disk 
sdd      8:48   0 298.1G  0 disk 
└─sdd1   8:49   0 298.1G  0 disk 

Here is the output if I try to assemble them manually:

sudo mdadm -A /dev/md0 /dev/sdc1 /dev/sdd1
mdadm: Cannot assemble mbr metadata on /dev/sdc1
mdadm: /dev/sdc1 has no superblock - assembly aborted

Same thing if I switch the drives.

Here is cat /proc/mdstat;

md126 : active (auto-read-only) raid1 sdc[1] sdd[0]
      312568832 blocks super external:/md127/0 [2/2] [UU]
      
md127 : inactive sdc[1](S) sdd[0](S)
      4520 blocks super external:imsm
       
unused devices: <none>

And this is another interesting output:

sudo mdadm -A /dev/md0 /dev/sdc /dev/sdd
mdadm: /dev/sdc is busy - skipping
mdadm: /dev/sdd is busy - skipping

Any clue?

Offline

#4 2012-10-13 12:36:43

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,096
Website

Re: [SOLVED] Systemd Shutdown not finishing

/proc/mdstat seems to imply that it _did_ assemble an array (probably auto assembled by udev rules -- see /lib/udev/rules/64-md-raid.rules). Can you mount /dev/md126? What does blkid say about it?

It looks like the array has external metadata, which may mean that mdmon needs to be running alongside to monitor the array and update accordingly.

Last edited by falconindy (2012-10-13 12:37:22)

Offline

#5 2012-10-13 16:44:36

Syrius00
Member
From: Perugia, Italy
Registered: 2012-10-01
Posts: 16

Re: [SOLVED] Systemd Shutdown not finishing

Yes I can mount the volume and use it, but if I try to umount it nothing happens (anyway mount disappears from lsblk) and if I try to mount the volume again it says that the resource requested is unavailable. Gparted is not working too (while was working with dmraid), it keeps loading saying "Scanning /dev/md126"

Here is blkid output:

/dev/sdc1: LABEL="Storage" UUID="2A2A38CF2A3899B1" TYPE="ntfs" 
/dev/sdd1: LABEL="Storage" UUID="2A2A38CF2A3899B1" TYPE="ntfs" 
/dev/md126p1: LABEL="Storage" UUID="2A2A38CF2A3899B1" TYPE="ntfs" 

If I lsmod even with the volume unmounted here is the output:

lsmod | grep md
md_mod                104577  1 raid1

Is it possibile that the drives are "occupied" and made unavailable to mdadm?

Last edited by Syrius00 (2012-10-13 16:49:57)

Offline

#6 2012-10-13 18:13:19

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,096
Website

Re: [SOLVED] Systemd Shutdown not finishing

Is mdmon running? mdadm may spawn it automatically for you during assembly, but you should make sure it's running....

Offline

#7 2012-10-14 10:14:23

Syrius00
Member
From: Perugia, Italy
Registered: 2012-10-01
Posts: 16

Re: [SOLVED] Systemd Shutdown not finishing

I made it! The problem was udev assembling the raid, occupying the drives.

I commented those lines in

/lib/udev/rules.d/64-md-raid.rules
# remember you can limit what gets auto/incrementally assembled by
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
#ACTION=="add", RUN+="/sbin/mdadm --incremental $tempnode"
#ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
#ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"

So now if I launch

mdadm -As

it says:

mdadm: Container /dev/md/imsm0 has been assembled with 2 drives

Then I typed:

sudo mdadm -I /dev/md/imsm0

The array was assembled and I could use it! And now it shutdowns beautifully.

I don't know why sometimes during shutdown an iTCO_wdt warning pops up, but I suppose I'll take care of it later.

Thank you very much falcon, much appreciated.

Marking the thread as solved, I hope this will be helpful to someone with my same problem smile

Last edited by Syrius00 (2012-10-14 11:53:10)

Offline

Board footer

Powered by FluxBB