Code: Select all
ROOTDIR=/var/lib/systemimager/images/centos7.x.beowulf
TARGDIR=$ROOTDIR/tmp/yum_rpms
/usr/bin/rm -rf $TARGDIR
/usr/bin/mv $HOLDDIR $TARGDIR
mount -o bind /sys $ROOTDIR/sys #for network
mount -o bind /proc $ROOTDIR/proc #for network
mount -o bind /dev $ROOTDIR/dev #for urandom, needed by yum
chroot $ROOTDIR /usr/bin/bash -c 'yum -y install /tmp/yum_rpms/*.rpm'
/usr/bin/rm -rf $TARGDIR #DO THIS ONLY AFTER ALL OTHER MACHINES UPDATED!!!
umount $ROOTDIR/sys
umount $ROOTDIR/proc
umount $ROOTDIR/dev
is gone, so on an ssh login this happens:
Code: Select all
ssh auser@machine
auser@machine's password:
PTY allocation request failed on channel 0
Code: Select all
fuser /var/lib/systemimager/images/centos7.x.beowulf/dev
/var/lib/systemimager/images/centos7.x.beowulf/dev: 48rc
ps -ef | grep 48
root 48 2 0 Aug20 ? 00:00:00 [kdevtmpfs]
Code: Select all
umount /var/lib/systemimager/images/centos7.x.beowulf/dev
umount: /var/lib/systemimager/images/centos7.x.beowulf/dev: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
Code: Select all
lsof /dev/pts/0
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bash 26732 root 0u CHR 136,0 0t0 3 /dev/pts/0
bash 26732 root 1u CHR 136,0 0t0 3 /dev/pts/0
bash 26732 root 2u CHR 136,0 0t0 3 /dev/pts/0
bash 26732 root 255u CHR 136,0 0t0 3 /dev/pts/0
xterm 26790 root 0u CHR 136,0 0t0 3 /dev/pts/0
xterm 26790 root 1u CHR 136,0 0t0 3 /dev/pts/0
xterm 26790 root 2u CHR 136,0 0t0 3 /dev/pts/0
lsof /sys/fs/cgroup
#nothing
#but on the broken system
lsof /dev/pts*
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/systemd
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/devices
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/blkio
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/perf_event
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/memory
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/cpuset
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/net_cls,net_prio
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/hugetlb
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/cpu,cpuacct
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/freezer
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/pids
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd 1 root 0u CHR 1,3 0t0 1028 /dev/null
systemd 1 root 1u CHR 1,3 0t0 1028 /dev/null
...
lsof /sys/fs/cgroup
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/systemd
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/devices
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/blkio
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/perf_event
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/memory
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/cpuset
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/net_cls,net_prio
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/hugetlb
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/cpu,cpuacct
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/freezer
Output information may be incomplete.
lsof: WARNING: can't stat() cgroup file system /sys/fs/cgroup/pids
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-l 2010 root 6r REG 0,17 4096 7711 /sys/devices/virtual/tty/tty0/active
What is messed up here and how does one fix it? (Other than a reboot, which works of course, but is an awfully crude way to resolve this.)
Thanks.