Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Cloning

Boot a Cento 7 Live DVD

 

Install ZFS
yum -y install http://download.zfsonlinux.org/epel/zfs-release.el7_3.noarch.rpm
sed -i -e '/\[zfs\]/,/^\[/s/enabled=1/enabled=0/' /etc/yum.repos.d/zfs.repo
sed -i -e '/\[zfs-kmod\]/,/^\[/s/enabled=0/enabled=1/' /etc/yum.repos.d/zfs.repo
yum -y install zfs
modprobe zfs

Create /etc/zfs/vdev_id.conf with the following contents:

vdev_id.conf
alias   disk1   pci-0000:00:17.0-ata-1.0
alias   disk2   pci-0000:00:17.0-ata-2.0
alias   disk3   pci-0000:00:17.0-ata-3.0
alias   disk4   pci-0000:00:17.0-ata-4.0
alias   ssd1    pci-0000:00:18.0-ata-1.0
alias   ssd2    pci-0000:00:18.0-ata-2.0
udevadm trigger

Partition the SSDs

sgdisk -a1 -n2:34:2047  -t2:EF02 /dev/disk/by-vdev/ssd1
sgdisk     -n9:-8M:0    -t9:BF07 /dev/disk/by-vdev/ssd1
# rpool
sgdisk     -n1:0:40G    -t1:BF01 /dev/disk/by-vdev/ssd1
# cache
sgdisk     -n3:0:+40G   -t3:BF01 /dev/disk/by-vdev/ssd1
# swap
sgdisk     -n4:0:+8G    -t4:8200 /dev/disk/by-vdev/ssd1
 
sgdisk -a1 -n2:34:2047  -t2:EF02 /dev/disk/by-vdev/ssd2
sgdisk     -n9:-8M:0    -t9:BF07 /dev/disk/by-vdev/ssd2
# rpool
sgdisk     -n1:0:40G    -t1:BF01 /dev/disk/by-vdev/ssd2
# cache
sgdisk     -n3:0:+40G   -t3:BF01 /dev/disk/by-vdev/ssd2
# swap
sgdisk     -n4:0:+8G    -t4:8200 /dev/disk/by-vdev/ssd2
Create rpool
zpool create -f -d \
	-o feature@async_destroy=enabled \
	-o feature@empty_bpobj=enabled \
	-o feature@lz4_compress=enabled \
	-o ashift=12 \
	-O compression=lz4 \
	-O canmount=off \
	-O mountpoint=/ \
	-R /mnt/rpool \
	rpool \
	mirror /dev/disk/by-vdev/ssd1-part1 /dev/disk/by-vdev/ssd2-part1

 

 

 
 
 
zpool set cachefile=/etc/zfs/zpool.cache rpool

TODO:

Setup Nagios Monitoring:

http://www.admin-magazine.com/Archive/2014/22/Nagios-Passive-Checks 

  • No labels