[OpenIndiana-discuss] ZFS; what the manuals don't say ...

Reginald Beardsley pulaskite at yahoo.com
Tue Oct 23 15:13:39 UTC 2012



--- On Tue, 10/23/12, Doug Hughes <doug at will.to> wrote:

[snip]

> The unasked question is "If I wanted the vdevs to be equally
> balanced, could I?". The answers is a qualified yes. What
> you would need to do is reopen every single file, buffer it
> to memory, then write every block out again. We did this
> operation once. It means that all vdevs will roughly have
> the same block allocation when you are done.

Wouldn't walking the filesystem, making a copy, deleting the original and renaming the copy balance things?

e.g.

#!/bin/sh

LIST=`find /foo -type d`

for I in ${LIST}
   do

   cp ${I} ${I}.tmp
   rm ${I}
   mv ${I}.tmp ${I}

done




More information about the OpenIndiana-discuss mailing list