ZFS question...
Dan Nelson
dnelson at allantgroup.com
Thu Apr 10 22:54:48 UTC 2008
In the last episode (Apr 10), Wael Nasreddine said:
> This One Time, at Band Camp, Dan Nelson <dnelson at allantgroup.com> said, On Thu, Apr 10, 2008 at 01:14:02PM -0500:
> > You don't necessarily need ZFS for this; gmirror would work just as
> > well. You can split your 750GB drive into three
> > partitions/slices/whatevers:
>
> > 160GB - mirror this with your physical 160GB disk
> > 500GB - mirror this with your physical 500GB disk
> > 90GB - leftover unmirrored, use at your peril
>
> > ZFS would let you take those two mirrored vdevs and stripe them into a
> > single pool, but then again you could use gstripe or gconcat for that.
> > The main benefit to ZFS would be if you regularly crash the system;
> > fscking a 750gb UFS filesystem could take a while.
>
> That's not the desired behaviour actually, what I want is to gain the
> maximum space without the possibility of loosing data, I hear that
> ZFS is excellent at recovering data so I'm trying to figure out the
> perfect installation with these drives and of course while keeping
> the data safe... RAID0 is good for not wasting space at all but then
> again if one drive fails I'll lose everything :(
Thae above config will give you RAID1, not RAID0, since you're
mirroring each small drive onto a part of your large drive. You'll end
up with 160+500 = 660GB of mirrored storage, with 90gb of unmirrored
space left over. If you use ZFS, you would do something like this:
Replace /dev/md* with your usb devices, obviously :)
# mdconfig -a -t swap -s 160G
md1
# mdconfig -a -t swap -s 500G
md2
# mdconfig -a -t swap -s 750G
md3
# disklabel -R /dev/md3 /dev/stdin << DONE
d: 160G * unknown
e: 500G * unknown
f: * * unknown
DONE
# zpool create usb mirror /dev/md1 /dev/md3d mirror /dev/md2 /dev/md3e
# zpool list usb
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
usb 655G 112K 655G 0% ONLINE -
# zpool status usb
pool: usb
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
usb ONLINE 0 0 0
mirror ONLINE 0 0 0
md1 ONLINE 0 0 0
md3d ONLINE 0 0 0
mirror ONLINE 0 0 0
md2 ONLINE 0 0 0
md3e ONLINE 0 0 0
errors: No known data errors
# df -k /usb
Filesystem 1024-blocks Used Avail Capacity Mounted on
usb 676085632 0 676085632 0% /usb
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-questions
mailing list