Created
April 6, 2021 15:59
-
-
Save arm2arm/a3c61958472fbed2e0c9ea4800146534 to your computer and use it in GitHub Desktop.
rebalance zfs for the cold data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you change some settings in the zfs dataset you should rebalance it in order to store data with this current settings. | |
# Usage: | |
# zfs set recordsize=1M data/archive | |
# sh ./rebalance_zfs.sh /data/archive| parallel -P 16 --eta | |
mypath=$1 | |
find $mypath -type f | xargs -d '\n' -I{} echo "rsync -a --inplace \"{}\" \"{}.abcdef\";unlink \"{}\";mv \"{}.abcdef\" \"{}\" " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment