LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-10-2013, 11:38 AM   #1
techux
Member
 
Registered: Mar 2013
Posts: 56

Rep: Reputation: Disabled
Rootfs twice


Hi guys.

I have a server at running debian 6.0.7, after a while I noticed when I run df -h / is twice as you can see below. After the installation it didnt show any UUID nor rootfs

Is this critical or there isnt nothing to worry about,


Code:
rootfs 4.6G 1.3G 3.1G 30% /
udev 10M 128K 9.9M 2% /dev
tmpfs 101M 84K 101M 1% /run
/dev/disk/by-uuid/7ce388cb-e37a-490f-8de9-e2d78c09345454
4.6G 1.3G 3.1G 30% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 393M 0 393M 0% /run/shm
PS: not sure if this post should be here or at debian section.sorry for the double post
 
Old 07-10-2013, 12:10 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Check your "/etc/fstab". You probably mounted it twice. It should not be a problem.
 
Old 07-10-2013, 02:03 PM   #3
techux
Member
 
Registered: Mar 2013
Posts: 56

Original Poster
Rep: Reputation: Disabled
No, I havent changed or touch /etc/fstab.
 
Old 07-10-2013, 03:51 PM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Can you show files '/etc/mtab' and '/proc/mounts'?
 
Old 07-10-2013, 04:15 PM   #5
techux
Member
 
Registered: Mar 2013
Posts: 56

Original Poster
Rep: Reputation: Disabled
/etc/mtab is a symlink to /proc/mounts.

I think it could be a debian bug due the symlink.

I really wont care so much about the UUID if this is not big deal and wont cause any problem in the system, is it?


Here is /proc/mounts

Quote:
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=10240k,nr_inodes=128098,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=103420k,mode=755 0 0
/dev/disk/by-uuid/7ce388cb-e37a-490f-8de9-e2d78c09fda7 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=401980k 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0

Quote:
fstab:

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/md0 during installation
UUID=7ce388cb-e37a-490f-8de9-e2d78c09fda7 / ext3 errors=remount-ro 0 1
# swap was on /dev/md1 during installation
UUID=ba9b5c46-6a30-4264-aa35-22a7ce36f28c none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
 
Old 07-10-2013, 05:05 PM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
/etc/mtab is probably a symlink to /proc/mounts

And this is the problem..

Here is some background I came across

https://bugzilla.redhat.com/show_bug.cgi?id=709351
( opened 2011-05 )

coreutils (8.20-3), in sid does not resolve the issue.

In your case, you can resolve the issue by excluding file system type 'rootfs'

Code:
df -h -x rootfs

In the case of bind mounts, well.. some script to clean up the duplicates, far from ideal.
 
Old 07-10-2013, 05:20 PM   #7
techux
Member
 
Registered: Mar 2013
Posts: 56

Original Poster
Rep: Reputation: Disabled
I added to /etc/profile those lines to hide the rootfs but it is only for rootfs. Still display the UUID for /

Quote:
Originally Posted by Firerat View Post
/etc/mtab is probably a symlink to /proc/mounts

And this is the problem..

Here is some background I came across

https://bugzilla.redhat.com/show_bug.cgi?id=709351
( opened 2011-05 )

coreutils (8.20-3), in sid does not resolve the issue.

In your case, you can resolve the issue by excluding file system type 'rootfs'

Code:
df -h -x rootfs

In the case of bind mounts, well.. some script to clean up the duplicates, far from ideal.
 
Old 07-10-2013, 05:56 PM   #8
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by techux View Post
I added to /etc/profile those lines to hide the rootfs but it is only for rootfs. Still display the UUID for /
just done a little reading around the subject ( my Debian Jessie does not have the UUID issue )

It seems that the initramfs *might* be using busybox to mount the root is causing the UUID to be used in proc/mounts

I have 'emulated' this by using busybox to mount via UUID, and indeed I have a mixed df output now.

As you are otherwise booting fine and this is a cosmetic issue, I would be reluctant to fix the initramfs ( it isn't very broken ).
Instead I would look at using the output of either ; /sbin/blkid or ls -l /dev/disk/by-uuid/ to substitute the UUID with the block device using a script
Guess it depends on how important an issue it is.

For reference here is what pointed me to busybox
http://lwn.net/Articles/549363/
It might turn out not to be the culprit, I didn't do too much work here.

I guess another option is to not use UUID in /etc/fstab or grub.. depends if you are in the habit of adding/moving drives around ( physically )
 
Old 07-10-2013, 07:40 PM   #9
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
as an exercise for myself I came up with this

Code:
df -h -x rootfs $@ \
| awk '{if ($1 ~ /by-uuid/) "ls -l "$1"|sed -e s[.*./[/dev/["|& getline $1;printf "%-11s%9s %9s %9s %4s %-10s%s\n",$1,$2,$3,$4,$5,$6,$7}'
The formatting is a little screwy if you pass things like -T ( the extra field messes everything up )

Not that the formatting is great to begin with ( I need to learn how to manipulate $1's length without causing the rest to 're-evaluate' )

But hey Botox is Botox
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building rootfs renl Linux - Newbie 1 08-31-2011 12:43 PM
initrd and looback rootFS mathieu_jonathan_poirier Linux - Embedded & Single-board computer 0 08-04-2009 05:47 PM
rootfs and etab ashlesha Linux - Newbie 0 09-20-2006 07:54 PM
rootfs is mounted twice! elconde Linux - General 3 11-04-2003 08:37 PM
lilo.conf rootfs DavidPhillips Linux - General 6 03-25-2003 07:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration