Jonathan Billings
2016-Dec-16 13:47 UTC
[CentOS] Can't delete or move /home on 7.3 install
On Thu, Dec 15, 2016 at 11:51:28AM -0800, Glenn E. Bailey III wrote:> Doing a lsof showed no open files against /home. Something else is > locking it, not a user process. Also disabled SELinux, did a init 1, > and only way to remove it was via single user by passing > init=/sysinit/bin/shIt sounds like /home is being managed by something in the kernel, then. Are you exporting /home via NFS or SMB? AutoFS? I'm trying to think what would start at runlevel 1, although if this is c7 that might not be a valid description anymore, perhaps services are being started at 'rescue.target'. -- Jonathan Billings <billings at negate.org>
Glenn E. Bailey III
2016-Dec-16 18:17 UTC
[CentOS] Can't delete or move /home on 7.3 install
This is a base install. If you deploy an instance in ec2 or GCE (ec2 you can do the free tier) it's easily repeatable. Even on a RHEL 7.3 instance. Note you'll need to allow root and password logins via SSH before attempting. On Fri, Dec 16, 2016 at 5:47 AM, Jonathan Billings <billings at negate.org> wrote:> On Thu, Dec 15, 2016 at 11:51:28AM -0800, Glenn E. Bailey III wrote: >> Doing a lsof showed no open files against /home. Something else is >> locking it, not a user process. Also disabled SELinux, did a init 1, >> and only way to remove it was via single user by passing >> init=/sysinit/bin/sh > > It sounds like /home is being managed by something in the kernel, then. > > Are you exporting /home via NFS or SMB? AutoFS? I'm trying to think > what would start at runlevel 1, although if this is c7 that might not > be a valid description anymore, perhaps services are being started at > 'rescue.target'. > > -- > Jonathan Billings <billings at negate.org> > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos-- "replicants are like any other machine. They're either a benefit or a hazard. If they're a benefit, it's not my problem."
Jonathan Billings
2016-Dec-16 19:29 UTC
[CentOS] Can't delete or move /home on 7.3 install
On Fri, Dec 16, 2016 at 10:17:21AM -0800, Glenn E. Bailey III wrote:> This is a base install. If you deploy an instance in ec2 or GCE (ec2 > you can do the free tier) it's easily repeatable. Even on a RHEL 7.3 > instance. Note you'll need to allow root and password logins via SSH > before attempting.I can confirm this. The culprit? NetworkManager has /home open. I can't figure out *WHY*. # systemctl start NetworkManager.service # rmdir /home rmdir: failed to remove ?/home?: Device or resource busy # systemctl stop NetworkManager.service # rmdir /home rmdir: failed to remove ?/home?: Device or resource busy # systemctl stop NetworkManager.service # rmdir /home rmdir: failed to remove ?/home?: Device or resource busy # systemctl kill NetworkManager.service # rmdir /home rmdir: failed to remove ?/home?: Device or resource busy # rmdir /home So it takes some time for all the parts of NetworkManager to die, but eventually, they do and you can remove /home. Unfortunately, I don't see any reason why /home would be in use by NM. Very odd. -- Jonathan Billings <billings at negate.org>