f2fs (Flash-Friendly File System)有很多对SSD友好的特性,主要特性包括:
基于日志结构
聚焦于优化日志结构中的wander tree的雪崩效应和清除代价
此外,它还充分利用了SSD的内部的某些特殊指令,以减小WAF,值得试用、借鉴。下边分享了Linux 环境部署f2-fs的步骤。(注意部署前,需要确认内核已经支持,3.10默认的kernel 不支持,4.18的内核可以支持。)
下载
git clone git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
解决库依赖
yum install configure
yum install autoconf.noarch autoconf213.noarch
yum install libtoolize
yum install libedit.x86_64
yum install automake
yum install automake.noarch
yum install automake16.noarch
yum install control-center-extra.x86_64 control-center.x86_64 control-center.x86_64
yum install uuid.x86_64
yum install libuuid.x86_64 libuuid-devel.x86_64
yum install libblkid.x86_64 libblkid-devel.x86_64
解决版本检查报错
注释:#AC_PREREQ([2.68]) configure.ac
遵循ReadMe 编译
You should install the following packages.
libuuid-devel or uuid-dev
pkg-config
autoconf
libtool
libselinux1-dev
Initial compilation
Before compilation initially, autoconf/automake tools should be run.
#./autogen.sh
How to compile
#./configure
#make
#make install
格式化f2-fs盘并挂载
insmod f2fs.ko
nvme format /dev/nvme1n1
mkfs.f2fs /dev/nvme1n1
mkdir -p /mnt/f2fs
mount -t f2fs /dev/nvme1n1 /mnt/f2fs