Re: [CentOS] Can't delete or move /home on 7.3 install

2016-12-20 Thread Glenn E. Bailey III
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 Miller  wrote:
> 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

2016-12-20 Thread Glenn E. Bailey III
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 Billings <billi...@negate.org> wrote:
> 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 <billi...@negate.org>
> ___
> 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

2016-12-16 Thread Glenn E. Bailey III
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 <billi...@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 <billi...@negate.org>
> ___
> 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

2016-12-15 Thread Glenn E. Bailey III
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 Ottolander
<leon...@den.ottolander.nl> wrote:
> 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

2016-12-15 Thread Glenn E. Bailey III
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,  <m.r...@5-cent.us> 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


[CentOS] Can't delete or move /home on 7.3 install

2016-12-14 Thread Glenn E. Bailey III
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