From: Anand Jain <[email protected]>
Signed-off-by: Anand Jain <[email protected]> --- plugins/fs-snapshot/fs-snapshot.py | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/fs-snapshot/fs-snapshot.py b/plugins/fs-snapshot/fs-snapshot.py index ef4afe8..6dd2231 100644 --- a/plugins/fs-snapshot/fs-snapshot.py +++ b/plugins/fs-snapshot/fs-snapshot.py @@ -192,9 +192,8 @@ def _create_btrfs_snapshot(conduit, snapshot_tag, volume): """ Runs the commands necessary for a snapshot. Basically its just - btrfsctl -c /dir/to/snapshot #this syncs the fs - btrfsctl -s /dir/to/snapshot/${snapshot_tag} - /dir/to/snapshot + btrfs filesystem sync /dir/to/snapshot #this syncs the fs + btrfs subvol snapshot /dir/to/snapshot /dir/to/snapshot/${snapshot_tag} and then we're done. """ @@ -206,11 +205,12 @@ def _create_btrfs_snapshot(conduit, snapshot_tag, volume): snapname = mntpnt + snapshot_tag conduit.info(1, "fs-snapshot: snapshotting " + mntpnt + ": " + snapname) - p = Popen(["/sbin/btrfsctl", "-c", mntpnt], stdout=PIPE, stderr=PIPE) + p = Popen(["/sbin/btrfs", "filesystem", "sync", mntpnt], stdout=PIPE, stderr=PIPE) err = p.wait() if err: return 1 - p = Popen(["/sbin/btrfsctl", "-s", snapname, mntpnt], stdout=PIPE, stderr=PIPE) + p = Popen(["/sbin/btrfs", "subvol", "snapshot", mntpnt, snapname], + stdout=PIPE, stderr=PIPE) err = p.wait() if err: return 1 -- 1.7.7 _______________________________________________ Yum-devel mailing list [email protected] http://lists.baseurl.org/mailman/listinfo/yum-devel
