You are not logged in.

#1 2015-07-25 15:49:23

orlfman
Member
Registered: 2007-11-20
Posts: 49

systemd "failed to unmount /var"

So I just got a new ssd last night. A 240gb crucial. I have three other hard drives, two 1tb seagate enterprise ones and one 250gb crucial ssd for games. I use one 1tb for /home, and the other for /var, swap, and my download folder.

My partition scheme looks like so:

/dev/sda1 - /boot
/dev/sda2 - /

/dev/sdb1 - /home

/dev/sdc1 - swap
/dev/sdc2 - /var
/dev/sdc3 - /mnt/storage1

/dev/sdd1 - /mnt/storage2

When I go to shutdown, systemd goes to unmount /var, but then says "failed unmounting /var" but whats odd is that it gives it a green light and still shutdowns normally. So I am unsure whether or not its unmounting safely. I tried googling, but i mostly get stuff from 2012 - 2013 with no real explanation of whats going on and whats a true fix. all that i found was adding shutdown to my hooks. I don't know if I should toss /var back onto root on my ssd.

Last edited by orlfman (2015-07-25 19:42:26)

Offline

#2 2015-07-25 18:25:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,430

Re: systemd "failed to unmount /var"

What's the purpose of separate /var?

Offline

#3 2015-07-25 19:40:39

orlfman
Member
Registered: 2007-11-20
Posts: 49

Re: systemd "failed to unmount /var"

karol wrote:

What's the purpose of separate /var?

to help minimize writes from the ssd. the machine will be on 24/7. I know /var usually small in size but if I can swap it to another drive why not?

Offline

#4 2015-07-25 21:00:07

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 698
Website

Re: systemd "failed to unmount /var"

Do not worry, /var is unmounted right after pivot_root into a tmpfs, systemd-shutdown is executed again here.

shutdown hook is deprecated since mkinitcpio-16 (mkinitcpio-generate-shutdown-ramfs.service does the work at shutdown)

Offline

#5 2015-07-25 22:40:07

orlfman
Member
Registered: 2007-11-20
Posts: 49

Re: systemd "failed to unmount /var"

djgera wrote:

Do not worry, /var is unmounted right after pivot_root into a tmpfs, systemd-shutdown is executed again here.

shutdown hook is deprecated since mkinitcpio-16 (mkinitcpio-generate-shutdown-ramfs.service does the work at shutdown)

ooooooo, ok. so is that why even though it says failed to unmount /var it still gives it a green light and shuts down normally?

Offline

#6 2015-07-26 22:54:53

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 698
Website

Re: systemd "failed to unmount /var"

Maybe a bug or maybe another systemd feature wink

Offline

#7 2015-08-02 07:25:14

Meirion
Member
Registered: 2009-10-04
Posts: 26

Re: systemd "failed to unmount /var"

Can confirm I have the same issue, also with /var on a separate partition

Offline

#8 2015-08-04 14:59:05

katsuki
Member
From: NY, USA
Registered: 2015-01-28
Posts: 22

Re: systemd "failed to unmount /var"

I also have the same issue with a seperately mounted /var. This error has only appeared within the past few weeks on my current Arch install (which is a VM I built back in the end of 2014).

Offline

#9 2015-08-04 16:01:30

nbvcxz
Member
From: Poland
Registered: 2007-12-29
Posts: 196

Re: systemd "failed to unmount /var"

Here also the same. But working ok after switching to Storage=volatile. It's not a solution, but shows that /var need to be unmounted when journal is still written from memory to disk. It would be nice to have a delay before unmounting var.

Last edited by nbvcxz (2015-08-04 16:01:47)


Lenovo G50 | LXQT-git | compton | conky

Offline

#10 2015-08-05 23:08:21

Gregosky
Member
From: UK
Registered: 2013-07-26
Posts: 86

Re: systemd "failed to unmount /var"

I do remember the same question asked on this very forum before with quite an explanation:
https://bbs.archlinux.org/viewtopic.php … 4#p1204644

Offline

#11 2015-08-17 06:09:47

TheRinger
Member
Registered: 2015-07-02
Posts: 12

Re: systemd "failed to unmount /var"

Can confirm that I have a similar problem. During shutdown such as "shutdown -P" I get the error [FAILED] Failed unmounting /home. Journalctl shows that both /var and /home failed unmounting. No shutdown problems as of yet, strangely. Writing it off as an ignorable error message as suggested for now.

