Hi everyone,
I am trying to use an rsync script to backup my home directory to an
external drive, and it quits in the middle of the sync and says the
disk is full.
I also get the following when I run du on the drive:
linux-o3ef:/mnt/homemnt/george # df -h /mnt/homemnt/george/
Filesystem Size Used Avail Use% Mounted on
/dev/sdb7 337G 325G 0 100% /mnt/homemnt
/CODE/
If I do it without the human readable option, it looks like this:
linux-o3ef:/home/george # df /mnt/homemnt/george/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb7 352961636 339982716 0 100% /mnt/homemnt
So my question is, if the size is 337G and the used is 325G, doesn't
that mean there should be 12G still available? The size of the data in
the drive I am copying is only 328G, as you can see below.
linux-o3ef:/home/george # du -h -d 0
328G .
What am I missing here? I ran badblocks and e2fsck on the external
drive and did not find any errors.
--
G.O.
Box #1: 12.2 | KDE 4.9.2 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.1 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.2 | KDE 4.9.2 | Core i7-2620M | 64 | 8GB
learning openSUSE and loving it
What does df show for that drive?
–
PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server
Am 05.11.2012 01:59, schrieb Martin Helm:
> What does df show for that drive?
>
To be more explicit, from what I see du sums up the exact byte size of
files for the given directory, this is not the size the files need on
the file system (a file of let’s say size 58 bytes takes more space on
the file system to be stored than 58 bytes).
So the if the sum of file sizes is less than the size of the file system
does not mean that space is left).
df should not suffer from that restriction but shows the used space instead.
–
PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server
It is actually typical of unix file systems, that some space is reserved. This is to allow disk space to be allocated to files in a way that minimizes fragmentation. Your “df” command does show the disk at 100% full. With some file systems you can fill it to around 104%, providing that this is done by root. A non-root user cannot go over 100%.
I’m not sure whether linux file systems allow going over 100% by root.
On 11/04/2012 07:06 PM, Martin Helm wrote:
> Am 05.11.2012 01:59, schrieb Martin Helm:
>> What does df show for that drive?
>>
> To be more explicit, from what I see du sums up the exact byte size of
> files for the given directory, this is not the size the files need on
> the file system (a file of let’s say size 58 bytes takes more space on
> the file system to be stored than 58 bytes).
> So the if the sum of file sizes is less than the size of the file system
> does not mean that space is left).
>
> df should not suffer from that restriction but shows the used space instead.
By default, an ext{2,3,4} file system has a certain percentage of any file
system reserved for privileged operations. That way, the system can boot even
though the unreserved portion is full. Se see haw much is reserved, use
‘sudo tune2fs -l /dev/sdb7’
See ‘man tune2fs’ to change the number of reserved blocks. For a disk used only
for backup, zero would be appropriate.
Martin Helm wrote:
> Am 05.11.2012 01:59, schrieb Martin Helm:
>> What does df show for that drive?
>>
> To be more explicit, from what I see du sums up the exact byte size
of
> files for the given directory, this is not the size the files need on
> the file system (a file of let’s say size 58 bytes takes more space
on
> the file system to be stored than 58 bytes).
> So the if the sum of file sizes is less than the size of the file
system
> does not mean that space is left).
>
> df should not suffer from that restriction but shows the used space
> instead.
>
Thanks for your help. Here is df for that drive:
linux-o3ef:/mnt/homemnt # df -h /mnt/homemnt/
Filesystem Size Used Avail Use% Mounted on
/dev/sdb7 337G 325G 0 100% /mnt/homemnt
–
G.O.
Box #1: 12.2 | KDE 4.9.2 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 12.2 | KDE 4.9.1 | AMD Athlon X3 | 64 | 4GB
Laptop: 12.2 | KDE 4.9.2 | Core i7-2620M | 64 | 8GB
learning openSUSE and loving it
Am 05.11.2012 02:41, schrieb golson765:
> linux-o3ef:/mnt/homemnt # df -h /mnt/homemnt/ Filesystem Size
> Used Avail Use% Mounted on /dev/sdb7 337G 325G 0 100%
> /mnt/homemnt
Hm, I expected a significant difference (on my own backup drive the
difference is usually around 1-2%, which is several GB).
I think Larry is right that the missing space may be what is allocated
by the reserved blocks.
–
PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server