I mounted one of the 1TB external drives that I use for backup and the
bar at the bottom of the Dolphin window said that there was 113 GiB
free space available. As I’d recently had an odd complaint when
backing-up that there was insufficient space available when there
should have been twice what was needed, I decided to check the
properties. When this finished, it said the size was 791.6GiB
(849,998,069,273). However, “device usage” said that there was 69.4GiB
free of 916.8GiB (93% used).
Now it’s over fifty years since I went to school but it still struck me
that 916.8-791.6 didn’t look too close to 69.4. At 125.2, it’s not 113
either but it’s a lot closer. Oddly enough, 916.8-845 is 71.8 which is
not far from the figure of 69.4.
From the above calculations, it seems to me that the free space
available in “device usage” has been calculated by subtracting the used
space in GB from the total space in GiB.
This apparent miscalculation could be enough to explain why my backup
failed for alleged insufficient space if that copying process was also
using the wrong, smaller value for available space.
I’ve checked Bugzilla but can’t find any report on this - which, of
course, means absolutely nothing - so have I made a miscalculation
myself or is there really a bug in Dolphin?
–
Graham P Davis, Bracknell, Berks.
openSUSE 13.1 (64-bit); KDE 4.12.3; AMD Phenom II X2 550 Processor;
Kernel: 3.11.10; Video: nVidia GeForce 210 (using nVidia driver);
Sound: ATI SBx00 Azalia (Intel HDA)
On 2014-03-12, Graham P Davis <cloddy@no-mx.forums.opensuse.org> wrote:
> I mounted one of the 1TB external drives that I use for backup and the
> bar at the bottom of the Dolphin window said that there was 113 GiB
> free space available. As I’d recently had an odd complaint when
> backing-up that there was insufficient space available when there
> should have been twice what was needed, I decided to check the
> properties. When this finished, it said the size was 791.6GiB
> (849,998,069,273). However, “device usage” said that there was 69.4GiB
> free of 916.8GiB (93% used).
Let’s first see if bash agrees with this percentage. With your 1TB drive mounted, please open up a console and paste the
results of…
sh-4.2$ df -h
… inside code tags iconified by octothorpes (#) in the forum toolbar.
I’m not quite sure how Dolphin works but do believe it reserves place for planned operations, i.e. an active torrent download will be considered downloaded by Dolphin.
~> sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdf1 917G 801G 70G 93% /run/media/graham/bkpext
~> sudo df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sdf1 985G 860G 75G 93% /run/media/graham/bkpext
~> sudo df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdf1 961301832 839695600 72751808 93% /run/media/graham/bkpext
At first glance, it seems that “Avail” is not the straight difference between “used” and “size”. This value agrees with the “device usage” figure from “properties”. It did not agree with the value provided by Dolphin at the bottom of the window. However, I’ve now tried another “reload” and the figure has now changed from 113 to 69! This was at least the second and possibly the third “reload” I’ve performed since mounting the disk but the first to provide the correct(?) value. I need to try some more experiments with mounting and reloading etc., to try to see when and how the value changes.
By default ext4 reserves 5% of the space on a disk for the root user to avoid fragmentation. If you calculate free space as (917 * 0.95) - 801 = 70 or (985 * 0.95) - 860 = 75
I did not do the calculation on the exact GIB/GB amounts just the values shown and it is very close to the free space shown. So I beleive it is the “hidden” reserve that is throwing off the calculation.
You can use the utility “tune2fs” to adjust the reserved percentage.
>
> By default ext4 reserves 5% of the space on a disk for the root user
> to avoid fragmentation. If you calculate free space as (917 * 0.95) -
> 801 = 70 or (985 * 0.95) - 860 = 75
> I did not do the calculation on the exact GIB/GB amounts just the
> values shown and it is very close to the free space shown. So I
> beleive it is the “hidden” reserve that is throwing off the
> calculation.
>
> You can use the utility “tune2fs” to adjust the reserved percentage.
>
> Here is a page from the ArchLinux wiki were it is discussed:
> https://wiki.archlinux.org/index.php/ext4
>
>
Thanks for that info; I should have realised there would have been
some reserved space such as you describe.
I’ll be swapping drives again tomorrow - as long as I remember to do my
backup tonight - and will then check how long it takes Dolphin to
provide the correct space info.
–
Graham P Davis, Bracknell, Berks.
openSUSE 13.1 (64-bit); KDE 4.12.3; AMD Phenom II X2 550 Processor;
Kernel: 3.11.10; Video: nVidia GeForce 210 (using nVidia driver);
Sound: ATI SBx00 Azalia (Intel HDA)
> On Wed, 12 Mar 2014 20:16:01 GMT
> J Andrew <J_Andrew@no-mx.forums.opensuse.org> wrote:
>
> >
> > By default ext4 reserves 5% of the space on a disk for the root user
> > to avoid fragmentation. If you calculate free space as (917 * 0.95)
> > - 801 = 70 or (985 * 0.95) - 860 = 75
> > I did not do the calculation on the exact GIB/GB amounts just the
> > values shown and it is very close to the free space shown. So I
> > beleive it is the “hidden” reserve that is throwing off the
> > calculation.
> >
> > You can use the utility “tune2fs” to adjust the reserved percentage.
> >
> > Here is a page from the ArchLinux wiki were it is discussed:
> > https://wiki.archlinux.org/index.php/ext4
> >
> >
>
> Thanks for that info; I should have realised there would have been
> some reserved space such as you describe.
>
> I’ll be swapping drives again tomorrow - as long as I remember to do
> my backup tonight - and will then check how long it takes Dolphin to
> provide the correct space info.
>
Dolphin worked OK this time with the space agreeing with that from
“properties”. Seems like one of these problems that goes away when you
report it though I suspect it will come back to bite me when I’ve had
time to forget about it.
–
Graham P Davis, Bracknell, Berks.
openSUSE 13.1 (64-bit); KDE 4.12.3; AMD Phenom II X2 550 Processor;
Kernel: 3.11.10; Video: nVidia GeForce 210 (using nVidia driver);
Sound: ATI SBx00 Azalia (Intel HDA)