mirror of
https://github.com/markusressel/zfs-inplace-rebalancing
synced 2026-02-05 05:24:07 +00:00
Remove extraneous flags (#38)
This commit is contained in:
parent
979edb265c
commit
15672d2a02
@ -93,21 +93,19 @@ function rebalance () {
|
|||||||
# Linux
|
# Linux
|
||||||
|
|
||||||
# --reflink=never -- force standard copy (see ZFS Block Cloning)
|
# --reflink=never -- force standard copy (see ZFS Block Cloning)
|
||||||
# -a -- keep attributes
|
# -a -- keep attributes, includes -d -- keep symlinks (dont copy target) and
|
||||||
# -d -- keep symlinks (dont copy target)
|
# -p -- preserve ACLs to
|
||||||
# -x -- stay on one system
|
# -x -- stay on one system
|
||||||
# -p -- preserve ACLs too
|
cp --reflink=never -ax "${file_path}" "${tmp_file_path}"
|
||||||
cp --reflink=never -adxp "${file_path}" "${tmp_file_path}"
|
|
||||||
elif [[ "${OSTYPE,,}" == "darwin"* ]] || [[ "${OSTYPE,,}" == "freebsd"* ]]; then
|
elif [[ "${OSTYPE,,}" == "darwin"* ]] || [[ "${OSTYPE,,}" == "freebsd"* ]]; then
|
||||||
# Mac OS
|
# Mac OS
|
||||||
# FreeBSD
|
# FreeBSD
|
||||||
|
|
||||||
# -a -- Archive mode. Same as -RpP.
|
# -a -- Archive mode. Same as -RpP. Includes preservation of modification
|
||||||
|
# time, access time, file flags, file mode, ACL, user ID, and group
|
||||||
|
# ID, as allowed by permissions.
|
||||||
# -x -- File system mount points are not traversed.
|
# -x -- File system mount points are not traversed.
|
||||||
# -p -- Cause cp to preserve the following attributes of each source file
|
cp -ax "${file_path}" "${tmp_file_path}"
|
||||||
# in the copy: modification time, access time, file flags, file mode,
|
|
||||||
# ACL, user ID, and group ID, as allowed by permissions.
|
|
||||||
cp -axp "${file_path}" "${tmp_file_path}"
|
|
||||||
else
|
else
|
||||||
echo "Unsupported OS type: $OSTYPE"
|
echo "Unsupported OS type: $OSTYPE"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user