Tim wrote: > On Sun, Jan 18, 2009 at 4:36 PM, Timothy Renner > <timothy.ren...@gmail.com <mailto:timothy.ren...@gmail.com>> wrote: > > A few questions on data replication: > Assuming I've created a pool named zfspool containing two unmirrored > disks and I create: > > zfs create zfspool/test2 > zfs set copies=2 zfspool/test2 > > Will data copied in there be guaranteed to be replicated on both > devices? Or does ZFS just try its best to spread the data among > different devices? > > > No, and not even that. It guarantee's you there will be two copies. > It doesn't even make any intentional effort to spread it to multiple > devices from what I understand. The second copy goes where it goes.
This is not quite correct. ZFS will attempt to place the copies on different vdevs. On the same vdev, it will try to place it somewhere which is not contiguous (spatial diversity). I'm curious where you got the information to the contrary? Perhaps there is a wiki somewhere that needs an edit? The copies property causes a lot of confusion and is difficult to explain in words. That is why I like the web, you can use pictures :-) http://blogs.sun.com/relling/entry/zfs_copies_and_data_protection > > Also: Data replication begins on newly-written data AFTER the set > copies=? command. Is there a way to force a file system to "catch up" > to the new replication settings? (ie: copies=1 switching to copies=2 > for ALL data in the filesystem), or is the way to do it to create > a new > file system with copies=2 and move data to it? Also conversely, > copies=2 switching to copies=1, in order to recover disk space... > > > > Again, AFAIK, no way to do so recursively short of the copying. Yes. As for recovering space, that will work as long as the data is not part of a snapshot. -- richard _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss