LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-23-2003, 09:25 AM   #1
jdara1
LQ Newbie
 
Registered: May 2003
Posts: 9

Rep: Reputation: 0
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
 
Old 05-23-2003, 10:03 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
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).
 
Old 05-23-2003, 10:06 AM   #3
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Other answers here:
http://www.linux.org/docs/ldp/howto/LVM-HOWTO/
 
Old 05-23-2003, 12:22 PM   #4
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
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.
 
  


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
Linux commands - giving doubled output shinobi59 Red Hat 1 11-07-2005 06:43 PM
I did not know about logical volumes gezi Linux - Newbie 5 04-27-2005 09:26 AM
FC3 slow boot: scans logical volumes..? tardigrade Fedora 1 04-03-2005 01:45 AM
Bash: How to concatenate the output of different commands? J_Szucs Programming 1 11-13-2003 07:43 AM
Using commands to output to files, how is this done? nro Linux - Newbie 3 11-11-2003 08:38 PM


All times are GMT -5. The time now is 12:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration