Recently, I have found that my debian 8.2 (jessie) installation is taking forever to boot because systemd will hang for several minutes on a start job is running for create volatile files and directories
. I have consulted various debian forums that have provided the solution of deleting the /tmp directory and re-creating it.
http://forums.debian.net/viewtopic.php?f=10&t=118008
However, when I tried to do this, I got the error: cannot remove /tmp device or resource busy
. I have already come across another forum where this is discussed, but none of their solutions are working for me (lsof and umount).
How to get over "device or resource busy"?
These are (currently) the contents of my /tmp directory:
chris@debian:/tmp$ ls -a
. lu7rao5i.tmp
.. orbit-chris
gnucash.trace OSL_PIPE_1000_SingleOfficeIPC_d3a739592b2fd367937df734e849bd3
hsperfdata_chris systemd-private-72f0212651f2433dbce43b96e2dea612-cups.service-9OArRS
kde-chris
I will provide output to any requested bash commands.
EDIT 1:
chris@debian:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1017089,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=1630924k,mode=755)
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=815464k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
chris@debian:~$ getenforce
bash: getenforce: command not found
chris@debian:~$ sudo getenforce
[sudo] password for chris:
sudo: getenforce: command not found
chris@debian:~$ ls -ld /tmp/
drwxrwxrwt 8 root root 247619584 Jan 9 18:35 /tmp/
EDIT 2:
Everything can be moved to another temporary location except for the systemd-private-72f0212651f2433dbce43b96e2dea612-cups.service-9OArRS
It gives me this error: mv: cannot move ‘systemd-private-72f0212651f2433dbce43b96e2dea612-cups.service-9OArRS/’ to ‘/home/chris/moveto/systemd-private-72f0212651f2433dbce43b96e2dea612-cups.service-9OArRS’: Operation not permitted
However, it ^ can be moved with sudo.
/tmp/
folder created forcups
by systemd. You can remove it by stopping the cups service:sudo systemctl stop cups
cups
, I'm still stuck atrm: cannot remove ‘/tmp/’: Device or resource busy