[Cialug] how to discover what device your path is on

David Champion dave at visionary.com
Mon Jun 13 11:29:40 CDT 2005


Kenneth Ristau wrote:
> Jerry Weida wrote:
> 
>>You can issue a 'df -k' (or 'df -h' if you system supports it). If you are 
>>on /var/spool then look for an entry that says /var. This will tell you the 
>>device that directory sits on. If you don't see an entry for /var then it 
>>probably is part of the root filesystem, /. Then you just check the device 
>>that this sits on.
>>
>>i.e.
>>[user at host ~]$ df -h
>>Filesystem Size Used Avail Use% Mounted on
>>/dev/md0 2.0G 121M 1.9G 7% /
>>/dev/md3 25G 423M 25G 2% /home
>>/dev/md1 7.9G 885M 7.0G 12% /usr
>>/dev/md2 40G 895M 39G 3% /var
>>
>>In this case, the /var is on /dev/md2. Your mileage may differ.
> 
> 
> Correct.  And the following will list just the directory in question:
> 
>   df -h /var/spool
> 
> In fact, /var and /var/spool could be on two different devices.  If they
> were, then you should see an entry for both paths using the form Jerry
> presented.  For example:
> 
> [user at host ~]$ df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/md0 2.0G 121M 1.9G 7% /
> /dev/md3 25G 423M 25G 2% /home
> /dev/md1 7.9G 885M 7.0G 12% /usr
> /dev/md2 40G 895M 39G 3% /var
> /dev/md4 10G 1G 9G 10% /var/spool
> 
> If I'm looking for free space, I use Jerry's method.  If I'm looking for
> the device a path resides on I use mine.  Both work, so 'tis just a
> matter of opinion :)
> 
> later,
> kristau

... and in the fine *nix tradition of there being many ways of doing 
things... try just typing "mount" to see a list of your partitions and 
their mount points.

-dc



More information about the Cialug mailing list