PDA

View Full Version : Question about Hard Disk Capacity


windsea
2008-07-16, 07:09 AM CDT
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 151G 24G 120G 17% /media/disk-2
/dev/sdb1 155G 14G 133G 10% /media/disk-3
/dev/sdb3 154G 188M 146G 1% /media/disk-4


Hello,Fedora Friends:
I just bought a HD and format it with ext3 format,but after a couple of days when I check it with the "df" command,I am a little confusing.The result is as above.
The question is that Size> Used+Avail. In every partition it seems that 7-8GB space was lost.I know that even a blank disk may take some space.But it take two much in my opinion,any explanations?
Thank you.

sideways
2008-07-16, 07:59 AM CDT
when you format it use the -m 0 option to make the reserved blocks percentage 0%, otherwise it is set to 5% by default on ext3 - it's emergency space reserved for superuser. (If you have any ntfs partitions you will see used+available = size (pretty much))

see 'man mke2fs'

windsea
2008-07-16, 08:23 AM CDT
Thank you for your answer ,it indeed help me clear the issue.

BTW,I mainly use the disk for backup ,as you can see. I previously use gparted to format the disk. After reading the manual I wonder whether I need the reserved 5%space or not for a backup disk purpose,any suggestions?

Another accompanied question,now the reserved disk space is 5%.Is there any method or tools to convert it to 0% seamlessly while keeping the data on the disk safely.Or I have to first to move the data to another disk and after reformating it,copy data back again?

Best wishes.

sideways
2008-07-16, 08:42 AM CDT
You can change it using the tune2fs (http://linux.die.net/man/8/tune2fs) command

I don't think you need to set it on partitions which just contain user data and backups, but if you're at all worried set it to 1% to be safe

tune2fs -m 1 /dev/sdb1

see 'man tune2fs'

windsea
2008-07-16, 08:51 AM CDT
Thank you very much. I have to admit that you reply very quickly. I just google to get the tune2fs command and want to give it here,I found you already answered it.

Thanks for your suggestions and help.

sideways
2008-07-16, 09:36 AM CDT
cheers :)

In some cases it is advisable to do this even when the partition contains system directories, eg if you have the OS running from a usb stick or sdhc card. Since in those cases stuff like system logging should be made minimal anyway, and space really is at a premium, the default 5% on a 8GB sdhc for example is ~400mb, which is way too large (i run F8 on a asus ee pc from such a card)

windsea
2008-07-16, 09:59 AM CDT
I agree. For my cases,25G reserved space seems to small relative to my 500G hard disk,but it is not relatives small compared to some mobile disks and can hold a lot of document.

Thanks for your clarification and explanation.I profit a lot.

Omni-Tom
2008-07-16, 01:06 PM CDT
Hi guys

Neet thread topic. I was wondering how to find out how much is reserved on a partition. As for my / dir reserving seems a ok thing as I will never totally fill it all the way up but I have a 177 Gig /home dir. So I would like to see what is reserved there now and how to change it to 0 or 1%

New info for me.
Thanks