FUSE
约 2 分钟阅读
- Golang
- bazil/fuseGitHubbazil/fuseGolang · bazil/fuse · fuse-friends/fuse-native · avfs · fuse-zip · archivemount · https://github.com/vgough/encfs · https://github.com/vgough/encfs/blob/master/encfs/encfs.pod笔记:FUSE
- fuse-friends/fuse-nativeGitHubfuse-friends/fuse-nativeGolang · bazil/fuse · fuse-friends/fuse-native · avfs · fuse-zip · archivemount · https://github.com/vgough/encfs · https://github.com/vgough/encfs/blob/master/encfs/encfs.pod笔记:FUSE
# Docker 内使用 FUSE
docker run --rm -it --privileged --cap-add SYS_ADMIN --cap-add MKNOD --device /dev/fuse -v $PWD:/host -w /host wener/base:alpine
# 挂载 loop
losetup -P /dev/loop2 harddrive.imgzip
- avfs
- fuse-zip链接bitbucket.org/agalanin/fuse-zipGolang · bazil/fuse · fuse-friends/fuse-native · avfs · fuse-zip · archivemount · https://github.com/vgough/encfs · https://github.com/vgough/encfs/blob/master/encfs/encfs.pod笔记:FUSE
- archivemount
# 只读挂载
fuse-zip -r archivetest.zip ~/mnt/zip
archivemount -o readonly archivetest.zip /mntencfs
# For single file
openssl des3 -salt -in unencrypted-data.file -out encrypted-data.file.des3
openssl des3 -d -salt -in encrypted-data.file.des3 -out unencrypted-data.file
# For a fs
# 第一次启动需要配置
encfs -v -f ~/.crypt ~/mnt/crypt
# 配合 zip fs 使用
touch empty
zip encfs.zip empty
archivemount encfs.zip ~/mnt/zip
# 操作写后
# 此时才会想数据写回 zip
umount ~/mnt/zip
# 配合单文件挂载
dd if=/dev/zero of=image.img iflag=fullblock bs=1M count=100 && sync
# 查看所有的 loop fs
losetup
# 挂载
sudo losetup loop1 image.img
# losetup -d /dev/loop1
# macOS
hdiutil attach -nomount image.img
diskutil list
# umount /dev/disk2
# hdiutil detach disk2
# 格式化分区
mkfs
# 或者 mac 下
# newfs_msdos disk3
# 或者
# diskutil eraseDisk JHFS+ VolumeName /dev/disk2
# mount -t msdos /dev/disk3 ~/mnt/file/
# 或者事先格式化 brew install hfsutils
# hformat -l File image.img
# mount -t hfs -o loop image.img /mnt/filego-fuse
- hanwen/go-fuseGitHubhanwen/go-fuse
- fs/api.goGitHub 文件hanwen/go-fuse/fs/api.go
FAQ
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
echo user_allow_other | sudo tee -a /etc/fuse.conf关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub6 条
- bazil/fusegithub.com/bazil/fuse
- fuse-friends/fuse-nativegithub.com/fuse-friends/fuse-native
- hanwen/go-fusegithub.com/hanwen/go-fuse
- hanwen/go-fuse/fs/api.gogithub.com/hanwen/go-fuse/blob/master/fs/api.go
- vgough/encfsgithub.com/vgough/encfs
- vgough/encfs/encfs/encfs.podgithub.com/vgough/encfs/blob/master/encfs/encfs.pod
其他外链3 条
- avf.sourceforge.netavf.sourceforge.net/
- bitbucket.org/agalanin/fuse-zipbitbucket.org/agalanin/fuse-zip
- www.cybernoia.de/software/archivemountwww.cybernoia.de/software/archivemount