Issues when volume is full
I've been using btrfs as a spool space on our back-up server to get familiar with it and things work fine until the volume fills up. Our backup software (bacula) usually spools until the volume is full, then despools and respools, etc. With btrfs, it fills up and bacula thinks there is still space so it keeps trying and then finally errors out. I thought this was a problem because I was using compression, but I've repeated the problem without compression. Doing some tests, this is what I've found:
lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk bs=3D1024000 dd: writing `junk': No space left on device 522163+0 records in 522162+0 records out 534693888000 bytes (535 GB) copied, 6026.85 s, 88.7 MB/s lsddomainsd:/spool# ls junk lsddomainsd:/spool# df -h =46ilesystem=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Size=A0 Used Avail Use% M= ounted on /dev/mapper/lsddomain-root =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 6.5G=A0= 3.5G=A0 2.7G=A0 58% / tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0=A0=A0=A0 = 0=A0 2.0G=A0=A0 0% /lib/init/rw udev=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 10M=A0 172K=A0= 9.9M=A0=A0 2% /dev tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0=A0=A0=A0 = 0=A0 2.0G=A0=A0 0% /dev/shm /dev/sda1=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 228M=A0=A0 92M=A0 124M=A0= 43% /boot /dev/mapper/lsddomain-home =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 4.6G=A0= 138M=A0 4.5G=A0=A0 3% /home 192.168.58.2:/backup/bacula =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.5T=A0= 996G=A0 1.5T=A0 40% /backup /dev/mapper/spool=A0=A0=A0=A0 500G=A0 499G=A0 1.6G 100% /spool lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk2 bs=3D1024000 dd: writing `junk2': No space left on device 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.0704083 s, 0.0 kB/s lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk3 bs=3D1024000 dd: writing `junk3': No space left on device 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.108706 s, 0.0 kB/s lsddomainsd:/spool# ls -lh total 498G -rw-r--r-- 1 root root 498G 2010-03-04 09:54 junk -rw-r--r-- 1 root root=A0=A0=A0 0 2010-03-04 13:45 junk2 -rw-r--r-- 1 root root=A0=A0=A0 0 2010-03-04 13:45 junk3 lsddomainsd:/spool#
So even though the volume is full it shows space left. Is this supposed to happen? I don't remember seeing any space left on other file systems and I've filled quite a few.
Thanks,
Robert LeBlanc
Life Sciences & Undergraduate Education Computer Support Brigham Young University
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Robert LeBlanc
I've been using btrfs as a spool space on our back-up server to get familiar with it and things work fine until the volume fills up. Our backup software (bacula) usually spools until the volume is full, the=
n
Quoted 2 lines
despools and respools, etc. With btrfs, it fills up and bacula thinks there is still space so it keeps trying and then finally errors out. =
I
Quoted 4 lines
thought this was a problem because I was using compression, but I've repeated the problem without compression. Doing some tests, this is what I've found:
=20
Quoted 9 lines
lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk bs=3D1024000 dd: writing `junk': No space left on device 522163+0 records in 522162+0 records out 534693888000 bytes (535 GB) copied, 6026.85 s, 88.7 MB/s lsddomainsd:/spool# ls junk lsddomainsd:/spool# df -h Filesystem=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Size=A0 Used Avail Use% M=
ounted on
Quoted 2 lines
/dev/mapper/lsddomain-root=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 6.5G=A0=
3.5G=A0 2.7G=A0 58% /
Quoted 1 line
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0=A0=A0=A0=
0=A0 2.0G=A0=A0 0% /lib/init/rw
Quoted 1 line
udev=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 10M=A0 172=
K=A0 9.9M=A0=A0 2% /dev
Quoted 1 line
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0=A0=A0=A0=
0=A0 2.0G=A0=A0 0% /dev/shm
Quoted 1 line
/dev/sda1=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 228M=A0=A0 92M=A0 124M=A0=
43% /boot
Quoted 2 lines
/dev/mapper/lsddomain-home=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 4.6G=A0=
138M=A0 4.5G=A0=A0 3% /home
Quoted 2 lines
192.168.58.2:/backup/bacula =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.5T=A0=
996G=A0 1.5T=A0 40% /backup
Quoted 16 lines
/dev/mapper/spool=A0=A0=A0=A0 500G=A0 499G=A0 1.6G 100% /spool
lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk2 bs=3D1024000 dd: writing `junk2': No space left on device 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.0704083 s, 0.0 kB/s lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk3 bs=3D1024000 dd: writing `junk3': No space left on device 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.108706 s, 0.0 kB/s lsddomainsd:/spool# ls -lh total 498G(quoted diff) +0
-3-rw-r--r-- 1 root root 498G 2010-03-04 09:54 junk -rw-r--r-- 1 root root=A0=A0=A0 0 2010-03-04 13:45 junk2 -rw-r--r-- 1 root root=A0=A0=A0 0 2010-03-04 13:45 junk3
Quoted 6 lines
lsddomainsd:/spool#
=20
So even though the volume is full it shows space left. Is this supposed to happen? I don't remember seeing any space left on other file systems and I've filled quite a few.
=20
Yeah this is an unfortunate side-affect of how we currently do df. We = plan on
changing it, but currently it just shows data used in the used column, = so the
1.6G will be whats been reserved for metadata space. IIRC the consensu= s was to
count the used amount from all spaces, and then just add the free unall= ocated
space to that, but it will still likely end up with "Avail" having what=
is free
for metadata space, but not actually able to be used as data. Thanks,
Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Josef Bacik
Quoted 3 lines · Robert LeBlanc
I've been using btrfs as a spool space on our back-up server to get familiar with it and things work fine until the volume fills up. Our backup software (bacula) usually spools until the volume is full, th=
en
Quoted 1 line
Quoted 1 line
despools and respools, etc. With btrfs, it fills up and bacula think=
s
Quoted 1 line
Quoted 1 line
there is still space so it keeps trying and then finally errors out.=
I
Quoted 4 lines
Quoted 4 lines
thought this was a problem because I was using compression, but I've repeated the problem without compression. Doing some tests, this is what I've found:
Quoted 9 lines
Quoted 9 lines
lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk bs=3D1024000 dd: writing `junk': No space left on device 522163+0 records in 522162+0 records out 534693888000 bytes (535 GB) copied, 6026.85 s, 88.7 MB/s lsddomainsd:/spool# ls junk lsddomainsd:/spool# df -h Filesystem=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Size=A0 Used Avail Use% =
Mounted on
Quoted 2 lines
Quoted 2 lines
/dev/mapper/lsddomain-root=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 6.5G=
=A0 3.5G=A0 2.7G=A0 58% /
Quoted 1 line
Quoted 1 line
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0=A0=A0=A0=
0=A0 2.0G=A0=A0 0% /lib/init/rw
Quoted 1 line
Quoted 1 line
udev=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 10M=A0 17=
2K=A0 9.9M=A0=A0 2% /dev
Quoted 1 line
Quoted 1 line
tmpfs=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.0G=A0=A0=A0=A0=
0=A0 2.0G=A0=A0 0% /dev/shm
Quoted 1 line
Quoted 1 line
/dev/sda1=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 228M=A0=A0 92M=A0 124M=
=A0 43% /boot
Quoted 2 lines
Quoted 2 lines
/dev/mapper/lsddomain-home=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 4.6G=
=A0 138M=A0 4.5G=A0=A0 3% /home
Quoted 2 lines
Quoted 2 lines
192.168.58.2:/backup/bacula =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2.5T=
=A0 996G=A0 1.5T=A0 40% /backup
Quoted 18 lines
Quoted 18 lines
/dev/mapper/spool=A0=A0=A0=A0 500G=A0 499G=A0 1.6G 100% /spool
lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk2 bs=3D1024000 dd: writing `junk2': No space left on device 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.0704083 s, 0.0 kB/s lsddomainsd:/spool# dd if=3D/dev/zero of=3Djunk3 bs=3D1024000 dd: writing `junk3': No space left on device 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.108706 s, 0.0 kB/s lsddomainsd:/spool# ls -lh total 498G(quoted diff) +0
-3-rw-r--r-- 1 root root 498G 2010-03-04 09:54 junk -rw-r--r-- 1 root root=A0=A0=A0 0 2010-03-04 13:45 junk2 -rw-r--r-- 1 root root=A0=A0=A0 0 2010-03-04 13:45 junk3lsddomainsd:/spool#
Quoted 6 lines
Quoted 4 lines
So even though the volume is full it shows space left. Is this supposed to happen? I don't remember seeing any space left on other file systems and I've filled quite a few.
Yeah this is an unfortunate side-affect of how we currently do df. =A0=
We plan on
Quoted 1 line
changing it, but currently it just shows data used in the used column=
, so the
Quoted 1 line
1.6G will be whats been reserved for metadata space. =A0IIRC the cons=
ensus was to
Quoted 1 line
count the used amount from all spaces, and then just add the free una=
llocated
Quoted 1 line
space to that, but it will still likely end up with "Avail" having wh=
at is free
Quoted 1 line
for metadata space, but not actually able to be used as data. =A0Than=
ks,
Quoted 3 lines
Josef
So is it possible to prevent the creation of metadata if there is no data blocks left. I wonder if that would solve this issue. Maybe if Bacula sees it can't write a file at all, it then goes into despooling. I wonder if other programs (cp, rsync, etc) will run into the same problem when the volume is full. I know it's a corner case, so I'm not going to press the issue when btrfs is not close to stable. Just an issue I came across and thought I'd get some additional info about.
Robert LeBlanc
Life Sciences & Undergraduate Education Computer Support Brigham Young University
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Df [Was: Re: Issues when volume is full]
In reply to Josef BacikQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"J" == Josef Bacik <[email protected]> writes:
J> Yeah this is an unfortunate side-affect of how we currently do df.
Speaking of that, it would be cool were df -i to be enabled. Fs's like xfs, AIUI, which have fully dynamic inode allocation just use the number of blocks as the max possible number of inodes. Reporting that and iused would be helpful.
-JimC
Signature · 1 line
James Cloos <[email protected]> OpenPGP: 1024D/ED7DAEA6