mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Merge pull request #34 from myhro/fix-zerofree
zerofree is used against partitions, not devices
This commit is contained in:
commit
d7d6b82ce6
1 changed files with 4 additions and 4 deletions
|
@ -62,15 +62,15 @@ class AddRequiredCommands(Task):
|
||||||
|
|
||||||
|
|
||||||
class Zerofree(Task):
|
class Zerofree(Task):
|
||||||
description = 'Zeroing unused blocks on the volume'
|
description = 'Zeroing unused blocks on the root partition'
|
||||||
phase = phases.volume_unmounting
|
phase = phases.volume_unmounting
|
||||||
predecessors = [filesystem.UnmountRoot, partitioning.UnmapPartitions]
|
predecessors = [filesystem.UnmountRoot]
|
||||||
successors = [volume.Detach]
|
successors = [partitioning.UnmapPartitions, volume.Detach]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from common.tools import log_check_call
|
from common.tools import log_check_call
|
||||||
log_check_call(['zerofree', info.volume.device_path])
|
log_check_call(['zerofree', info.volume.partition_map.root.device_path])
|
||||||
|
|
||||||
|
|
||||||
class ShrinkVolume(Task):
|
class ShrinkVolume(Task):
|
||||||
|
|
Loading…
Add table
Reference in a new issue