Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Please improve the following message "No space left on the device" #624

Closed
elMor3no opened this issue Sep 29, 2021 · 3 comments · Fixed by #714
Closed

[BUG] Please improve the following message "No space left on the device" #624

elMor3no opened this issue Sep 29, 2021 · 3 comments · Fixed by #714
Labels

Comments

@elMor3no
Copy link
Contributor

Hello,

I am helping to package rdiff-backup for Debian. Reviewing the reported bugs I found this request from a user.

Package: rdiff-backup
Version: 1.2.1-1
Severity: normal

Hi,

my system has 1 Gig of /tmp, and rdiff-backup happily fills that up
and then fails. To make things worse, it fails with a generic "No
space left on device" error and frees up /tmp again before dumping me
back to my shell, leaving absolutely no trace that it wasn't the
backup destination (which has a couple of hundred gig still free) that
was full.

It should _AT LEAST_ say that it was /tmp with no space left.
Preferably, it would not dump gigabytes of work data in /tmp - heck,
who has a /tmp this large?

Greetings
Marc

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26.5-scyw00225 (PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages rdiff-backup depends on:
ii  libc6                         2.7-13     GNU C Library: Shared libraries
ii  librsync1                     0.9.7-5    rsync remote-delta algorithm libra
ii  python                        2.5.2-2    An interactive high-level object-o
ii  python-support                0.8.6      automated rebuilding support for P

Versions of packages rdiff-backup recommends:
pn  python-pylibacl               <none>     (no description available)
pn  python-pyxattr                <none>     (no description available)

rdiff-backup suggests no packages.

-- no debconf information

As the request implies changes in the operation of the project, I decided to report the request here.

You can find more details in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500399

@elMor3no elMor3no changed the title [BUG] [BUG] Please improve the following message "No space left on the device" Sep 29, 2021
@ericzolf
Copy link
Member

ericzolf commented Oct 1, 2021

That's for a shit old version. Do you know if it's still the case?

@ericzolf ericzolf added the need review check if the bug is still valid label Oct 21, 2021
@elMor3no
Copy link
Contributor Author

Sadly I dont get any reply from the original of this threat https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500399
Probably this error dont exist in recent version...

@ericzolf
Copy link
Member

OK, I could reproduce the issue. It happens at least when you do a restore from a past increment, the diff is done in the temporary directory, and can fail if it's too small.

rdiff-backup --tempdir /mnt --remote-tempdir /mnt --api 201 --force restore --at 2B /tmp/bak /tmp/to
WARNING: Target path /tmp/to exists and isn't empty, content might be force
         overwritten by restore
WARNING: Repository is locked by file /tmp/bak/rdiff-backup-data/lock.yml,
         another action is probably on-going. Enforcing anyway at your own risk
NOTE:    Extended attributes not supported by filesystem at path
         /tmp/to/rdiff-backup.tmp.0 due to exception '[Errno 95] Operation not
         supported'
NOTE:    Starting restore operation from source path /tmp/bak to destination
         path /tmp/to
WARNING: Exception '[Errno 28] No space left on device' raised of class '<class 'OSError'>':
  File "/home/ericl/Comp/rdiff-backup/build/lib.linux-x86_64-3.10/rdiff_backup/robust.py", line 94, in check_common_error
    return function(*args)
  File "/home/ericl/Comp/rdiff-backup/build/lib.linux-x86_64-3.10/rdiffbackup/locations/_repo_shadow.py", line 1910, in get_fp
    current_fp = self._get_first_fp()
  File "/home/ericl/Comp/rdiff-backup/build/lib.linux-x86_64-3.10/rdiffbackup/locations/_repo_shadow.py", line 2025, in _get_first_fp
    rpath.copyfileobj(fp, current_fp)
  File "/home/ericl/Comp/rdiff-backup/build/lib.linux-x86_64-3.10/rdiff_backup/rpath.py", line 1546, in copyfileobj
    outputfp.write(inbuf)

ERROR:   Could not complete restore due to exception '[Errno 28] No space left
         on device'
ERROR:   Action restore failed on step run

@ericzolf ericzolf added bug and removed need review check if the bug is still valid labels Aug 23, 2022
ericzolf added a commit that referenced this issue Aug 24, 2022
FIX: add message about temporary directory to no space left on device, this impacts only cases where tempdir isn't explicitly set, closes #624

When the tempdir is explicitly set, there are much more places where it is used, and the location information isn't carried by the exception so that it would be very difficult to find out this information.
Added accordingly a note to the manpage.
ericzolf added a commit that referenced this issue Aug 24, 2022
FIX: add message about temporary directory to no space left on device, this impacts only cases where tempdir isn't explicitly set, closes #624

When the tempdir is explicitly set, there are much more places where it is used, and the location information isn't carried by the exception so that it would be very difficult to find out this information.
Added accordingly a note to the manpage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants