ZFS Question
David Rawling
djr at pdconsec.net
Sun Aug 15 23:06:22 UTC 2010
On 16/08/2010 8:56 AM, Depo Catcher wrote:
> Hi, I'm building a new file server. Right now I'm on FreeBSD 6.4/UFS2 and
> going to go to 8.1 with ZFS.
>
> Right now I have 3 disks, but one of them has data on it. I'd like to setup
> a RaidZ but have a question on how to do this:
> Basically, I need to setup a mirror with the two empty drives, copy the data
> over and then add the third. Is that even possible?
That kind of expansion cannot be done with FreeBSD ZFS (yet - I believe it was
being worked on in OpenSolaris and it would have filtered to FreeBSD). Once
the pool uses a given RAID level, I believe that's set in stone.
What might work is this - paraphrased because I'm not 100% sure of the
specific commands:
* Create a large (multiple GB) file on your existing disk - let's assume
that's /disk1/file0 (dd if=/dev/zero of=/disk1/file0 bs=1024 count=104857600
would be 100GB)
* Create a 3 disk RAIDZ1 pool using /dev/disk2, /dev/disk3 and /disk1/file0
(zpool create tank raidz1 ...)
* Delete the file (the pool will be degraded)
* Copy data to the degraded pool
* Replace the missing disk file with /dev/disk1 (zpool replace?)
* Scrub the pool for consistency checks (then reset the counters so you can
track the current state.
You'll want a backup just in case, though, so is there perhaps a case for
getting 1 more disk and building the set clean? That way the old disk becomes
a backup.
Dave.
--
David Rawling
PD Consulting And Security
Mob: +61 412 135 513
Email: djr at pdconsec.net
More information about the freebsd-questions
mailing list