waterloo3122 / open-source-docs

Apache License 2.0
0 stars 0 forks source link

zfs on linux related #107

Open waterloo3122 opened 4 years ago

waterloo3122 commented 4 years ago

Ubuntu 18.04

update system

apt update
apt upgrade -y
reboot

install via ppa

sudo add-apt-repository ppa:jonathonf/zfs
sudo apt-get update
apt upgrade -y
apt install zfsutils-linux zfs-dkms
zfs --version
reboot

after install

zfs --version
zpool create zfs-on-ssd /dev/sdb /dev/sdc
cd /zfs-on-ssd
git clone https://github.com/axboe/fio.git
cd fio
./confgure
make
make install
fio --version

Testing Performance

测试随机写IOPS,运行以下命令:

fio -direct=1 -iodepth=128 -rw=randwrite -ioengine=libaio -bs=4k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Rand_Write_Testing

测试随机读IOPS,运行以下命令:

fio -direct=1 -iodepth=128 -rw=randread -ioengine=libaio -bs=4k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Rand_Read_Testing

测试顺序写吞吐量,运行以下命令:

fio -direct=1 -iodepth=64 -rw=write -ioengine=libaio -bs=1024k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Write_PPS_Testing

测试顺序读吞吐量,运行以下命令:

fio -direct=1 -iodepth=64 -rw=read -ioengine=libaio -bs=1024k -size=1G -numjobs=1 -runtime=1000 -group_reporting -filename=iotest -name=Read_PPS_Testing

测试随机写时延,运行以下命令:

fio -direct=1 -iodepth=1 -rw=randwrite -ioengine=libaio -bs=4k -size=1G -numjobs=1 -group_reporting -filename=iotest -name=Rand_Write_Latency_Testing

测试随机读时延,运行以下命令:

fio -direct=1 -iodepth=1 -rw=randread -ioengine=libaio -bs=4k -size=1G -numjobs=1 -group_reporting -filename=iotest -name=Rand_Read_Latency_Testing

reboot to check if everyting is OK

Problems

if you can not reboot to linux after update kernel ,check reference 2

reference

https://launchpad.net/~jonathonf/+archive/ubuntu/zfs https://www.tonylykke.com/posts/2019/08/03/zfs-0.8.1-on-ubuntu-18.04/ https://www.alibabacloud.com/help/zh/doc-detail/25382.htm

waterloo3122 commented 4 years ago

install zfs kmod on centos7.7

add yum source

yum install http://download.zfsonlinux.org/epel/zfs-release.el7_7.noarch.rpm
gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux

enable zfs-kmod and disable zfs dkms

vim /etc/yum.repos.d/zfs.repo change

[zfs] 
enabled=1

to

[zfs] 
enabled=0

change

[zfs-kmod]
enabled=0

to

[zfs-kmod]
enabled=1

install zfs

yum install zfs

start zfs on boot

vim /etc/modules-load.d/zfs.conf

contents below:

zfs