Ejemplo n.º 1
0
 def remove(self, dm):
     vol = self[dm]
     if 'mount' in vol:
         if self.problem.check(self.problem.FS_MOUNTED,
                               [vol['dev_name'], vol['mount']]):
             misc.do_umount(vol['mount'])
     command = ['remove', dm]
     self.run_cryptsetup(command)
     misc.wipefs(vol['crypt_device'], CRYPT_SIGNATURES)
Ejemplo n.º 2
0
 def _remove_filesystem(self, name):
     if 'mount' in self._vol[name]:
         if self.problem.check(self.problem.FS_MOUNTED,
                               [name, self._vol[name]['mount']]):
             misc.do_umount(self._vol[name]['mount'])
     for dev in self._dev.itervalues():
         if dev['pool_name'] != name:
             continue
         misc.wipefs(dev['dev_name'], 'btrfs')
Ejemplo n.º 3
0
 def _remove_filesystem(self, name):
     if 'mount' in self._vol[name]:
         if self.problem.check(self.problem.FS_MOUNTED,
                               [name, self._vol[name]['mount']]):
             misc.do_umount(self._vol[name]['real_dev'], all_targets=True)
     devices = []
     for dev in self._dev.values():
         if dev['pool_name'] != name:
             continue
         devices.append(dev['dev_name'])
     if len(devices) > 0:
         misc.wipefs(devices, 'btrfs')
Ejemplo n.º 4
0
 def remove(self, devices):
     misc.wipefs(devices, CRYPT_SIGNATURES)