예제 #1
0
파일: driver.go 프로젝트: sr/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
파일: exec.go 프로젝트: plar/pachyderm
func execPropertySetReadonly(path string, readonly bool) error {
	readonlyString := "false"
	if readonly {
		readonlyString = "true"
	}
	return executil.Run("btrfs", "property", "set", path, "ro", readonlyString)
}
예제 #3
0
파일: driver.go 프로젝트: sr/pachyderm
func execSubvolumeExists(path string) (result bool) {
	defer func() {
		protolog.Info(&SubvolumeExists{path, result})
	}()
	if err := executil.Run("btrfs", "subvolume", "show", path); err != nil {
		return false
	}
	return true
}
예제 #4
0
파일: exec.go 프로젝트: plar/pachyderm
func execSubvolumeSnapshot(src string, dest string, readonly bool) error {
	if readonly {
		return executil.Run("btrfs", "subvolume", "snapshot", "-r", src, dest)
	}
	return executil.Run("btrfs", "subvolume", "snapshot", src, dest)
}
예제 #5
0
파일: exec.go 프로젝트: plar/pachyderm
func execSubvolumeCreate(path string) error {
	return executil.Run("btrfs", "subvolume", "create", path)
}
예제 #6
0
파일: btrfs.go 프로젝트: plar/pachyderm
func snapshot(volume string, dest string, readonly bool) error {
	if readonly {
		return executil.Run("btrfs", "subvolume", "snapshot", "-r", FilePath(volume), FilePath(dest))
	}
	return executil.Run("btrfs", "subvolume", "snapshot", FilePath(volume), FilePath(dest))
}
예제 #7
0
파일: btrfs.go 프로젝트: plar/pachyderm
func subvolumeDelete(name string) error {
	return executil.Run("btrfs", "subvolume", "delete", FilePath(name))
}
예제 #8
0
파일: driver.go 프로젝트: kunthar/pachyderm
func execSubvolumeExists(path string) bool {
	if err := executil.Run("btrfs", "subvolume", "show", path); err != nil {
		return false
	}
	return true
}
예제 #9
0
파일: driver.go 프로젝트: kunthar/pachyderm
func execSubvolumeDelete(path string) error {
	return executil.Run("btrfs", "subvolume", "delete", path)
}
예제 #10
0
파일: driver.go 프로젝트: sr/pachyderm
func execSubvolumeDelete(path string) (retErr error) {
	defer func() {
		protolog.Info(&SubvolumeDelete{path, errorToString(retErr)})
	}()
	return executil.Run("btrfs", "subvolume", "delete", path)
}