actual physical disk size
Hi,
I am trying to figure out the "actual" disk size used by my system. When I run the "df -h" command, it outputs as below: PHP Code:
PHP Code:
I am not taking here into consideration the shared memory of 2Gb as it is a sort of virtual shared memory and is not allocated physically. Is that correct ? |
You are also not taking into account the possibility that some disk space may not be allocated to a partition. Run cfdisk as root to see all of the partitions, their sizes, and unallocated space. The sum of those sizes will be the total disk space.
|
Just run 'fdisk -l /dev/sda' The first line will show you the disk size. For example:
Code:
|
Oooops. Never mind. :redface:
|
Quote:
Can you set that straight. Is it directly on the hardware or what virtualization system are you using? If it is virtual, a question like "actual disk size" might not even mean anything. For non virtual, I would echo Macemoneta's answer, except that you might need to be root to use that command and depending on how you become root, /sbin might not be in your path, so you might need /sbin/fdisk -l Unless you specifically want to limit the info you get to sda, there is no need to specify which disk you want the info for. I will default to all disks. |
I am not trying to find the size of actual physical disk. I know it can be grabbed with fdisk and dmesg command. ""I know the size of physical disk"".
What I wanted to calculate is how much of my physical disk is being used really. Quote:
|
Quote:
|
That is the point... I meant size allocated to files.. And over here, do I need to count /dev/shm in that case ? I don't think so...just wanted to make it sure...
Quote:
|
/dev/shm = shared (RAM) mem; shouldn't affect disk space
You can also check disk space via du for a different angle. Note the caveats mentioned here: http://linux.die.net/man/1/df http://linux.die.net/man/1/du and also allow for the fact that a certain amt (5% default) is set aside by the OS during install. http://linux.die.net/man/8/mkfs.ext3 http://linux.die.net/man/8/tune2fs |
All times are GMT -5. The time now is 10:33 AM. |