Unix Technical Forum

Mystery of the missing diskspace

This is a discussion on Mystery of the missing diskspace within the Linux Operating System forums, part of the Unix Operating Systems category; --> I had an AMD Duron based system (40 GB disk) that came installed with Linspire v4.5. I went ahead ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 09:15 AM
nimmi_srivastav@yahoo.com
 
Posts: n/a
Default Mystery of the missing diskspace

I had an AMD Duron based system (40 GB disk) that came installed with
Linspire v4.5. I went ahead and reimaged the system with RH9.0. There
were no problems in the installation, whatsoever. However, I cannot
account for all the diskspace.


fdisk gives me the following output:

Disk /dev/hda: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 4711 37736685 83 Linux
/dev/hda3 4712 4870 1277167+ 82 Linux swap


and df gives me the following output:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 37144364 2198508 33059024 7% /
/dev/hda1 101089 9275 86595 10% /boot
none 313480 0 313480 0% /dev/shm

df -a gives the following output:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 37144364 2198508 33059024 7% /
none 0 0 0 - /proc
usbdevfs 0 0 0 - /proc/bus/usb
/dev/hda1 101089 9275 86595 10% /boot
none 0 0 0 - /dev/pts
none 313480 0 313480 0% /dev/shm


Since I am not dual-booting, I would like to claim all the available
diskspace. Can anyone kindly suggest how to go about it?

Thanks,
Nimmi

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 09:15 AM
Dances With Crows
 
Posts: n/a
Default Re: Mystery of the missing diskspace

["Followup-To:" header set to comp.os.linux.misc.]
On 5 Dec 2005 05:55:54 -0800, nimmi_srivastav@yahoo.com staggered into
the Black Sun and said:
> I had an AMD Duron based system (40 GB disk) that came installed with
> Linspire v4.5. I went ahead and reimaged the system with RH9.0.


Why use something obsolete? If you're going to go to all the trouble of
reinstalling something, use something recent--it's usually faster and
less buggy.

> fdisk gives me the following output:
> Disk /dev/hda: 40.0 GB, 40060403712 bytes


That's 40 Marketing G, not 40 Real G. 40 Marketing G is 37.3 Real G.
(40060403712 / (1024*1024*1024) = 37.30915...)

> and df gives me the following output:
> /dev/hda2 37144364 2198508 33059024 7% /
> /dev/hda1 101089 9275 86595 10% /boot
>
> Since I am not dual-booting, I would like to claim all the available
> diskspace. Can anyone kindly suggest how to go about it?


You can't make the disk have more bytes than it has. Also, by default
ext[23] reserves 5% of the space on each filesystem for root. You can
change that with tune2fs, but be careful. You made only 2 partitions,
and if / or /var fills up completely, the system won't boot and/or many
things will stop working. You can change the reserved space to 1 or 2%,
but don't make it 0%. Also remember that ReiserFS's journal takes a
minimum of 64M, and ext3's journal also takes up some space. The space
used by the journal is not available for files. HTH,

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / "He is a rhythmic movement of the
-----------------------------/ penguins, is Tux." --MegaHAL
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 09:15 AM
Giovanni
 
Posts: n/a
Default Re: Mystery of the missing diskspace

On 12/05/05 14:55, nimmi_srivastav@yahoo.com wrote:

> fdisk gives me the following output:
>
> Disk /dev/hda: 40.0 GB, 40060403712 bytes
> 255 heads, 63 sectors/track, 4870 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 13 104391 83 Linux
> /dev/hda2 14 4711 37736685 83 Linux
> /dev/hda3 4712 4870 1277167+ 82 Linux swap


> Since I am not dual-booting, I would like to claim all the available
> diskspace. Can anyone kindly suggest how to go about it?



There is no unused space to be claimed on your disk. You may see
discrepancies from the reports of fdisk and df but they report different
quantities.

For each partition fdisk reports the real size, while df reports the
size after formatting. The missing blocks are used for file system data
fdisk -> /dev/hda2 37736685
df -. /dev/hda2 37144364

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 <http://counter.li.org/>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-18-2008, 09:15 AM
Enrique Perez-Terron
 
Posts: n/a
Default Re: Mystery of the missing diskspace

On Mon, 05 Dec 2005 14:55:54 +0100, <nimmi_srivastav@yahoo.com> wrote:

> I had an AMD Duron based system (40 GB disk) that came installed with
> Linspire v4.5. I went ahead and reimaged the system with RH9.0. There
> were no problems in the installation, whatsoever. However, I cannot
> account for all the diskspace.
>
>
> fdisk gives me the following output:
>
> Disk /dev/hda: 40.0 GB, 40060403712 bytes
> 255 heads, 63 sectors/track, 4870 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 13 104391 83 Linux
> /dev/hda2 14 4711 37736685 83 Linux
> /dev/hda3 4712 4870 1277167+ 82 Linux swap
>
>
> and df gives me the following output:
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/hda2 37144364 2198508 33059024 7% /
> /dev/hda1 101089 9275 86595 10% /boot
> none 313480 0 313480 0% /dev/shm


This is normal. A "file system" always assigns some of the space to
such pruposes as free blocks bitmap, inodes, etc. Also the fs will
leave unused a couple of segments at the start of the partition, to
allow for boot software.

Unfortunately I don't know all details, so I cannot check if the numbers
shown are indeed correct. I observe that there are two gaps, one between
37736685 in fdisk and 37144364 in df, the difference being 592321 blocks,
and one between 37144364, the "total", and the sum 2198508 + 33059024 =
35257532 of "used" and "available", 1886832 blocks short of the "total".

All my file systems show similar discrepances.

-Enrique
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:43 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com