However, something I noticed is that if I do something like "sudo shutdown" I no longer get that error. I'm not sure if it's because the error isn't happening or I'm just not seeing it because of sudo.

EDIT: Adding relevant journalctl entries:

Aug 17 00:36:57 anon systemd[1]: Unmounting /run/user/1000...
Aug 17 00:36:57 anon umount[839]: umount: /var: target is busy
Aug 17 00:36:57 anon umount[839]: (In some cases useful info about processes that
Aug 17 00:36:57 anon umount[839]: use the device is found by lsof(8) or fuser(1).)
Aug 17 00:36:57 anon systemd[1]: var.mount: Mount process exited, code=exited status=32
Aug 17 00:36:57 anon systemd[1]: Failed unmounting /var.
Aug 17 00:36:57 anon systemd[1]: Unmounted /run/user/1000.
Aug 17 00:36:57 anon systemd[1]: Unmounted Temporary Directory.
Aug 17 00:36:57 anon systemd[1]: Unmounted /boot.
Aug 17 00:36:57 anon kernel: [drm:intel_set_cpu_fifo_underrun_reporting [i915]] *ERROR* uncleared fifo underrun on pipe B
Aug 17 00:36:57 anon kernel: [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
--
Aug 17 00:44:40 anon systemd[1]: Stopped RealtimeKit Scheduling Policy Service.
Aug 17 00:44:40 anon systemd[1]: Stopped Authorization Manager.
Aug 17 00:44:40 anon systemd[1]: Stopped Disk Manager.
Aug 17 00:44:40 anon systemd[1]: Deactivated swap /dev/disk/by-uuid/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Aug 17 00:44:40 anon systemd[1]: home.mount: Mount process exited, code=exited status=32
Aug 17 00:44:40 anon systemd[1]: Failed unmounting /home.
Aug 17 00:44:40 anon systemd[1]: Started Store Sound Card State.
Aug 17 00:44:40 anon dhcpcd[1413]: sending signal TERM to pid 667
Aug 17 00:44:40 anon dhcpcd[667]: received SIGTERM, stopping
Aug 17 00:44:40 anon dhcpcd[667]: wlp3s0: removing interface
Aug 17 00:44:40 anon dhcpcd[1413]: waiting for pid 667 to exit
--
Aug 17 00:44:41 anon systemd[1]: Unmounting /var...
Aug 17 00:44:41 anon umount[1500]: umount: /var: target is busy
Aug 17 00:44:41 anon umount[1500]: (In some cases useful info about processes that
Aug 17 00:44:41 anon umount[1500]: use the device is found by lsof(8) or fuser(1).)
Aug 17 00:44:41 anon systemd[1]: var.mount: Mount process exited, code=exited status=32
Aug 17 00:44:41 anon systemd[1]: Failed unmounting /var.
Aug 17 00:44:41 anon systemd[1]: Reached target Unmount All Filesystems.
Aug 17 00:44:41 anon systemd[1]: Stopped target Local File Systems (Pre).
Aug 17 00:44:41 anon systemd[1]: Stopped Create Static Device Nodes in /dev.
Aug 17 00:44:41 anon systemd[1]: Stopped Remount Root and Kernel File Systems.
Aug 17 00:44:41 anon systemd[1]: Reached target Shutdown.
--
Aug 17 01:06:14 anon systemd[1]: Stopped RealtimeKit Scheduling Policy Service.
Aug 17 01:06:14 anon systemd[1]: Stopped Authorization Manager.
Aug 17 01:06:14 anon systemd[1]: Deactivated swap /dev/disk/by-uuid/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Aug 17 01:06:14 anon systemd[1]: Started Store Sound Card State.
Aug 17 01:06:14 anon systemd[1]: home.mount: Mount process exited, code=exited status=32
Aug 17 01:06:14 anon systemd[1]: Failed unmounting /home.
Aug 17 01:06:14 anon systemd[1]: run-user-1000-gvfs.mount: Mount process exited, code=exited status=32
Aug 17 01:06:14 anon systemd[1]: Unmounted /run/user/1000/gvfs.
Aug 17 01:06:14 anon systemd[1]: run-user-1000-gvfs.mount: Unit entered failed state.
Aug 17 01:06:14 anon systemd[1]: Stopped Manage, Install and Generate Color Profiles.
Aug 17 01:06:14 anon mkinitcpio[1458]: ==> Starting build: none
--
Aug 17 01:06:15 anon systemd[1]: Removed slice system-systemd\x2dbacklight.slice.
Aug 17 01:06:15 anon umount[1589]: umount: /var: target is busy
Aug 17 01:06:15 anon umount[1589]: (In some cases useful info about processes that
Aug 17 01:06:15 anon umount[1589]: use the device is found by lsof(8) or fuser(1).)
Aug 17 01:06:15 anon systemd[1]: var.mount: Mount process exited, code=exited status=32
Aug 17 01:06:15 anon systemd[1]: Failed unmounting /var.
Aug 17 01:06:15 anon systemd[1]: Unmounted Temporary Directory.
Aug 17 01:06:15 anon systemd[1]: Reached target Unmount All Filesystems.
Aug 17 01:06:15 anon systemd[1]: Stopped target Local File Systems (Pre).
Aug 17 01:06:15 anon systemd[1]: Stopped Remount Root and Kernel File Systems.
Aug 17 01:06:15 anon systemd[1]: Stopped Create Static Device Nodes in /dev.
--
Aug 17 01:11:10 anon systemd[1]: Stopped Manage, Install and Generate Color Profiles.
Aug 17 01:11:10 anon systemd[1]: Stopped RealtimeKit Scheduling Policy Service.
Aug 17 01:11:10 anon systemd[1]: Stopped Authorization Manager.
Aug 17 01:11:10 anon systemd[1]: Deactivated swap /dev/disk/by-uuid/8943e73a-19ab-49e0-9eeb-17f2ce7dc0d0.
Aug 17 01:11:10 anon systemd[1]: home.mount: Mount process exited, code=exited status=32
Aug 17 01:11:10 anon systemd[1]: Failed unmounting /home.
Aug 17 01:11:10 anon systemd[539]: pam_unix(systemd-user:session): session closed for user hookline
Aug 17 01:11:10 anon systemd[538]: Received SIGRTMIN+24 from PID 921 (kill).
Aug 17 01:11:10 anon systemd[1]: Started Store Sound Card State.
Aug 17 01:11:10 anon systemd[1]: Stopped User Manager for UID 1000.
Aug 17 01:11:10 anon systemd[1]: Unmounted /run/user/1000/gvfs.
--
Aug 17 01:11:11 anon systemd[1]: Unmounting /var...
Aug 17 01:11:11 anon umount[1022]: umount: /var: target is busy
Aug 17 01:11:11 anon umount[1022]: (In some cases useful info about processes that
Aug 17 01:11:11 anon umount[1022]: use the device is found by lsof(8) or fuser(1).)
Aug 17 01:11:11 anon systemd[1]: var.mount: Mount process exited, code=exited status=32
Aug 17 01:11:11 anon systemd[1]: Failed unmounting /var.
Aug 17 01:11:11 anon systemd[1]: Stopped target Local File Systems (Pre).
Aug 17 01:11:11 anon systemd[1]: Stopped Remount Root and Kernel File Systems.
Aug 17 01:11:11 anon systemd[1]: Stopped Create Static Device Nodes in /dev.
Aug 17 01:11:11 anon systemd[1]: Reached target Shutdown.
Aug 17 01:11:11 anon systemd[1]: Unmounted Temporary Directory.
--
Aug 17 02:04:16 anon systemd[1]: slim.service: Failed with result 'signal'.
Aug 17 02:04:16 anon systemd[1]: Stopped Manage, Install and Generate Color Profiles.
Aug 17 02:04:16 anon systemd[1]: Stopped User Manager for UID 1000.
Aug 17 02:04:16 anon systemd[1]: Stopped RealtimeKit Scheduling Policy Service.
Aug 17 02:04:16 anon systemd[1]: home.mount: Mount process exited, code=exited status=32
Aug 17 02:04:16 anon systemd[1]: Failed unmounting /home.
Aug 17 02:04:16 anon systemd[1]: Unmounted /run/user/1000/gvfs.
Aug 17 02:04:16 anon systemd[1]: Stopped Authorization Manager.
Aug 17 02:04:16 anon systemd[1]: Started Store Sound Card State.
Aug 17 02:04:16 anon systemd[1]: Stopped Make remote CUPS printers available locally.
Aug 17 02:04:16 anon systemd[1]: Deactivated swap /dev/disk/by-uuid/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
--
Aug 17 02:04:18 anon systemd[1]: Unmounted Temporary Directory.
Aug 17 02:04:18 anon umount[2567]: umount: /var: target is busy
Aug 17 02:04:18 anon umount[2567]: (In some cases useful info about processes that
Aug 17 02:04:18 anon umount[2567]: use the device is found by lsof(8) or fuser(1).)
Aug 17 02:04:18 anon systemd[1]: var.mount: Mount process exited, code=exited status=32
Aug 17 02:04:18 anon systemd[1]: Failed unmounting /var.
Aug 17 02:04:18 anon systemd[1]: Reached target Unmount All Filesystems.
Aug 17 02:04:18 anon systemd[1]: Stopped target Local File Systems (Pre).
Aug 17 02:04:18 anon systemd[1]: Stopped Remount Root and Kernel File Systems.
Aug 17 02:04:18 anon systemd[1]: Stopped Create Static Device Nodes in /dev.
Aug 17 02:04:18 anon systemd[1]: Reached target Shutdown.

Last edited by TheRinger (2015-08-17 12:57:38)

Offline

#12 2015-08-17 17:17:51

Gregosky
Member
From: UK
Registered: 2013-07-26
Posts: 86

Re: systemd "failed to unmount /var"

Did you read this thread? https://bbs.archlinux.org/viewtopic.php … 4#p1204644
Arch Linux dev is saying there is nothing to be worried about.

Offline

#13 2015-09-05 14:34:43

antoyo
Member
Registered: 2012-08-16
Posts: 24

Re: systemd "failed to unmount /var"

I have the same issue.

@Gregosky: even though you say there is nothing to worry about, the thread you linked is from 2012 and I started to get this issue a few weeks ago (it was okay for almost 2 years).
It is normal that this error starts showing only a few weeks ago?

Offline

#14 2015-09-05 21:33:24

R81Z3
Member
Registered: 2013-09-03
Posts: 7

Re: systemd "failed to unmount /var"

I wonder if anyone has filed a bug report on this issue it might not be critical but shows a weakness and should be considered, as that might not be the desired output of systemd!

I have this problem as well and can help trouble shoot if necessary.


R81Z3

Security +, Linux +, LPIC 1, still learning!

Offline

#15 2015-09-27 11:58:11

doragasu
Member
Registered: 2012-03-03
Posts: 101

Re: systemd "failed to unmount /var"

I have also a separate SSD and have exactly the same problem. Although it might not be critical, it is not nice to have errors shown on shutdown logs...

Offline

#16 2015-10-05 05:39:39

ludat
Member
Registered: 2014-04-01
Posts: 1

Re: systemd "failed to unmount /var"

Yep exactly the same issue on my machine with an extra /var partition... I had some problems because the xfs filesystem wasn't unmounted properly and it would get corrupted (not irrecoverably corrupted but I needed to boot from a live CD to fix it and then boot from arch). I switched to ext4, which handles fails better, and errors mostly disapeared... so I wouldn't qualify this as an harmless bug... if your filesystem can handle not being unmounted properly you are OK but otherwise you may run into some trouble.

After some further investigation I may be very wrong... but it's late, tomorrow I'll check it

Last edited by ludat (2015-10-05 05:52:23)

Offline

#17 2015-11-01 12:58:56

ravenstar
Member
Registered: 2015-11-01
Posts: 1

Re: systemd "failed to unmount /var"

Hi, i have also separated SSD with root / and /boot and one HDD with /home and /opt and another HDD with /var. I started to receive error messages about umount : target is busy a month ago.
Anybody know how to handle this issue? Could you explain in some details please?

Offline

#18 2015-11-11 23:47:40

zasire
Member
Registered: 2011-07-20
Posts: 10

Re: systemd "failed to unmount /var"

This is expected behavior of journald. It is writing to /var/log up to the very end and therefore blocking the unmount. You can have every subdirectory of /var anywhere on your system but you have to provide /var/log on your root system up to the very last second of shutdown process to avoid this kind problem. Otherwise you could try not using journald.

Offline

#19 2016-01-07 21:18:45

glidarn
Member
Registered: 2016-01-07
Posts: 1

Re: systemd "failed to unmount /var"

I have the same problem, is there any official solution?

// Michael

Offline

#20 2016-01-16 02:22:09

navi_se
Member
Registered: 2015-07-06
Posts: 104

Re: systemd "failed to unmount /var"

The solution is reported in the thread linked above by Gregosky.

Offline

Board footer

Powered by FluxBB