LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   Strange "no space available" message using btrfs on Fedora 19 (http://www.linuxquestions.org/questions/fedora-35/strange-no-space-available-message-using-btrfs-on-fedora-19-a-4175466944/)

PTrenholme 06-21-2013 07:49 PM

Strange "no space available" message using btrfs on Fedora 19
 
Before posting this to the Fedora bugzilla, I thought I should ask if I'm missing something. :scratch:

I was trying to set up rsnapshot to do a full backup of my F19 installation to a Passport 1.5Tb USB drive. Here are the settings I was using:
Code:

$ sudo grep -vE '(^[[:space:]]*$)|(^[[:space:]]*#)' /etc/rsnapshot.conf
config_version  1.2
snapshot_root  /Passport/rsnapshots/
cmd_cp          /usr/bin/cp
cmd_rm          /usr/bin/rm
cmd_rsync      /usr/bin/rsync
cmd_logger      /usr/bin/logger
cmd_du          /usr/bin/du
cmd_rsnapshot_diff      /usr/bin/rsnapshot-diff
interval        hourly  6
interval        daily  7
interval        weekly  4
interval        monthly 3
verbose        2
loglevel        3
logfile /var/log/rsnapshot
lockfile        /var/run/rsnapshot.pid
rsync_short_args        -aAHX
rsync_long_args        --delete --numeric-ids --relative --delete-excluded
du_args        -csh
one_fs          1
exclude        /proc/
exclude        /tmp/
exclude        /home/*/tmp/
exclude        /dev/
exclude        /var/run/
exclude        /[[:upper:]]*/
link_dest      1
use_lazy_deletes        1
backup  /              localhost/Passport/rsnapshots/

When I ran sudo rsnapshot -V hourly I got this in the log file:
Code:

$ grep '16:42' /var/log/rsnapshot
[21/Jun/2013:16:42:26] /bin/rsnapshot -V hourly: started
[21/Jun/2013:16:42:26] echo 30899 > /var/run/rsnapshot.pid
[21/Jun/2013:16:42:26] mv /Passport/rsnapshots/hourly.0/ /Passport/rsnapshots/hourly.1/
[21/Jun/2013:16:42:26] /bin/rsnapshot -V hourly: ERROR: Could not rename("/Passport/rsnapshots/hourly.0", "/Passport/rsnapshots/hourly.1")
[21/Jun/2013:16:42:26] /bin/rsnapshot -V hourly: ERROR: Error! safe_rename("/Passport/rsnapshots/hourly.0/", "/Passport/rsnapshots/hourly.1/")
[21/Jun/2013:16:42:26] /usr/bin/logger -i -p user.err -t rsnapshot /bin/rsnapshot -V hourly: ERROR: Error! safe_rename("/Passport/rsnapshots/hourly.0/", "/Passport/rsnapshots/hourly.1/")
[21/Jun/2013:16:42:26] rm -f /var/run/rsnapshot.pid

So I tried to see what happened to the Passport drive:
Code:

$ sudo mv /Passport/rsnapshots/hourly.0/ /Passport/rsnapshots/hourly.1/
mv: cannot move ‘/Passport/rsnapshots/hourly.0/’ to ‘/Passport/rsnapshots/hourly.1/’: No space left on device
$ sudo umount /Passport
$ sudo btrfsck /dev/sdd1
Checking filesystem on /dev/sdd1
UUID: 926e48e5-dc5f-4b6b-a137-918474444271
checking extents
checking fs roots
checking root refs
found 368033935360 bytes used err is 0
total csum bytes: 357478568
total tree bytes: 1610190848
total fs tree bytes: 1075429376
btree space waste bytes: 377697383
file data blocks allocated: 366423744512
 referenced 367877095424
Btrfs v0.20-rc1
$ sudo mount /Passport
$ df -h /Passport
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd1      1.4T  345G  1.1T  25% /Passport
$ df -h /Passport/rsnapshots/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd1      1.4T  345G  1.1T  25% /Passport
$ sudo df -h /Passport/rsnapshots/hourly.0/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd1      1.4T  345G  1.1T  25% /Passport
$ sudo du -csh /Passport/rsnapshots/hourly.0/
59G    /Passport/rsnapshots/hourly.0/
59G    total

So, does anyone have have any clue why the mv command (which is only renaming the directory) "thinks" that it's going to run out of space whilst doing the move? :scratch: Even if a full copy of the 59Gb directory were to be made (which should not be done), there is, apparently, 1.1 Tb free on the drive.

syg00 06-21-2013 08:37 PM

Space (free or otherwise) in btrfs ain't necessarily what you might think. This article has been around for a while.

BTW, there is also an article off the main page for (native) efficient incremental backups - faster than rsync allegedly.

PTrenholme 06-23-2013 09:48 PM

OK, thanks. :)

I tried all the suggestions in the Q&A section, and none of then could be made to work.

I "solved" the problem by deleting the partition table and just using mkfs.btrfs to recreate the whole thing with subvolumes. Now I'm playing with seeing if I can mirror the stuff I want to backup onto the correct subvolume. (This may not be easy, since - for some reason I haven't yet found - "profiles" can only be specified by device. . .)

Anyhow, I'll mark this "solved" for now.


All times are GMT -5. The time now is 10:45 PM.