Re: [CentOS] Can't delete or move /home on 7.3 install
On Tue, Dec 20, 2016 at 03:30:13PM -0500, Matthew Miller wrote: > > On Tue, Dec 20, 2016 at 02:07:03PM -0500, Matthew Miller wrote: > > If you wanted to change this, drop ProtectHome=false into > > /etc/systemd/system/NetworkMananger.service.d/override.conf (possibly > > by using sudo systemctl edit foo NetworkMananger). > > Sorry, no "foo" — that was a cut-paste error. And as Jonathan says, > make sure to spell NetworkManager right. :) > > sudo systemctl edit NetworkManager I blame all the holiday cookies they leave in the break room. Probably have rum in them or something. -- Jonathan Billings___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
On Tue, Dec 20, 2016 at 02:07:03PM -0500, Matthew Miller wrote: > If you wanted to change this, drop ProtectHome=false into > /etc/systemd/system/NetworkMananger.service.d/override.conf (possibly > by using sudo systemctl edit foo NetworkMananger). Sorry, no "foo" — that was a cut-paste error. And as Jonathan says, make sure to spell NetworkManager right. :) sudo systemctl edit NetworkManager -- Matthew MillerFedora Project Leader ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
On Tue, Dec 20, 2016 at 03:24:12PM -0500, Jonathan Billings wrote: > /etc/systemd/system/NetworkManger.service.d/. Otherwise, the next Obviously spell it right when you do it. :/ -- Jonathan Billings___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
On Tue, Dec 20, 2016 at 11:20:57AM -0800, Glenn E. Bailey III wrote: > > Yup, verified those options are *not* set in 7.2. For a quick test I > simply removed them from > /usr/lib/systemd/system/NetworkManager.service, did a systemctl > daemon-reload, restarted NetworkManager, logged back in as root, and > was able to whack /home (7.3). While that is a temporary solution, you should do what Matthew Miller says to do, which is put in an override in /etc/systemd/system/NetworkManger.service.d/. Otherwise, the next time your NM is updated it will be missing it. -- Jonathan Billings___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
Yup, verified those options are *not* set in 7.2. For a quick test I simply removed them from /usr/lib/systemd/system/NetworkManager.service, did a systemctl daemon-reload, restarted NetworkManager, logged back in as root, and was able to whack /home (7.3). On Tue, Dec 20, 2016 at 11:07 AM, Matthew Millerwrote: > On Fri, Dec 16, 2016 at 02:29:28PM -0500, Jonathan Billings wrote: >> The culprit? NetworkManager has /home open. I can't figure out >> *WHY*. > > NetworkManager.service has 'ProtectHome=read-only', which keeps NM from > writing there. I presume namespacing /home in this way counts against > unmounting it. This is a good security protection for everyone running > NM, so I can see it being worth the tradeoff vs. being able to move or > remove /home on a live system. > > (It also has ProtectSystem=true, which mounts /usr and /boot read-only > as well.) > > If you wanted to change this, drop ProtectHome=false into > /etc/systemd/system/NetworkMananger.service.d/override.conf (possibly > by using sudo systemctl edit foo NetworkMananger). > > -- > Matthew Miller > > Fedora Project Leader > ___ > CentOS mailing list > CentOS@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." ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
On Fri, Dec 16, 2016 at 02:29:28PM -0500, Jonathan Billings wrote: > The culprit? NetworkManager has /home open. I can't figure out > *WHY*. NetworkManager.service has 'ProtectHome=read-only', which keeps NM from writing there. I presume namespacing /home in this way counts against unmounting it. This is a good security protection for everyone running NM, so I can see it being worth the tradeoff vs. being able to move or remove /home on a live system. (It also has ProtectSystem=true, which mounts /usr and /boot read-only as well.) If you wanted to change this, drop ProtectHome=false into /etc/systemd/system/NetworkMananger.service.d/override.conf (possibly by using sudo systemctl edit foo NetworkMananger). -- Matthew MillerFedora Project Leader ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
Confirmed as well, thanks! What's really odd is I didn't see *anything* having a lock on /home, nada, zilch. We have a work-around in place for this but I was beating my head against the wall trying to figure it out. On Fri, Dec 16, 2016 at 11:29 AM, Jonathan Billingswrote: > 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 > ___ > CentOS mailing list > CentOS@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." ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [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___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [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 Billingswrote: > 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 > ___ > CentOS mailing list > CentOS@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." ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [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/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___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
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 On Thu, Dec 15, 2016 at 10:48 AM, Leonard den Ottolanderwrote: > Hello Glen, > > On Thu, 2016-12-15 at 10:10 -0800, Glenn E. Bailey III wrote: >> I was most def root. > > There's a difference whether you logged in as root or su-ed to root. In > the latter case /home is still in use by the user you su-ed from. > > Even though it is not strictly necessary to init 1 you must make sure > not a single user that uses /home for their home directory is logged in > and no system user accesses files there (f.e. apache configured with > home dirs) when attempting to move /home. > > Regards, > Leonard. > > -- > mount -t life -o ro /dev/dna /genetic/research > > > ___ > CentOS mailing list > CentOS@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." ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
I was most def root. /home isn't mounted as a separate filesystem. It's not even tmpfs or btrfs. I was able to boot into single user mode to remove it, but this isn't possible in an automated fashion. I may just have to start building my own images. Still curious to know why I can't rename or move it. Anyone else try this on a stock 7.3 build? On Thu, Dec 15, 2016 at 8:42 AM,wrote: > Jon LaBadie wrote: >> On Thu, Dec 15, 2016 at 04:10:07AM -0600, geo.inbox.ignored wrote: >>> On 12/15/2016 01:47 AM, Gianluca Cecchi wrote: >>> > On Thu, Dec 15, 2016 at 2:49 AM, Glenn E. Bailey III < >>> > replic...@dallaslamers.org> wrote: >>> > >>> >> Tried this in both AWS and GCE as I though it may be a specific cloud >>> >> vendor issue. SELinux is disabled, lsof | grep home shows nothing, >>> >> lsattr /home shows nothing. Simply get "Device or resource busy." >>> >> >>> >> Works just find on 7.2 so I'm kinda at a loss. Scanned over the RHEL >>> >> release notes and didn't see anything. Anyone else have this issue? >>> We >>> >> move our /home to another mount point and symlink /home to it .. >>> >> >>> >> >>> > Do you have access to the console, so that you can try to do the move >>> while >>> > in single user mode? >>> > >>> }} >>> >>> that is one possibility. >>> >>> even greater is op is a 'user', not 'root'. > > > Here's a question to OP: how did you log into the system? If as *user*, > rather than as root, the filesystem is busy because you're logged on, and > in it. > > Missed some of the posts overnight - has anyone asked for the o/p of df -h? > > mark > > ___ > CentOS mailing list > CentOS@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." ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
On Thu, Dec 15, 2016 at 04:10:07AM -0600, geo.inbox.ignored wrote: > > > On 12/15/2016 01:47 AM, Gianluca Cecchi wrote: > > On Thu, Dec 15, 2016 at 2:49 AM, Glenn E. Bailey III < > > replic...@dallaslamers.org> wrote: > > > >> Tried this in both AWS and GCE as I though it may be a specific cloud > >> vendor issue. SELinux is disabled, lsof | grep home shows nothing, > >> lsattr /home shows nothing. Simply get "Device or resource busy." > >> > >> Works just find on 7.2 so I'm kinda at a loss. Scanned over the RHEL > >> release notes and didn't see anything. Anyone else have this issue? We > >> move our /home to another mount point and symlink /home to it .. > >> > >> > > Do you have access to the console, so that you can try to do the move while > > in single user mode? > > > }} > > that is one possibility. > > even greater is op is a 'user', not 'root'. > Another possibility is /home is a separate file system. In that case the OP does not want to "move it" but unmount it, change the mount point in /etc/fstab, rmdir /home, and ln -s new_mntpoint to /home. Then mount it again. Probably best done is single user mode. jl -- Jon H. LaBadie j...@jgcomp.com 11226 South Shore Rd. (703) 787-0688 (H) Reston, VA 20190 (703) 935-6720 (C) ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
On 12/15/2016 01:47 AM, Gianluca Cecchi wrote: > On Thu, Dec 15, 2016 at 2:49 AM, Glenn E. Bailey III < > replic...@dallaslamers.org> wrote: > >> Tried this in both AWS and GCE as I though it may be a specific cloud >> vendor issue. SELinux is disabled, lsof | grep home shows nothing, >> lsattr /home shows nothing. Simply get "Device or resource busy." >> >> Works just find on 7.2 so I'm kinda at a loss. Scanned over the RHEL >> release notes and didn't see anything. Anyone else have this issue? We >> move our /home to another mount point and symlink /home to it .. >> >> > Do you have access to the console, so that you can try to do the move while > in single user mode? > }} that is one possibility. even greater is op is a 'user', not 'root'. _normally_ / most, if not all unix/linux systems, /home is owned by 'root'. which means *everything*, including a 'user' home directory is own by 'root'. therefore a 'user' running a normal user can do _nothing_ to his/her 'home' directory. therefore a normal user *must* 'sudo' or 'su' to make changes to users 'home' directory. hth. -- The important thing is not to stop questioning. - Albert Einstein CentOS GNU/Linux 6.8 KDE 4.3.4 peace out. tc,hago. g . =+= Tired of having your microsoft os hacked? Change to Linux os, used by microsoft hackers. =+= If Bill Gates got a dime for every time Windows crashes... ...oh, wait. He does. THAT explains it! =+= in a world with out fences, who needs gates. =+= ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Can't delete or move /home on 7.3 install
On Thu, Dec 15, 2016 at 2:49 AM, Glenn E. Bailey III < replic...@dallaslamers.org> wrote: > Tried this in both AWS and GCE as I though it may be a specific cloud > vendor issue. SELinux is disabled, lsof | grep home shows nothing, > lsattr /home shows nothing. Simply get "Device or resource busy." > > Works just find on 7.2 so I'm kinda at a loss. Scanned over the RHEL > release notes and didn't see anything. Anyone else have this issue? We > move our /home to another mount point and symlink /home to it .. > > Do you have access to the console, so that you can try to do the move while in single user mode? ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
[CentOS] Can't delete or move /home on 7.3 install
Tried this in both AWS and GCE as I though it may be a specific cloud vendor issue. SELinux is disabled, lsof | grep home shows nothing, lsattr /home shows nothing. Simply get "Device or resource busy." Works just find on 7.2 so I'm kinda at a loss. Scanned over the RHEL release notes and didn't see anything. Anyone else have this issue? We move our /home to another mount point and symlink /home to it .. -- "replicants are like any other machine. They're either a benefit or a hazard. If they're a benefit, it's not my problem." ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos