LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 09-24-2004, 10:12 PM   #1
jjordan
LQ Newbie
 
Registered: Jan 2003
Posts: 13

Rep: Reputation: 0
disk not showing up in 'df' command


This may be simple for a Linux guru, but I'm stumped.

I have three hard disks. hda, hdb, hdc. When I do a 'df' command, hdb doesn't show up.

-----------------------------------
output from fdisk -l:

Disk /dev/hda: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 22 176683+ 83 Linux
/dev/hda2 23 87 522112+ 82 Linux swap
/dev/hda3 88 7476 59352142+ 83 Linux

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 155061 78150712+ 83 Linux

Disk /dev/hdc: 100.0 GB, 100030242816 bytes
16 heads, 63 sectors/track, 193821 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 193821 97685752+ 83 Linux

---------------------------------
Output from 'df'

Filesystem Size Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part3
56G 31G 23G 58% /
/dev/ide/host0/bus0/target0/lun0/part1
168M 21M 138M 14% /boot
/dev/ide/host0/bus1/target0/lun0/part1
92G 16G 72G 19% /mnt/removable

-------------------------------------
cat mtab shows;

/dev/ide/host0/bus0/target0/lun0/part3 / ext3 rw 0 0
none /proc proc rw 0 0
none /proc/bus/usb usbfs rw 0 0
none /dev devfs rw 0 0
none /sys sysfs rw 0 0
/dev/ide/host0/bus0/target0/lun0/part1 /boot ext3 rw 0 0
none /dev/pts devpts rw,mode=0620 0 0
/dev/ide/host0/bus1/target0/lun0/part1 /mnt/removable ext3 rw 0 0

------------------------------------
cat fstab shows:

/dev/hda3 / ext3 defaults 1 1
/dev/hda1 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hdd /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdb1 /mnt/drive2 auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0
/dev/hdc1 /mnt/removable auto defaults 0 0
none /proc proc defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/ide/host0/bus0/target1/lun0/part1 /mnt/hd auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0
/dev/ide/host0/bus1/target0/lun0/part1 /mnt/hd2 auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0
---------------------------------
'mount' shows:

/dev/ide/host0/bus0/target0/lun0/part3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /proc/bus/usb type usbfs (rw)
none on /dev type devfs (rw)
none on /sys type sysfs (rw)
/dev/ide/host0/bus0/target0/lun0/part1 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,mode=0620)
/dev/ide/host0/bus1/target0/lun0/part1 on /mnt/removable type ext3 (rw)
--------------------------------
cat /proc/diskstats shows;

3 0 hda 34933 34195 1435082 321243 190225 4005253 33566614 54291631 0 816867 54614651
3 1 hda1 337 2096 48 94
3 2 hda2 31203 249624 39786 318288
3 3 hda3 37451 1182258 4156029 33248232
3 64 hdb 4 32 288 50 0 0 0 0 0 50 50
3 65 hdb1 0 0 0 0
22 0 hdc 133741 4286 31948730 853207 1351 1369 21824 171337 0 829661 1024544
22 1 hdc1 137950 31948114 2728 21824
--------------------------------

I've removed /etc/mtab and rebooted, nothing changes.

I'm running Mandrake 10, I just added hdb and the fs is ext3. It is mounted in the right location (proper mount point) and I have full access to it, without any problems, even through Samba from another machine. So, it really is there.

Summary, everything works the way it should right now, except for the 'df' command.

Why doesn't the 'df' command show it?
And jut as important, how do I fix this?

Thanks for any suggestions.
 
Old 09-24-2004, 11:52 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
It is mounted in the right location (proper mount point) and I have full access to it, without any problems, even through Samba from another machine.
Are you sure?

Both mtab and mount show it is not mounted...and df will not show free space for partitions which are not mounted. The better question is why are you trying to mount it twice to different mount points?
Code:
/dev/ide/host0/bus0/target1/lun0/part1 /mnt/hd auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0
... snip ...
/dev/hdb1 /mnt/drive2 auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0
These are the same drive and partition. Remove one and perhaps your problem will clear up...
 
Old 09-25-2004, 12:36 AM   #3
jjordan
LQ Newbie
 
Registered: Jan 2003
Posts: 13

Original Poster
Rep: Reputation: 0
bulliver,

Thanks for the reply. Hopefully, I can learn something now.

If I remove the line '/dev/ide/host0/bus0/target1/lun0/part1 /mnt/hd auto umask=0' and reboot, that line gets put back into fstab automatically when the system comes back up.

From where does this happen? Or, what is happening here?

If I remove the line '/dev/hdb1 /mnt/drive2 auto umask=0,user,iocharset=iso8859' , it now becomes very strange....

If I go to /mnt/hd, and do an 'ls', nothing shows up.

I can go to /mnt/drive2, even though there is nothing in the fstab file and see everything on that disk. It IS mounted, but how?

Also, with the line '/dev/hdb1 /mnt/drive2 auto umask=0,user,iocharset=iso8859' removed, 'df' still doesn't show any hdb drive of any sort.

Any further suggestions? Also if you know why the one line gets put back in automatically, maybe you can tell me what to look for. I can't find anything on Mandrake site or google for this problem.

p.s. Again, mtab and mount show it is not mounted, so how am I able to access it at /mnt/drive2 mount point?

Again, thanks in advance.

Last edited by jjordan; 09-25-2004 at 12:38 AM.
 
Old 09-25-2004, 04:01 AM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Are you sure you posted accurate output of those commands? Because nowhere is /dev/hdb mounted,
nor is any disk mounted at /mnt/drive2. The only thing that I can think of is that the files you see at
/mnt/drive2 are physically located on the partition you mounted as root, /dev/hda3. Or maybe
your computer is possessed.

As for the two different lines in fstab, the /dev/hdb1 line is the standard way to specify mounts, and the
/dev/ide/host0/bus0/target1/lun0/part1 line is DevFS notation. I am not familiar with Mandrake, but I would
imagine that your system uses, or is trying to use DevFS, and some script run at boot is starting the
devfsd daemon. I would not try tinkering with your devfs settings unless someone more
knowlegable than myself can assist you.

If you have a question ask, but unfortunately I don't know what to tell you.

Last edited by bulliver; 09-25-2004 at 04:03 AM.
 
Old 09-25-2004, 10:28 AM   #5
jjordan
LQ Newbie
 
Registered: Jan 2003
Posts: 13

Original Poster
Rep: Reputation: 0
Right now, fstab shows:
------------------------------------
/dev/hda3 / ext3 defaults 1 1
/dev/hda1 /boot ext3 defaults 1 2
none /dev/pts devpts mode=0620 0 0
/dev/hdd /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdc1 /mnt/removable auto defaults 0 0
none /proc proc defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/ide/host0/bus1/target0/lun0/part1 /mnt/hd2 auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0
/dev/ide/host0/bus0/target1/lun0/part1 /mnt/hd auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0
------------------------------------

'Bus0/target1/lun0/part1 /mnt/hd' *should* be the 2nd drive that I'm trying to mount. This *should* be hdb by the old standard way of mounting drives. If I goto /mnt/hd and do 'ls', nothing shows up. If I do 'df' that drive doesn't show up.

'df' command shows:

Filesystem Size Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part3
56G 31G 23G 57% /
/dev/ide/host0/bus0/target0/lun0/part1
168M 21M 138M 14% /boot
/dev/ide/host0/bus1/target0/lun0/part1
92G 16G 72G 19% /mnt/removable
-----------------------------------------------

When I added the new 2nd drive, hdb, I went into fdisk, then called up 'harddrake' from the system menu to make the file system and tell it the mount point. After that, fstab showed the added line of '/dev/hdb1 /mnt/drive2 auto umask=0,user,iocharset=iso8859-1,kudzu,codepage=850,noauto,exec 0 0'.

With both of those line in fstab, 'df' still did not show anything more than what it shows above.

Why would Mandrake put in two different lines in fstab in different formats to begin with ?

