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)
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')
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')
def remove(self, devices): misc.wipefs(devices, CRYPT_SIGNATURES)