Esempio n. 1
0
func snapshot(volume string, dest string, readonly bool) error {
	if readonly {
		return util.RunStderr(exec.Command("btrfs", "subvolume", "snapshot", "-r",
			FilePath(volume), FilePath(dest)))
	} else {
		return util.RunStderr(exec.Command("btrfs", "subvolume", "snapshot",
			FilePath(volume), FilePath(dest)))
	}
}
Esempio n. 2
0
func subvolumeDelete(name string) error {
	return util.RunStderr(exec.Command("btrfs", "subvolume", "delete", FilePath(name)))
}