# gpart show -p nda1
=> 34 41942973 nda1 GPT (20G)
34 2014 - free - (1.0M)
2048 1339392 nda1p5 linux-data (654M) # ext2
1341440 19630080 nda1p1 linux-data (9.4G) # ext4
20971520 8388608 nda1p2 linux-data (4.0G) # btrfs
29360128 4194304 nda1p3 ms-basic-data (2.0G) # fat32
33554432 8386560 nda1p4 linux-data (4.0G) # xfs
41940992 2015 - free - (1.0M)
# pkg install fusefs-ext2
# cd /usr/ports/filesystems/ext2/
# make install clean
# sysrc kld_list+="ext2fs"
$ mkdir -p /home/ykla/test # 这是我的示例文件夹,改成你自己的
# fuse-ext2 /dev/nda1p1 /home/ykla/test # 挂载磁盘分区。默认为只读
Mounting /dev/nda1p1 Read-Only.
Use 'force' or 'rw+' options to enable Read-Write mode
# ls /home/ykla/test/ # 查看挂载情况
lost+found test test.pdf
# fuse-ext2 -o rw+ /dev/nda1p1 /home/ykla/test # 挂载磁盘分区为可写
# ls /home/ykla/test/ # 查看挂载情况
lost+found test test.pdf
# cd /home/ykla/test/ # 切换到挂载路径
root@ykla:/home/ykla/test # touch my.txt # 创建一个文件测试看看能不能写
root@ykla:/home/ykla/test # ls # 查看读写
lost+found my.txt test test.pdf
# cd /usr/ports/filesystems/lkl/
# make install clean
# mkdir -p /home/ykla/btrfs # 创建挂载目录
# lklfuse -o type=btrfs /dev/nda1p2 /home/ykla/btrfs # 挂载磁盘分区
# ls /home/ykla/btrfs # 看看挂载情况
test1 test2 test3 test4
# mkdir -p /home/ykla/xfs # 创建挂载目录
# lklfuse -o type=xfs /dev/nda1p4 /home/ykla/xfs # 挂载磁盘分区
# ls /home/ykla/xfs # 看看挂载情况
cfc test1 test2