[tahoe-lafs-trac-stream] [tahoe-lafs] #1384: use storage/shares/ instead of storage/ to detect available space

tahoe-lafs trac at tahoe-lafs.org
Wed Mar 30 16:13:04 PDT 2011


#1384: use storage/shares/ instead of storage/ to detect available space
--------------------------------------------------------------------+-------
 Reporter:  zooko                                                   |           Owner:           
     Type:  defect                                                  |          Status:  new      
 Priority:  minor                                                   |       Milestone:  undecided
Component:  code-nodeadmin                                          |         Version:  1.8.2    
 Keywords:  usability configuration defaults storage review-needed  |   Launchpad Bug:           
--------------------------------------------------------------------+-------
 Gwern on IRC had this issue after they made their {{{storage/shares/}}} be
 a symlink to an external hard disk (on my suggestion). Once they reported
 the issue then I realized that many storage servers that I am running (for
 volunteergrid, among others) have this same issue.

 I think we should examine the partition which has {{{storage/shares/}}}
 instead of the one which has {{{storage/}}} when determining how much disk
 space is available.

 Here's a patch:
 {{{
 --- old-bothw/src/allmydata/storage/server.py   2011-03-30
 17:12:13.000000000 -0600
 +++ new-bothw/src/allmydata/storage/server.py   2011-03-30
 17:12:13.000000000 -0600
 @@ -192,7 +192,7 @@

          if self.readonly_storage:
              return 0
 -        return fileutil.get_available_space(self.storedir,
 self.reserved_space)
 +        return fileutil.get_available_space(self.sharedir,
 self.reserved_space)

      def allocated_size(self):
          space = 0
 }}}

 I can't think of a useful way to unit test this patch! So, I'm marking it
 as {{{review-needed}}}.

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1384>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list