首页 > 编程知识 正文

reiserfs文件系统,系统文件安装方法

时间:2023-05-06 08:22:43 阅读:216651 作者:4233

目的
由于根据资料介绍,reiserfs和reiser4文件系统对于小文件专门进行优化,对小文件进行合并存储,据说小文件性能很好。所以我们就搭建相关的环境进行验证。

总体分析


Centos
Reiserf
安装
rpm -Uvh https://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpmyum install kmod-reiserfs reiserfs-utils -y
使用
mkreiserfs -f /dev/sddmount /dev/sdd /mnt/sdd
存在的问题

和lvm不兼容。不能像xfs一样,在xfs上面搭建LVM。必须使用硬件raid卡才能把多个磁盘整合在一起,从而扩大存储空间。没有支持文件扩展属性。没有在其上面搭建glusterfs的卷。

Reiser4
存在的问题

没有整合进去linux源码中。不能直接使用。在CentOS7中使用的Linux3.10上面打补丁,发现reiser4的补丁中的代码有不少错误。不能正常使用。

Ubuntu
Reiserfs
安装
sudo apt install reiserfsprogs

创建
sudo mkfs.reiserfs -f /dev/sdb

使用
sudo mount -o user_xattr /dev/sdb /mnt/sdb

存在的问题
创建glusterfs卷时,出现如下问题:
newfs@newfs-desktop:/mnt$ sudo gluster volume create vol1 replica 3 newfs:/mnt/sda newfs:/mnt/sdb newfs:/mnt/sdd force
volume create: vol1: failed: Glusterfs is not supported on brick: newfs:/mnt/sda.
Setting extended attributes failed, reason: 不支持的操作.

Reiser4
因为reiser4本身没有在Linux主干代码分支发布,只是以补丁的形势出现在网上,所以必须自己打补丁,重新编译内核,并且安装内核。而这一切都带来相当的麻烦。
内核编译
参考:https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

主要步骤:
apt-get source linux
sudo apt-get build-dep linux-image-$(uname -r)
chmod a+x debian/rules
chmod a+x debian/scripts/*
chmod a+x debian/scripts/misc/*
fakeroot debian/rules clean
fakeroot debian/rules editconfigs
fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic binary-perarch

内核安装
我选择的是ubuntu 18.10
sudo dpkg -i linux-headers-4.18.0-15_4.18.0-15.16_all.deb
sudo dpkg -i linux-headers-4.18.0-15-generic_4.18.0-15.16_amd64.deb
sudo dpkg -i linux-modules-4.18.0-15-generic_4.18.0-15.16_amd64.deb
sudo dpkg -i linux-image-unsigned-4.18.0-15-generic_4.18.0-15.16_amd64.deb
sudo dpkg -i linux-modules-extra-4.18.0-15-generic_4.18.0-15.16_amd64.deb

安装工具包
sudo apt install reiser4progs

创建reiser4文件系统盘
sudo mount -t reiser4 /dev/sda /mnt/sda

存在的问题
和reiserfs一样,同样存在创建glusterfs卷失败的问题。而且还不能使用setfattr进行设置属性。
newfs@newfs:/mnt$ sudo gluster volume create vol1 replica 3 newfs:/mnt/sda newfs:/mnt/sdb newfs:/mnt/sdd force
volume create: vol1: failed: Glusterfs is not supported on brick: newfs:/mnt/sda.
Setting extended attributes failed, reason: 不支持的操作.

测试
拷贝大量的小文件,性能比没有改进的glusterfs+xfs好。但是和网络配置有关系。如果要使用这个文件系统,建议进行排除网络因素的对比测试。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。