Skip to content

Commit

Permalink
add --reflink=never to cp on linux (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusressel authored Nov 11, 2023
1 parent d6cbeb3 commit 979edb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zfs-inplace-rebalancing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ function rebalance () {
if [[ "${OSTYPE,,}" == "linux-gnu"* ]]; then
# Linux

# --reflink=never -- force standard copy (see ZFS Block Cloning)
# -a -- keep attributes
# -d -- keep symlinks (dont copy target)
# -x -- stay on one system
# -p -- preserve ACLs too
cp -adxp "${file_path}" "${tmp_file_path}"
cp --reflink=never -adxp "${file_path}" "${tmp_file_path}"
elif [[ "${OSTYPE,,}" == "darwin"* ]] || [[ "${OSTYPE,,}" == "freebsd"* ]]; then
# Mac OS
# FreeBSD
Expand Down

0 comments on commit 979edb2

Please sign in to comment.