LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-25-2007, 03:42 AM   #1
wabaha
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 0
df command not list root directory


Hello,

I run the df -h command, /dev/sda5 (/) is not shown in the result.

I run the command cat /proc/mounts, I do see the following
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,data=ordered,usrquota 0 0


Thanks for your help.
 
Old 10-25-2007, 06:29 AM   #2
wolfperkins
Member
 
Registered: Oct 2007
Location: Val-des-Monts, Québec, Canada
Distribution: CentOS, RHEL, Fedora
Posts: 110

Rep: Reputation: 16
What is in /etc/mtab?
 
Old 10-25-2007, 07:00 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Also, look in /dev to see what /dev/root is linked to
 
Old 10-25-2007, 11:26 AM   #4
wabaha
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hello,

The following is what's in /ect/mtab. The root is not listed. Is it the problem? Thanks a lot for the help.


/dev/sda1 /boot ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/sda7 /home ext3 rw,usrquota 0 0
/dev/sda8 /tmp ext3 rw,noexec,nosuid 0 0
/dev/sda3 /usr ext3 rw,usrquota 0 0
/dev/sda2 /var ext3 rw,usrquota 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/tmp /var/tmp none rw,noexec,nosuid,bind 0 0
/dev/sdb1 /backup ext2 rw 0 0
 
Old 10-25-2007, 01:23 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
So----
sda5 is not mounted anywhere
Nothing is mounted at "/"

How is this system even running at all????!!!!

In /boot/grub/menu.lst, what is in the "root= " statement on the kernel line?
 
Old 10-25-2007, 06:43 PM   #6
wabaha
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hello,

The file is like this.

# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda5
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=20
#splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/1 console=tty0 console=ttyS1,19200n8
initrd /initrd-2.6.18-8.el5.img
 
Old 10-25-2007, 06:47 PM   #7
wabaha
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hello,

The root is listed in fstab file.

LABEL=/1 / ext3 defaults,usrquota 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
LABEL=/home1 /home ext3 defaults,usrquota 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=/tmp1 /tmp ext3 defaults 1 2
LABEL=/usr1 /usr ext3 defaults,usrquota 1 2
LABEL=/var1 /var ext3 defaults,usrquota 1 2
LABEL=SWAP-sda6 swap swap pri=0,defaults 0 0
/tmp /var/tmp ext3 defaults,bind,noauto 0 0
/dev/sdb1 /backup ext2 defaults 0 0
 
Old 10-25-2007, 07:29 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I'm now in over my head---I know nothing of the RedHat labelling (except that I don't like it...)

So---for someone: Why does this line in fstab:
LABEL=/1 / ext3 defaults,usrquota 1 1
not result in an mtab entry??

wabaha: any chance that the mtab file got snipped in the cut 'n paste?
 
Old 10-25-2007, 11:52 PM   #9
wabaha
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hello,

The root entry is indeed not in the mtab file.

The root file system is on a RAID 1 disk. Is it possilbe that somehow the raid control has problem?
 
Old 10-26-2007, 06:49 AM   #10
wolfperkins
Member
 
Registered: Oct 2007
Location: Val-des-Monts, Québec, Canada
Distribution: CentOS, RHEL, Fedora
Posts: 110

Rep: Reputation: 16
I have seen this before where the mtab files gets out of sync with what is actually mounted. /proc/mounts will not lie to you. mtab might.

Unfortunately the df command uses the mtab file to sort out the mounted filesystems.

Sorry to say this but a reboot would fix it.

I have also seen forum entries where people link /etc/mtab to /proc/mounts but I strongly discourage such practice.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
Command to run another command against a list of files psweetma Linux - General 3 11-09-2005 05:29 PM
Print directory list command AlexCPU Linux - Newbie 5 11-07-2004 03:41 PM
can't see root file system with list command fr_baker Linux - General 10 06-07-2004 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:50 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