> From: zfs-discuss-boun...@opensolaris.org [mailto:zfs-discuss-
> boun...@opensolaris.org] On Behalf Of Paul Kraus
> I have done a "poor man's" rebalance by copying data after adding
> devices. I know this is not a substitute for a real online rebalance,
> but it gets the job done (if you can take the data offline, I do it a
> small chunk at a time).
I have done the same thing. It's uncomfortable. It was like this...
I want to rebalance, or add compression to existing data, or one of the other
reasons somebody might want to do this. I find a directory that is temporarily
static, and I do this: (cd workdir ; sudo tar cpf - .) | (mkdir workdir2 ; cd
workdir2 ; sudo tar xpf - ) ; sudo mv workdir trash ; sudo mv workdir2 workdir
; sudo rm -rf trash
Unfortunately that failed. The idea was to reconstruct the data without
anybody noticing, and then then perform an instantaneous "mv" operation to put
it into place. Unfortunately, if anything is being used at all in the old dir,
then the mv fails, and I end up with workdir/workdir2 and two copies on disk.
In practice, I only found this to work:
sudo rm -rf workdir ; mkdir workdir ; (cd /blah/snapshot/mysnap ; sudo tar cpf
- .) | (cd workdir ; sudo tar xpf -)
Hence, I say, it's uncomfortable.
zfs-discuss mailing list