Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Peter Volkov
В Вс, 13/10/2013 в 14:32 -0500, William Hubbs пишет: from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? The only concern I have how this change affects *BSD or prefix? But yet I failed to

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Pacho Ramos
El lun, 14-10-2013 a las 09:58 +0400, Peter Volkov escribió: В Вс, 13/10/2013 в 14:13 -0700, Matt Turner пишет: On Sun, Oct 13, 2013 at 12:32 PM, William Hubbs willi...@gentoo.org wrote: from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1].

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Fabian Groffen
On 14-10-2013 10:00:03 +0400, Peter Volkov wrote: В Вс, 13/10/2013 в 14:32 -0500, William Hubbs пишет: from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? The only concern I have how

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Rich Freeman
On Mon, Oct 14, 2013 at 12:42 AM, yac y...@gentoo.org wrote: Curiously I don't see any difference on my gentoo box, which I think I should see but I'm not sure. On mine the main difference seems to be bind mounts. In /etc/mtab the bind mount device is the directory that is being bind-mounted.

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Ben de Groot
On 14 October 2013 03:32, William Hubbs willi...@gentoo.org wrote: All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? If not, it seems like it would be pretty easy to make baselayout

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Rich Freeman
On Mon, Oct 14, 2013 at 7:59 AM, Ben de Groot yng...@gentoo.org wrote: I don't see a compelling case being made for why we should make this change apart from all the other distros are doing it, and quite a few reasons why we shouldn't. I'm open to being convinced, so please tell me why this is

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Richard Yao
That is my impression as well. With that said, the behavior is currently the same between our FreeBSD and Linux variants. This change would break that. On Oct 14, 2013, at 7:59 AM, Ben de Groot yng...@gentoo.org wrote: On 14 October 2013 03:32, William Hubbs willi...@gentoo.org wrote: All,

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Richard Yao
On Oct 14, 2013, at 9:19 AM, Rich Freeman ri...@gentoo.org wrote: On Mon, Oct 14, 2013 at 7:59 AM, Ben de Groot yng...@gentoo.org wrote: I don't see a compelling case being made for why we should make this change apart from all the other distros are doing it, and quite a few reasons why we

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Michał Górny
Dnia 2013-10-14, o godz. 09:26:43 Richard Yao r...@gentoo.org napisał(a): On Oct 14, 2013, at 9:19 AM, Rich Freeman ri...@gentoo.org wrote: On Mon, Oct 14, 2013 at 7:59 AM, Ben de Groot yng...@gentoo.org wrote: I don't see a compelling case being made for why we should make this change

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Richard Yao
The Linux kernel also supports far more architectures than we do. That does not mean that we must support them too. With that said, how does changing things benefit/affect users, especially non-systemd users? On Oct 14, 2013, at 9:36 AM, Michał Górny mgo...@gentoo.org wrote: Dnia 2013-10-14,

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Rich Freeman
On Mon, Oct 14, 2013 at 9:52 AM, Richard Yao r...@gentoo.org wrote: The Linux kernel also supports far more architectures than we do. That does not mean that we must support them too. With that said, how does changing things benefit/affect users, especially non-systemd users? Better

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Richard Yao
On 10/14/2013 10:11 AM, Rich Freeman wrote: On Mon, Oct 14, 2013 at 9:52 AM, Richard Yao r...@gentoo.org wrote: The Linux kernel also supports far more architectures than we do. That does not mean that we must support them too. With that said, how does changing things benefit/affect users,

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread William Hubbs
On Mon, Oct 14, 2013 at 10:00:03AM +0400, Peter Volkov wrote: В Вс, 13/10/2013 в 14:32 -0500, William Hubbs пишет: from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? The only concern

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread William Hubbs
On Mon, Oct 14, 2013 at 10:46:38AM -0400, Richard Yao wrote: On 10/14/2013 10:11 AM, Rich Freeman wrote: On Mon, Oct 14, 2013 at 9:52 AM, Richard Yao r...@gentoo.org wrote: The Linux kernel also supports far more architectures than we do. That does not mean that we must support them too.

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Richard Yao
On 10/14/2013 10:46 AM, Richard Yao wrote: My main concern is that some of the configure flags being proposed could make packages that worked on Gentoo FreeBSD stop working there. I am not making changes, but I think that there should be some benefit and that care should be taken not to break

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Richard Yao
On 10/14/2013 12:34 PM, William Hubbs wrote: On Mon, Oct 14, 2013 at 10:46:38AM -0400, Richard Yao wrote: On 10/14/2013 10:11 AM, Rich Freeman wrote: On Mon, Oct 14, 2013 at 9:52 AM, Richard Yao r...@gentoo.org wrote: The Linux kernel also supports far more architectures than we do. That

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread William Hubbs
On Mon, Oct 14, 2013 at 12:47:08PM -0400, Richard Yao wrote: *snip* Both of which are correct. That being said, I am not against making changes, but given that this is on the list, I would like to someone to provide a technical justification. Some key questions that justification should

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Rich Freeman
On Mon, Oct 14, 2013 at 1:01 PM, Richard Yao r...@gentoo.org wrote: 1. What are mount namespaces? How do they integrate with the kernel? 2. What does systemd do with them? What does systemd's use of them provide to users? Saying to google per-process namespaces does not really answer that.

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread David Leverton
Rich Freeman wrote: [...] and the point that many things break in namespaces without the symlink, since /etc/mtab does not reflect the state of the namespace. The latter in particular seems like a pretty fundamental limitation - the very concept of /etc/mtab is that mounts are global, and the

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Richard Yao
On 10/14/2013 01:24 PM, Rich Freeman wrote: Systemd lets you configure daemons to have restricted access to the filesystem as well - either read-only, or not at all - by directory. I assume it just clones the mount namespace, and then sets up bind-mounts to implement this before dropping root

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Rich Freeman
On Mon, Oct 14, 2013 at 2:58 PM, David Leverton levert...@googlemail.com wrote: If only someone would invent some sort of kernel feature that could make the name /etc/mtab refer to different files in different processes Well, the symlink seems like the simpler solution to be honest. I

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread David Leverton
Rich Freeman wrote: However, FWIW, linux namespaces cannot be used to have only a single file appear differently to different processes. Mount namespaces can only operate at the directory level. So to work around that limitation we insist that everyone change how their systems are set up,

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Mike Gilbert
On Mon, Oct 14, 2013 at 4:03 PM, David Leverton levert...@googlemail.com wrote: Rich Freeman wrote: However, FWIW, linux namespaces cannot be used to have only a single file appear differently to different processes. Mount namespaces can only operate at the directory level. So to work

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Rich Freeman
On Mon, Oct 14, 2013 at 4:03 PM, David Leverton levert...@googlemail.com wrote: So to work around that limitation we insist that everyone change how their systems are set up, and still have to reintroduce mtab under a different name (utab, hidden away under /run) because /proc/self/mounts

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread David Leverton
Mike Gilbert wrote: This is a horrible example. /etc/resolv.conf is a configuration file for code that lives entirely in userspace. Of course it makes no sense to shove that into the kernel. My point is that it's silly to have a hard-coded special case in the kernel for mtab, especially if it

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread Patrick McLean
On Mon, 14 Oct 2013 15:50:36 -0400 Rich Freeman ri...@gentoo.org wrote: On Mon, Oct 14, 2013 at 2:58 PM, David Leverton levert...@googlemail.com wrote: If only someone would invent some sort of kernel feature that could make the name /etc/mtab refer to different files in different

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-14 Thread David Leverton
Patrick McLean wrote: This is not true. Bind mounts can be performed on a single file, and bind mounts are part of mount namespaces. Granted the target file _must_ exist (it could be a dead symlink, or a symlink to /dev/null) before performing the bind mount. Well that's even better then. :-)

[gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread William Hubbs
All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? If not, it seems like it would be pretty easy to make baselayout create this symlink in the stages (I'm willing to do this work), but

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Matt Turner
On Sun, Oct 13, 2013 at 12:32 PM, William Hubbs willi...@gentoo.org wrote: All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? If not, it seems like it would be pretty easy to make

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Patrick Lauer
On 10/14/2013 03:32 AM, William Hubbs wrote: All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? Apart from breaking umount -a and some other things? None at all ;) (The breakage is

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Mike Gilbert
On Sun, Oct 13, 2013 at 7:21 PM, Patrick Lauer patr...@gentoo.org wrote: On 10/14/2013 03:32 AM, William Hubbs wrote: All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? Apart from

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Patrick Lauer
On 10/14/2013 07:29 AM, Mike Gilbert wrote: On Sun, Oct 13, 2013 at 7:21 PM, Patrick Lauer patr...@gentoo.org wrote: On 10/14/2013 03:32 AM, William Hubbs wrote: All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Rich Freeman
On Sun, Oct 13, 2013 at 7:38 PM, Patrick Lauer patr...@gentoo.org wrote: And the magic trick is to keep system mounts like /run out of /etc/mtab (willful desynchronization) so that umount -a doesn't nuke them by accident. ... why else would you keep such data in two non-synchronized

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Mike Gilbert
On Sun, Oct 13, 2013 at 7:38 PM, Patrick Lauer patr...@gentoo.org wrote: On 10/14/2013 07:29 AM, Mike Gilbert wrote: On Sun, Oct 13, 2013 at 7:21 PM, Patrick Lauer patr...@gentoo.org wrote: On 10/14/2013 03:32 AM, William Hubbs wrote: All, from what I'm seeing, we should look into converting

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Mike Gilbert
On Sun, Oct 13, 2013 at 5:13 PM, Matt Turner matts...@gentoo.org wrote: On Sun, Oct 13, 2013 at 12:32 PM, William Hubbs willi...@gentoo.org wrote: All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread William Hubbs
On Mon, Oct 14, 2013 at 07:21:47AM +0800, Patrick Lauer wrote: On 10/14/2013 03:32 AM, William Hubbs wrote: All, from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Are there any remaining concerns about doing this? Apart from

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread yac
AFAIK this known historical behavior that what you find in `/etc/mtab` are things mounted by mount(8) (if that's what's printed by running just mount). Whereas /proc/mounts is the kernel view on what's mounted. Curiously I don't see any difference on my gentoo box, which I think I should see but

Re: [gentoo-dev] rfc: converting /etc/mtab to a symlink

2013-10-13 Thread Peter Volkov
В Вс, 13/10/2013 в 14:13 -0700, Matt Turner пишет: On Sun, Oct 13, 2013 at 12:32 PM, William Hubbs willi...@gentoo.org wrote: from what I'm seeing, we should look into converting /etc/mtab to a symlink to /proc/self/mounts [1]. Is the issue with NFS user mounts resolved? (Mentioned