[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Preparing for zfs filesystem - wrap-up



To summarize for CentOS 6.x (and RHEL6/SL6):

(0) $$$ If you plan to use deduplication (recommended), make sure your system has 8G of ECC memory for each 1T of zfs filesystem above & beyond your OS needs. (ECC usually means a server motherboard.)

(1) If SELinux is set to enforcing (default), change that to permissive or disabled (not recommended) in /etc/selinux/config. Reboot to make this effective.

(2) Fetch and install zfs-release-1.2.el6.noarch.rpm from http://zfsonlinux.org.

(3) Then with yumex find (in the zfs repo) and install:
zfs-devel-0.6.1-1.el6.x86_64
zfs-test-0.6.1-1.el6.x86_64
zfs-0.6.1-1.el6.x86_64
zfs-dracut-0.6.1-1.el6.x86_64
dkms-2.2.0.3-2.zfs1.el6.noarch
zfs-dkms-0.6.1-2.el6.noarch
(4) Start with completely zeroized drives. A crude but very effective way is to use dd:
# dd if=/dev/zero of=/dev/sdX bs=1M
Note that this can take several hours, especially if you're zeroizing multiple drives at once.
(5) Build a pool specifying the mount point and the array type. Recommend using the drive name info in /etc/disk/by-id:
# zpool create -f pub raidz2 \
/dev/disk/by-id/scsi-SAdaptec_0-1_4CABCE14 \
/dev/disk/by-id/scsi-SAdaptec_0-2_660FCE14 \
/dev/disk/by-id/scsi-SAdaptec_0-3_5A13DE14 \
/dev/disk/by-id/scsi-SAdaptec_0-4_DEA3EE14 \
/dev/disk/by-id/scsi-SAdaptec_1-0_92C3FE14 \
/dev/disk/by-id/scsi-SAdaptec_1-1_551BFE14 \
/dev/disk/by-id/scsi-SAdaptec_1-2_62E00E14 \
/dev/disk/by-id/scsi-SAdaptec_1-3_49941E14 \
/dev/disk/by-id/scsi-SAdaptec_1-4_5B0C1E14
Note that your actual command line will not contain these \ line breaks. It will be all one line wrapping as needed.
This will create a binary /etc/zfs/zpool.cache file that defines the pool to zfs.
(6) Mount the pool:
# zfs create -p -o dedup=on -o sharenfs=on pub
My new filesystem does not automatically remount at boot time. Until I figure out why, I've made a one-line script out of step 6 and manually run it after I reboot.

Enjoy!

--Doc