我可以运行shell命令:
unionfs-fuse /changedata=RW:/immutedata=RO -o cow /data这将以我想要的方式安装文件系统。现在,我需要将它合并到自动报警器中,以便根据需要重新安装。
我试过的/etc/auto.misc:
/data -fstype=fuse,cow /changedata=RW:/immutedata=RO-f /etc/auto.master在我做ls /data时说的是什么?
handle_packet: type = 5
handle_packet_missing_direct: token 19, name /data, request pid 6063
attempting to mount entry /data
lookup_mount: lookup(file): looking up /data
lookup_mount: lookup(file): /data -> -fstype=fuse,cow /changedata=RW:/immutedata=RO
parse_mount: parse(sun): expanded entry: -fstype=fuse,cow /changedata=RW:/immutedata=RO
parse_mount: parse(sun): gathered options: fstype=fuse,cow
parse_mount: parse(sun): dequote("/changedata=RW:/immutedata=RO") -> /changedata=RW:/immutedata=RO
parse_mapent: parse(sun): gathered options: fstype=fuse,cow
parse(sun): invalid location
dev_ioctl_send_fail: token = 19
failed to mount /data谷歌几乎没有透露任何信息。在这个文件系统被合并时,手册页是相当空的。
也许我应该把它放进/etc/fstab,让用户重新安装?
发布于 2015-03-06 10:58:29
我知道现在回答已经太晚了,但是在Ubuntu工作中将以下内容添加到/etc/fstab中,
/dir/A=RW:/dir/B=RO /dir/my-union fuse.unionfs-fuse allow_other,cow,use_ino 0 0发布于 2018-09-03 21:02:03
自动生成unionfs
TLDR:在/etc/auto.misc中创建以下条目并将其包含到您的etc/auto.master中(如下所示)。
data -fstype=fuse,cow,allow_other :unionfs\#/changedata=RW\:/immutedata=RO奖励:在nfs自动行之上创建一个unionfs自动行(演示如何正确配置autofs)
使用NFSv4时,在/etc/default/nfs-common中启用IMAPD
NEED_IDMAPD=yes如果希望autofs始终为挂载创建目录,请在browse_mode中启用/etc/autofs.conf。
browse_mode = yes现在到核心部分:在/etc/auto.master中添加以下行
# automount all nfs volumes under /nfs and misc filesystems under /mnt
/nfs /etc/auto.nfs
/mnt /etc/auto.miscautofs将在/nfs/<mount>下挂载/etc/auto.nfs中指定的所有文件系统,在/mnt/<mount>下挂载/etc/auto.misc中指定的所有文件系统。
在我的/etc/auto.nfs中,我有以下(示例)条目:
# FileServer: nfs data configuration
data01 -fstype=nfs4,ro,soft,intr,rsize=8192,wsize=8192,nosuid,tcp,allow_other 192.168.3.100:/mnt/data01
data02 -fstype=nfs4,ro,soft,intr,rsize=8192,wsize=8192,nosuid,tcp,allow_other 192.168.3.100:/mnt/data02
data03 -fstype=nfs4,ro,soft,intr,rsize=8192,wsize=8192,nosuid,tcp,allow_other 192.168.3.100:/mnt/data03
data04 -fstype=nfs4,ro,soft,intr,rsize=8192,wsize=8192,nosuid,tcp,allow_other 192.168.3.100:/mnt/data04
data05 -fstype=nfs4,ro,soft,intr,rsize=8192,wsize=8192,nosuid,tcp,allow_other 192.168.3.100:/mnt/data05在我的/etc/auto.misc中,我为unionfs添加了以下条目
# unionfs mount of all /nfs/data* mounts into /mnt/data
data -fstype=fuse,allow_other,use_ino,ro,noatime :unionfs\#/nfs/data01=RO\:/nfs/data02=RO\:/nfs/data03=RO\:/nfs/data04=RO\:/nfs/data05=RO确保所有文件都具有644的权限(必要时使用chown 644 /etc/auto.{nfs,misc}进行调整)
然后,您可以启用autofs并重新启动服务。
# reload autofs to enable all shares
systemctl enable autofs
systemctl restart autofs你现在应该可以做一个ls /mnt/data了
https://askubuntu.com/questions/419525
复制相似问题