samba-bugs at samba.org
2010-Dec-24  01:16 UTC
DO NOT REPLY [Bug 7885] New: rsync fills the disk blocking the system
https://bugzilla.samba.org/show_bug.cgi?id=7885
           Summary: rsync fills the disk blocking the system
           Product: rsync
           Version: 3.1.0
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: giampaolo.ferradini at gmail.com
         QAContact: rsync-qa at samba.org
in a situation where rsync was instructed to sync a home directory tree with a
second hard drive normally mounted in /media, the command executed even if no
such drive was mounted and filled the main drive completely, preventing the
system from booting.
i would like to draw a few issues to attention:
- rsync should have a check that prevents it from making the disk unusable,
i.e. from filling it to the point of disrupting the boot process;
- i would recommend a "check space required" and confirmation request
in case
space is not sufficient to complete the task;
- in case a /media folder is involved, i would suggest a confirmation request
in case there is no volume currently mounted, to prevent rsync from creating
undesired directories.
kindest regards
(error seen under fedora 14)
-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2011-Jan-01  20:03 UTC
DO NOT REPLY [Bug 7885] rsync fills the disk blocking the system
https://bugzilla.samba.org/show_bug.cgi?id=7885
wayned at samba.org changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |normal
             Status|NEW                         |ASSIGNED
------- Comment #1 from wayned at samba.org  2011-01-01 14:03 CST -------
Assigning special meaning to /media differs by OS, and is not something that
rsync should handle.  A backup script that is going to use rsync should
definitely check if the path it is going to use is properly mounted first.
Not overflowing a destination disk is a difficult problem to handle in an
efficient manner, since (1) we don't know how much space we need when we
start,
(2) other processes could be using space during our run, making an initial
check inaccurate, (3) block sizes inefficiencies and directory-space
requirements are hard to compute, and (4) the destination tree may be split
over multiple volumes.  One potential solution might be to have a command-line
option that would tell rsync to check specific mount points at specific
intervals and exit if below a given percent.  However, such a check idiom might
be better written as a helper script that could be used to run rsync, regularly
check the destination filesystems via df, and kill rsync should space
requirements diminish below desired levels.  If someone would like to write
such a helper script, I'd be glad to include it in the contrib directory.
-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
samba-bugs at samba.org
2011-Mar-08  07:48 UTC
[Bug 7885] rsync fills the disk blocking the system
https://bugzilla.samba.org/show_bug.cgi?id=7885
giampaolo ferradini <giampaolo.ferradini at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |WONTFIX
--- Comment #2 from giampaolo ferradini <giampaolo.ferradini at gmail.com>
2011-03-08 07:48:01 UTC ---
(In reply to comment #1)> Assigning special meaning to /media differs by OS, and is not something
that
> rsync should handle.  A backup script that is going to use rsync should
> definitely check if the path it is going to use is properly mounted first.
> 
> Not overflowing a destination disk is a difficult problem to handle in an
> efficient manner, since (1) we don't know how much space we need when
we start,
> (2) other processes could be using space during our run, making an initial
> check inaccurate, (3) block sizes inefficiencies and directory-space
> requirements are hard to compute, and (4) the destination tree may be split
> over multiple volumes.  One potential solution might be to have a
command-line
> option that would tell rsync to check specific mount points at specific
> intervals and exit if below a given percent.  However, such a check idiom
might
> be better written as a helper script that could be used to run rsync,
regularly
> check the destination filesystems via df, and kill rsync should space
> requirements diminish below desired levels.  If someone would like to write
> such a helper script, I'd be glad to include it in the contrib
directory.
thank you for your reply, and sorry for my late reply to it.
unfortunately i am definitely too unexperienced to write that kind of script.
but if you have examples or references for the single bits, i'd certainly be
willing to play with it.
-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.