コード例 #1
0
ファイル: driver.go プロジェクト: wxdublin/pachyderm
func execSubvolumeSnapshot(src string, dest string, readOnly bool) (retErr error) {
	defer func() {
		protolog.Info(&SubvolumeSnapshot{src, dest, readOnly, errorToString(retErr)})
	}()
	if readOnly {
		return executil.Run("btrfs", "subvolume", "snapshot", "-r", src, dest)
	}
	return executil.Run("btrfs", "subvolume", "snapshot", src, dest)
}
コード例 #2
0
ファイル: driver.go プロジェクト: wxdublin/pachyderm
func execSubvolumeExists(path string) (result bool) {
	defer func() {
		protolog.Debug(&SubvolumeExists{path, result})
	}()
	if err := executil.Run("btrfs", "subvolume", "show", path); err != nil {
		return false
	}
	return true
}
コード例 #3
0
ファイル: driver.go プロジェクト: wxdublin/pachyderm
func execSubvolumeDelete(path string) (retErr error) {
	defer func() {
		protolog.Debug(&SubvolumeDelete{path, errorToString(retErr)})
	}()
	return executil.Run("btrfs", "subvolume", "delete", path)
}