I recently built a FreeBSD 9.0 box to use as a fileserver with ZFS. I chose ZFS for its data integrity and self-healing features. ZFS really is the "killer app" for FreeBSD if there ever was one.
After much initial research, I built the system and created a zpool mirror spanning two 1TB hard drives named "zdrive." Within zdrive, I created a zfs filesystem named "home" and set copies=2. I erroneously assumed that I needed to have ZFS create and store extra copies of the files that I saved in order to take advantage of the self-healing properties of ZFS.
I now know that due to the mirror, zfs will self-heal by replacing the corrupted copy on one disk with the non-corrupted copy on the mirrored disk. There is no requirement to have copies=2 on a mirror for zfs to self-heal. If both disks have corrupted copies, something so catastrophic has happened that I will be restoring from an off-site backup anyway.
What is now happening is that I am needlessly saving 4 copies of each file (two copies to each drive in the mirror). This is needlessly redundant for my purposes, and it effectively halves the capacity of my 1TB drives to 500GB. I am running out of space fast.
My question is, how do I fix this without nuking the whole thing and starting from scratch? I tried to remove the excess copies to no avail by issuing the command "zfs set copies=1 zdrive/home". While that eliminates saving redundant copies moving forward, the redundant copies already saved are still on my zfs filesystem. I would like to reclaim this space.
Does anyone have any suggestions?
After much initial research, I built the system and created a zpool mirror spanning two 1TB hard drives named "zdrive." Within zdrive, I created a zfs filesystem named "home" and set copies=2. I erroneously assumed that I needed to have ZFS create and store extra copies of the files that I saved in order to take advantage of the self-healing properties of ZFS.
I now know that due to the mirror, zfs will self-heal by replacing the corrupted copy on one disk with the non-corrupted copy on the mirrored disk. There is no requirement to have copies=2 on a mirror for zfs to self-heal. If both disks have corrupted copies, something so catastrophic has happened that I will be restoring from an off-site backup anyway.
What is now happening is that I am needlessly saving 4 copies of each file (two copies to each drive in the mirror). This is needlessly redundant for my purposes, and it effectively halves the capacity of my 1TB drives to 500GB. I am running out of space fast.
My question is, how do I fix this without nuking the whole thing and starting from scratch? I tried to remove the excess copies to no avail by issuing the command "zfs set copies=1 zdrive/home". While that eliminates saving redundant copies moving forward, the redundant copies already saved are still on my zfs filesystem. I would like to reclaim this space.
Does anyone have any suggestions?