Пример #1
0
 def __create_data_location(self):
     sh.create_loopback_file(fname=self.fs_image,
                             size=int(self.cfg.get('swift',
                                               'loopback_disk_size')),
                             fs_type='xfs')
     self.tracewriter.file_touched(self.fs_image)
     sh.mount_loopback_file(self.fs_image, self.fs_dev, 'xfs')
     sh.chown_r(self.fs_dev, sh.geteuid(), sh.getegid())
Пример #2
0
 def _create_data_location(self):
     loop_size = self.cfg.get('swift', 'loopback_disk_size')
     if not loop_size:
         loop_size = DEF_LOOP_SIZE
     else:
         loop_size = utils.to_bytes(loop_size)
     sh.create_loopback_file(fname=self.fs_image,
                             size=loop_size,
                             fs_type=FS_TYPE)
     self.tracewriter.file_touched(self.fs_image)
     sh.mount_loopback_file(self.fs_image, self.fs_dev, FS_TYPE)
     sh.chown_r(self.fs_dev, sh.geteuid(), sh.getegid())
Пример #3
0
 def _create_data_location(self):
     loop_size = self.cfg.get('swift', 'loopback_disk_size')
     if not loop_size:
         loop_size = DEF_LOOP_SIZE
     else:
         loop_size = utils.to_bytes(loop_size)
     sh.create_loopback_file(fname=self.fs_image,
                             size=loop_size,
                             fs_type=FS_TYPE)
     self.tracewriter.file_touched(self.fs_image)
     sh.mount_loopback_file(self.fs_image, self.fs_dev, FS_TYPE)
     sh.chown_r(self.fs_dev, sh.geteuid(), sh.getegid())