slave drive mounting where?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Nov 21 23:20:07 UTC 2007


On Wed, Nov 21, 2007 at 05:25:22PM -0500, Chris Aitken wrote:
> My hard drive is filling up at an alarming rate since I started using 
> the iPod. I thought I was ready for this when, as dfew weeks  ago, I 
> thought I formatted a separate drive (/dev/sdb) to store .ogg's. It was 
> to mount on /bckupdrv. Now I'm getting conflicting information:
> 
> [root at p733 chris]# /sbin/fdisk -l /dev/sdb
> 
> Disk /dev/sdb: 10.0 GB, 10005037056 bytes
> 255 heads, 63 sectors/track, 1216 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdb1               1        1216     9767488+  83  Linux
> [root at p733 chris]# df /dev/sdb1
> 
> Filesystem           1K-blocks      Used Available Use% Mounted on
> -                       192016       140    191876   1% /dev
> 
> [root at p733 chris]#
> 
> It looks like the 10 GB drive is there, but why is it saying it is 
> mounted on /dev?
> 
> THe bottom line is I want to make sure I am saving .ogg's to the 
> separate slave drive not my primary drive.
> 
> How can I verify this?

No, when you ask df with a path, it tells you the info for whatever
device contains what you asked for.  So since you asked for df on
/dev/sdb1 you got the info on whatever holds the device node /dev/sdb1
which is generally the root filesystem.  You wanted to ask df about
wherever you mounted /dev/sdb1 to since it needs to be mounted to tell
how full it is (since it requires filesystem knowledge to see that info,
which df doesn't have so instead you must mount it first and then ask df
for the info on that mount point).

So if you went: 
mount /dev/sdb1 /mnt
df /mnt

Then you would get useful info.

You can check for yourself.  Try:
df /
df /dev
df /dev/random
etc...

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list