LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to read the output of df -k and about logical volumes commands (https://www.linuxquestions.org/questions/linux-software-2/how-to-read-the-output-of-df-k-and-about-logical-volumes-commands-61357/)

jdara1 05-23-2003 09:25 AM

how to read the output of df -k and about logical volumes commands
 
Currently we are having the following linux intel boxes in our company.
uname -n output is this
Linux u060ms01 2.4.18-18.7.xsmp #1 SMP Wed Nov 13 19:01:42 EST 2002 i686 unknown

The following is the output of df -k

[dview@u060ms01 dview]$ df -k | more
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda10 2656420 214852 2306624 9% /
/dev/sda1 46636 25658 18570 59% /boot
/dev/sda7 3020140 32812 2833912 2% /internal_home
none 1290976 0 1290976 0% /dev/shm
/dev/sda3 5036316 1580720 3199764 34% /usr
/dev/sda8 1004024 54424 898596 6% /var

For example, if we take the root file system,
I am not understanding why the sum of
Used ( 214852 ) + Available ( 2306624 ) is not equal to 2656420.

Can somebody explain about this.

Apart from the above, if you are familiar with the logical volume manager commands.
I am interested in knowing.
commands to list the volume groups,logical volumes, how to know so and so logical volume is sitting on so and so logical disk etc.,

Jagadish Dara

rch 05-23-2003 10:03 AM

Re: how to read the output of df -k and about logical volumes commands
 
Quote:

Originally posted by jdara1
Currently we are having the following linux intel boxes in our company.
uname -n output is this
Linux u060ms01 2.4.18-18.7.xsmp #1 SMP Wed Nov 13 19:01:42 EST 2002 i686 unknown

The following is the output of df -k

[dview@u060ms01 dview]$ df -k | more
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda10 2656420 214852 2306624 9% /
/dev/sda1 46636 25658 18570 59% /boot
/dev/sda7 3020140 32812 2833912 2% /internal_home
none 1290976 0 1290976 0% /dev/shm
/dev/sda3 5036316 1580720 3199764 34% /usr
/dev/sda8 1004024 54424 898596 6% /var

For example, if we take the root file system,
I am not understanding why the sum of
Used ( 214852 ) + Available ( 2306624 ) is not equal to 2656420.

Can somebody explain about this.

Apart from the above, if you are familiar with the logical volume manager commands.
I am interested in knowing.
commands to list the volume groups,logical volumes, how to know so and so logical volume is sitting on so and so logical disk etc.,

Jagadish Dara

The difference is due to the the extra LVM information.The information maybe of order of 2mb or more
One way to find out is
od -Ad -a /dev/sda10|grep "E X T"
(note three spaces after E)
The first string you get (ie the address of the line containing the string) defines the actual start of the EXT3 partition.
Another interesting fact is that you will get a very high number and maybe you get confused on the number (saying how can it be the start of EXT3 if the number is too high).
This is becoz the lines are in bytes you have to convert them to sectors(I hope that I don't have to tell you how to do that).

rch 05-23-2003 10:06 AM

Other answers here:
http://www.linux.org/docs/ldp/howto/LVM-HOWTO/

moses 05-23-2003 12:22 PM

Actually, it looks like those devices are not LVM. The numbers don't add up because ext2 reserves some amount of space (defaults to ~5%) for the super-user. This space does not show up in df because it's not available, and it's not, technically, used.


All times are GMT -5. The time now is 04:19 PM.