It seems as though there might be use for a flag to allow
using more of the disk somehow, or to tar up existing files
rather than copying them.  I assume in most cases the user
can make that decision themselves by manually removing
older files or other things on the FS.

  -Reid


On Tue, Sep 24, 2013 at 10:57 AM, Ben Pfaff <b...@nicira.com> wrote:

> On Tue, Sep 24, 2013 at 10:46:59AM -0700, Shih-Hao Li wrote:
> > > It might be worth documenting how to avoid the cap if the user really
> > > wants to (it looks like outputting to a fd instead of a file avoids
> > > it?).
> >
> > How about adding a new parameter, such as the percentage of free disk
> > space allowed to use?  If it is 0, then no check. By default, always
> > check and use 90 regardless output_fd or output_file cases.
>
> OK.
>
> > > > +def get_free_disk_space(path):
> > > > + path = os.path.abspath(path)
> > > > + while not os.path.ismount(path):
> > > > + path = os.path.dirname(path)
> > > > + s = os.statvfs(path)
> > > > + return s.f_frsize * s.f_bfree
> >
> > > What is the reason for chaining up to a mount point? All the
> > > documentation I see says that statvfs returns information about the
> file
> > > system containing the provided path and doesn't mention special
> > > importance of mount points
> > I actually borrowed the code from another NVP script.
> > I think ismount may not do much here, but it does help tracking down to
> a valid path
> > because we haven't created the tar file at this time.
>
> OK, the 'dirname' makes sense then.  I still don't think the ismount
> chain is necessary.
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to