View previous topic :: View next topic |
Author |
Message |
drwook Veteran
Joined: 30 Mar 2005 Posts: 1324 Location: London
|
Posted: Sun Apr 20, 2008 2:33 pm Post subject: two root entries in /proc/mounts, neither in fstab? |
|
|
hey guys,
Well this has confused me, at the top of /proc/mounts (and /etc/mtab) I've got this;
Quote: |
rootfs / rootfs rw 0 0
/dev/root / reiserfs rw,noatime 0 0
|
I don't recall making one, but /dev/root appears to be a symlink to /dev/hdc3 (the actual root partition for the system). Not sure if this may be udev upgrade weirdness? (or outside chance openrc/baselayout-2, but I can't see it if it is...)
my /etc/fstab starts ;
Quote: |
/dev/hdc6 /boot ext2 noauto,noatime 1 1
/dev/hdc3 / reiserfs noatime 0 0
/dev/hdc5 none swap sw 0 0
|
but /proc/mounts has no mention of hdc3 at all....?
Maybe I'm being stupid and having a bad day, but if so can someone point out what's going on here? |
|
Back to top |
|
|
Cazzantonio Bodhisattva
Joined: 20 Mar 2004 Posts: 4514 Location: Somewere around the world
|
Posted: Sun Apr 20, 2008 6:34 pm Post subject: |
|
|
I have the same problem, but it is an opernc/baselayout-2 issue since it happened after that upgrade.
It isn't an udev issue since a similar installation with same udev and stable baselayout doesn't have two root mounted. _________________ Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne |
|
Back to top |
|
|
enito Tux's lil' helper
Joined: 10 Oct 2005 Posts: 79
|
Posted: Sun Apr 20, 2008 6:39 pm Post subject: |
|
|
Hi, any way for fix this? i tryed manualy edit mtab and delete dupped / and setup correctly, but when you reboot , all back again, duped entry...thx |
|
Back to top |
|
|
Dairinin n00b
Joined: 03 Feb 2008 Posts: 64 Location: MSK, RF
|
Posted: Sun Apr 20, 2008 9:00 pm Post subject: |
|
|
Looks like a new "feature" to me. Had to change "/dev/sdb6" to "/dev/root" in cacti data source. |
|
Back to top |
|
|
uzz75 n00b
Joined: 29 Aug 2005 Posts: 34 Location: Italy
|
Posted: Sun Apr 20, 2008 9:27 pm Post subject: |
|
|
I don't think it's from udev
# cd /etc/udev/
# grep rootfs * -R _________________ Michele |
|
Back to top |
|
|
Dairinin n00b
Joined: 03 Feb 2008 Posts: 64 Location: MSK, RF
|
Posted: Sun Apr 20, 2008 9:58 pm Post subject: |
|
|
It's here:
/lib64/udev/write_root_link_rule
called from /lib/rcscripts/addons/udev-start.sh |
|
Back to top |
|
|
enito Tux's lil' helper
Joined: 10 Oct 2005 Posts: 79
|
Posted: Sun Apr 20, 2008 11:58 pm Post subject: |
|
|
and how we can disable this new feature?
greets |
|
Back to top |
|
|
ABCDwp Retired Dev
Joined: 26 Mar 2006 Posts: 79
|
Posted: Mon Apr 21, 2008 12:38 am Post subject: |
|
|
The actual change is that baselayout-2/openrc copies /proc/mounts onto /etc/mtab during boot - it does so, so that the mount table in /etc/mtab is correct (/proc/mounts is what the kernel actually mounted - not what you thought you mounted). The /dev/root symlink is so that things make a little more sense to the average end-user, but is unneeded - the kernel will call the initramfs "rootfs" and the root=/dev/XYZ parameter "/dev/root" no matter what you do (IIRC). |
|
Back to top |
|
|
drwook Veteran
Joined: 30 Mar 2005 Posts: 1324 Location: London
|
Posted: Mon Apr 21, 2008 5:37 am Post subject: |
|
|
ABCDwp wrote: | The actual change is that baselayout-2/openrc copies /proc/mounts onto /etc/mtab during boot - it does so, so that the mount table in /etc/mtab is correct (/proc/mounts is what the kernel actually mounted - not what you thought you mounted). The /dev/root symlink is so that things make a little more sense to the average end-user, but is unneeded - the kernel will call the initramfs "rootfs" and the root=/dev/XYZ parameter "/dev/root" no matter what you do (IIRC). |
hmm. No initramfs here so can't quite see why there's a 'double mount' on /. I won't have much of a chance to dig until the weekend but I'll check it out then.... |
|
Back to top |
|
|
The Unknown Guru
Joined: 28 Feb 2007 Posts: 335 Location: Minnesota, U.S.A
|
Posted: Mon Apr 21, 2008 7:11 am Post subject: |
|
|
This is not new, I have stable systems with the old baselayout and its the exact same.
Your not really double mounting root either. This quote is from some kernel documentation
Quote: |
70 What is rootfs?
71 ---------------
72
73 Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), which is
74 always present in 2.6 systems. You can't unmount rootfs for approximately the
75 same reason you can't kill the init process; rather than having special code
76 to check for and handle an empty list, it's smaller and simpler for the kernel
77 to just make sure certain lists can't become empty.
78
79 Most systems just mount another filesystem over rootfs and ignore it. The
80 amount of space an empty instance of ramfs takes up is tiny. |
And the /dev/root symlink is the same as well, my guess is its the same reason as why they provide /dev/cdrom symlinks etc. _________________ Doing what you like is freedom.
Liking what you do is happiness. |
|
Back to top |
|
|
Quaoar n00b
Joined: 13 Jan 2008 Posts: 10
|
Posted: Mon Apr 21, 2008 8:36 am Post subject: |
|
|
but this "feature" definitely hit me with baselayou2/openrc - never had this before and I still don't have it on the baselayout1-machines. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Mon Apr 21, 2008 11:48 am Post subject: |
|
|
I had googled about this quite a while ago. From my memory, these were the results:
baselayout-1 was once artificially modified to remove rootfs.
openrc wants to be more conformal to the standard (e.g. it should not run only under gentoo) and since some scripts out there rely on /dev/root, openrc makes no attempt to "hide" this filesystem. |
|
Back to top |
|
|
Cazzantonio Bodhisattva
Joined: 20 Mar 2004 Posts: 4514 Location: Somewere around the world
|
Posted: Mon Apr 21, 2008 1:56 pm Post subject: |
|
|
I understand that this rootfs, mounted "below" the standard /dev/root, is something that the kernel does independently of openrc.
/proc/mounts lists correctly this rootfs with or without openrc. What openrc does is exactly copying all entries from /proc/mounts in /etc/mtab, so that's why this rootfs appears with baselayout-2.
What I don't really understand is what this rootfs really is. During the boot process root get mounted readonly and then remounted rw. This rootfs isn't the first mount of the root filesystem, since it is mounted rw. Also the rw remount should be made with "mount -o remount", which won't mount /dev/root above the old mount.
rootfs is present in ubuntu too so it isn't something gentoo-specific.
Can anyone explain me what rootfs is and what is there for? _________________ Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne |
|
Back to top |
|
|
Desintegr l33t
Joined: 25 Mar 2004 Posts: 863 Location: France - Orléans
|
Posted: Mon Apr 21, 2008 10:43 pm Post subject: |
|
|
Another problem : options in /etc/fstab are not respected :
/etc/fstab :
Code: |
[...]
/dev/sda2 / xfs noatime,nodiratime,logbufs=8 0 0
/dev/sda6 /home xfs noatime,nodiratime,logbufs=8 0 0
[...] |
mount :
Code: |
rootfs on / type rootfs (rw)
/dev/root on / type xfs (rw,noatime,nodiratime,noquota)
[...]
/dev/sda6 on /home type xfs (rw,noatime,nodiratime,logbufs=8)
[...] |
The logbufs=8 option is ignored for /. _________________ Gentoo ~AMD64
Hoc Volo, Sic Jubeo !
Mon wiki : http://desintegr.free.fr |
|
Back to top |
|
|
ABCDwp Retired Dev
Joined: 26 Mar 2006 Posts: 79
|
Posted: Tue Apr 22, 2008 2:29 am Post subject: |
|
|
Desintegr wrote: | The logbufs=8 option is ignored for /. |
What happens if you try to mount -oremount,logbufs=8 /? (If there is an error, then you will have to change the mount options on the kernel command line - this has not changed from baselayout-1, it may only have appeared to work, while not actually doing anything). |
|
Back to top |
|
|
Desintegr l33t
Joined: 25 Mar 2004 Posts: 863 Location: France - Orléans
|
Posted: Tue Apr 22, 2008 2:29 pm Post subject: |
|
|
Just after boot :
Code: | /dev/root on / type xfs (rw,noatime,nodiratime,noquota) |
After mount -o remount / :
Code: | /dev/root on / type xfs (rw,noatime,nodiratime,logbufs=8) |
It's ok because the option is already in the fstab.
After mount -oremount,logbufs=8 / :
Code: | /dev/root on / type xfs (rw,noatime,nodiratime,logbufs=8,logbufs=8) |
The option appears twice because it is both in the fstab and in the command line. _________________ Gentoo ~AMD64
Hoc Volo, Sic Jubeo !
Mon wiki : http://desintegr.free.fr |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2508 Location: Silver City, NM
|
Posted: Thu May 26, 2011 12:58 am Post subject: |
|
|
I've run into this too after upgrading to baselayout-2. I don't mind the two / entries so much, what seems broken to me is that the device that is actually mounted at / no longer shows up in the output of df: Code: | $ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 31G 15G 15G 50% /
/dev/root 31G 15G 15G 50% / |
I don't understand the purpose of hiding/obscuring this rather important information. It seems like just a horrible idea. I suppose I could process the output of df and run readlink on the first parameter but why make people go through all this effort? IMO this is a big bug. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu May 26, 2011 11:42 pm Post subject: |
|
|
it's an old thing : https://forums.gentoo.org/viewtopic-p-6204542-highlight-rootfs.html#6204542
and the new openrc (it wasn't doing it by this time) now auto mount itself shm (you can check it with mount)
So if anyone wish to disable the rootfs he should hack sysfs to remove shm mount and this should remove rootfs (as this user was doing by this time, when openrc wasn't mounting shm, we were ask to add that in fstab)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
dunno if this work to just disable shm fs mount, AND, more dunno how your system will play if you do that.
as it's the new "standard" i can just tell you that you shouldn't disable it, as some new tools might use and expect its presence (and specially as it was add by kernel at first) |
|
Back to top |
|
|
theBlackDragon l33t
Joined: 23 Nov 2002 Posts: 768 Location: Belgium
|
Posted: Fri May 27, 2011 2:21 pm Post subject: |
|
|
I've run into this as well now, so should I replace the direct link to my root partition with /dev/root ?
Right now I get this:
Code: | % df -h
rootfs 293G 121G 158G 44% /
/dev/sda3 293G 121G 158G 44% / |
This seems to confuse phpsysinfo and Munin, both think I have 293G more space than I actually have which is a tad annoying.
They also seem to be mounted with different options:
Code: | % mount
rootfs on / type rootfs (rw)
/dev/sda3 on / type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered) |
Is there some proper documentation about this? I'm obviously confused and while my install still works properly the change causes annoying issues (as mentioned above) _________________ Fvwm|Fvwm forum |
|
Back to top |
|
|
|