What did Mandrake's devfs mount at /mnt/hd ?
And, why doesn't 'df' show anything mounted at 'dev/ide/host0/bus0/target1' ?

Can you see why I'm confused?

Mandrake does use devfsd and the /etc/devfsd.conf file show this snip for setting up the hard disks at bootup:
---------------------------------------------
# If you have removable media and want to force media revalidation when looking
# up new or old compatibility names, uncomment the following lines
# SCSI NEWCOMPAT /dev/sd/* names
LOOKUP ^(sd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/nu
ll count=1
# SCSI OLDCOMPAT /dev/sd?? names
LOOKUP ^(sd[a-z]+)[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1
# IDE NEWCOMPAT /dev/ide/hd/* names
LOOKUP ^(ide/hd/c[0-9]+b[0-9]+t[0-9]+u[0-9]+)p[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/nu
ll count=1
# IDE OLDCOMPAT /dev/hd?? names
LOOKUP ^(hd[a-z])[0-9]+$ EXECUTE /bin/dd if=$mntpnt/\1 of=/dev/null count=1

REGISTER ^dvb/card[0-9]+/[^/]+$ PERMISSIONS root.video 0660
------------------------------------------------

If you noticed that fstab file, it also creates another mount for mnt/hd2 besides /mnt/hd.

Both of these are empty. I can copy stuff into them and see if with the 'ls' command.

What are these two drives? How do I find out? And, if fstab (Mandrake) searched for, and mounted these, why don't they show up in either 'df' or 'mount' ?

Very confusing.

Hope someone that knows the answer sees this post because I'm lost. Any idea where else I could post this? I'm not subscribed to Mandrake Club.

Also, can you think of anything I could try in order to get to the bottom of this?
 
Old 09-25-2004, 12:25 PM   #6
jjordan
LQ Newbie
 
Registered: Jan 2003
Posts: 13

Original Poster
Rep: Reputation: 0
I think I solved my problem.

Everything in the /dev and procs were linked to the right disks, so that wasn't much help. Everything I read from googling was no help except for the fact that devsfd will be going away soon, which made my day, since I thought Mandrake 10 was cutting edge.

Anyway, I knew that if I went into fstab and deleted the /dev/ide/ line that Mandrake put in there, that it would show back up upon reboot. This meant that somewhere Mandrake was keeping this alive. I can't find out where that is.

I figured that maybe the 'Harddrake' utility would set things right, so I went into Harddrake and deleted the /mnt/hd disk and added the /mnt/drive2 mount point. Previously, I had added the /mnt/drive2 and it showed up in the old format in the fstab file. So, this time, I was hoping that it would again put it in fstab in the old format of /dev/hdb1, which it did. Except this time, I hoped that Harddrake would remove the devfs line.

After reboot, I looked in fstab and found what I was hoping for. The new stype devfs line was removed and the old /dev/hdb1 line was inserted with the proper mount point of /mnt/drive2.

Now everything works right! 'df', 'mount', 'ls', fstab, everything!

Of course the curious fellow that I am, it leaves me with a few nagging questions.

How does someone know to delete the automatically inserted line in fstab through Harddrake?

Where does Mandrake store that stuff in order to add the line in fstab, even though you delete by hand?

Where do you change the name of /dev/hd to what you want?

Why didn't 'mount' or 'df' show the Mandrake auto configured drive?

If it really mounted the second drive, why didn't anything show up using 'ls'?

And...many more.
 
Old 09-25-2004, 03:04 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
You know what, I may be a real idiot here...your fstab lines dealing with hdb are flaged as 'noauto', which
means they do not get mounted automatically at boot...you can either remove the noauto flag to have it
mounted at boot, or use 'mount /dev/hdb' to do it manually...however, this still doesn't explain how you
were seeing data at /mnt/disk2

The script that writes these lines automatically to fstab are almost certainly in one of the init scripts run at
boot. Have a look in /etc/init.d or perhaps /etc/rc.d and have a look for a script with 'devfs' or similar in
the name. Still though...not a good idea to mess with these unless you know what you are doing.

very strange....
 
Old 09-25-2004, 08:35 PM   #8
jjordan
LQ Newbie
 
Registered: Jan 2003
Posts: 13

Original Poster
Rep: Reputation: 0
Don't feel bad. I missed that noauto also. Working on a problem for 24 hours isn't the best course of action.

The /mnt/drive2, which I can't figure out where or how it was, or got mounted, had both the owner and group as root, when both fstab lines were in there to begin with. I can't figure out how I was able to use that drive when NOTHING showed that drive to be mounted. The 'mount' command didn't show it. The 'df' command didn't show it. /proc/mounts didn't show it. The only thing that showed it was 'fdisk'.

Also, even if I mounted it over top of something the system did, it still didn't show up anywhere!

And, if the /mnt/hd and /mnt/hd2 weren't mounted, how was I able to copy stuff to them?

And here's the real mystery. Without that line that mounts /mnt/hd, I can still go to /mnt/hd and see the files that I copied there when I was trying to figure out what that drive was. So, what the heck IS that drive(/mnt/hd)? I don't see it mounted anywhere!

(Do I hear twilight zone music playing in the background?)

So, being that the /mnt/hd was set noauto, why, by removing that line and adding the older /dev/hdb1 mount command, does everything seem to work properly and that drive, /mnt/drive2, now shows up everywhere it should?

This (Mandrake10) is the first Linux distro that I haven't got a lot of documentation for, since I was beta testing it before it was released and know many different Linuxes pretty well. This problem has to do with how Mandrake, specifically handles their bootup scripts for devfsd.

Since devfsd will be going away shortly, I don't feel like becoming an expert on it at this stage.

I use my Linux machines for actual work, not playing around on. Of course, when you don't have to cuss out BillyG, any computer is fun to work on :-)

I bought a brand new emachine with Winxp on it about a year ago. The first week I had it, it crashed 3 times on me. I hadn't put any new software on it. It crashed using Microsoft Office twice and IE6 once. During the next few months, I loaded it up with some software and redid the registry to clean out everything that wasn't necessary. Since then, it has been fairly stable. I use it solely for the purpose of seeing how websties look on IE6 and other browsers running under windwoze. I can keep it up for about 9 days, before it becomes unstable and I have to reboot.

Understand that this computer is just sitting there doing nothing! It's not running any programs, except for the few times that run one of the browsers to check something. And it still becomes unstable after 8 to 9 days. The longest I had it running was 10 days before reboot.

I've got a Red Hat 7.3 computer running here for over 314 days now. And as we all know, a Linux box only gets shut down because the admin *wants* to shut it down ;-)

Sorry about the length of this. I actually got some sleep since I solved this problem, so I feel good.

Thanks for your suggestions, but there are still too many unanswered questions.
 
Old 09-25-2004, 09:29 PM   #9
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
And, if the /mnt/hd and /mnt/hd2 weren't mounted, how was I able to copy stuff to them?
This is what I was trying to tell you -> /mnt/hd and /mnt/hd2 are just part of your root ie: '/' filesystem. If there is
nothing mounted there, then any files copied there are physically in that directory.
When you mount something there they 'disappear', which is to say they are hidden
(un-accessable) until whatever partition that resides there is unmounted, then you
can see them again.

I think what you did was merrily copy your files over to /mnt/wherever thinking /dev/hdb was mounted when in fact it was not...

Last edited by bulliver; 09-25-2004 at 09:33 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
showing only directorys from the command line djgerbavore Linux - Newbie 7 07-13-2005 08:34 PM
Hard disk size not showing correctly niranjan_mr Linux - Software 4 01-29-2005 06:10 AM
Hard disk not showing correct size rwalkerphl Linux - Newbie 8 08-19-2004 02:58 PM
Multiple /dev/hda1 's listed after a 'df' command (up to 50-60) hmschouten Linux - General 4 04-02-2004 03:07 PM
redhat 7.3 installer not showing actual disk size ... ashanmugam Linux - Software 1 09-30-2002 05:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 06:27 PM.

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