Merge "Ensure device node exists before wiping during volume deletion"
This commit is contained in:
commit
00251c0e16
@ -147,9 +147,9 @@ class VolumeDriver(object):
|
||||
"""Deletes a logical volume."""
|
||||
# zero out old volumes to prevent data leaking between users
|
||||
# TODO(ja): reclaiming space should be done lazy and low priority
|
||||
self._copy_volume('/dev/zero', self.local_path(volume), size_in_g)
|
||||
dev_path = self.local_path(volume)
|
||||
if os.path.exists(dev_path):
|
||||
self._copy_volume('/dev/zero', dev_path, size_in_g)
|
||||
self._try_execute('dmsetup', 'remove', '-f', dev_path,
|
||||
run_as_root=True)
|
||||
self._try_execute('lvremove', '-f', "%s/%s" %
|
||||
|
Loading…
x
Reference in New Issue
Block a user