The filesystem is ext4. When I show view the hard drive in GParted, it shows
the size as 698.64 GB, used as 29.57 GB, and unused as 669.07 GB. Since df
shows the capacity as 688 GB, I believe that 10 GB difference in reported
capacity is due to the space take up by root as you mentioned. However, it
doesn't take into account the fact that GParted says that 669.07 GB is
available, while df states that only 635 GB is available. Additionally, the
difference in capacity and available space reported by df (53 GB) is almost
3x the 19 GB it reports as used, which makes sense if it isn't reporting
hard links correctly since I have 3 snapshots of my backup. This is also
corroborated in the GNOME properties dialog for the drive: in the pie chart
it states that 53.5 GB is used and 634.1 GB is free, while in the Contents
section it states that the files total in 18.3 GB, which matches the output
for df when you take rounding into account, complete with the 3:1 ratio.
This doesn't look like it's just space used up as root...

Aaron

On Mon, Feb 22, 2010 at 4:45 AM, Michael Stone <mst...@debian.org> wrote:

> On Sun, Feb 21, 2010 at 08:47:14PM -0800, Aaron Barany wrote:
>
>> I have an external HDD set up as a backup drive, where the backups are
>> stored using hard links. (based off rsync) This appears to cause a
>> discrepency with the reported available space. Here is the output for the
>> command "df -h" for the drive in question:
>> Filesystem            Size  Used Avail Use% Mounted on
>> /dev/sda1             688G   19G  635G   3% /media/Backup
>> There are currently 3 snapshots of my backup, so it appears that the
>> available size is being calculated from all 3 copies of the hard links. This
>> also appears to affect other utilities, such as the used space chart for the
>> drive in the properties window in GNOME which shows 53.6 GB used, though in
>> the Contents section it says that 18.3 GB are used.
>>
>
> What filesystem? You probably have some space reserved for root, which
> doesn't not normally show up in the "avail" column. (It won't be there when
> the disk is completely empty, even. Depending on the filesystem, the inodes
> used by the hard links may be dynamically allocated, which will consume
> space which may not appear in the "used" column. At any rate, df simply
> reports data from the kernel and is not the source of these numbers. I would
> say at this point that you're seeing normal behavior.
>
> Mike Stone
>

Reply via email to