fuse程序挂载时nonempty问题的理解和解决

来源:互联网 发布:金江软件工作室 编辑:程序博客网 时间:2024/05/22 12:09

当需要挂载的目录下不为空时,fuse就会提醒你:

willing@willing:~/fuse/example$ ./hello tmpfuse: mountpoint is not emptyfuse: if you are sure this is safe, use the 'nonempty' mount option

产生这种问题的原因是因为如果挂载目录下的文件名和挂载后的产生的文件名如果相同的话,系统会产生困扰,所以最好避免这种情况的发生。当然如果你确定安全的话就在挂载时加上nonempty命令就可以了。ps:我用的是debian系统。

willing@willing:~/fuse/example$ ./hello -o nonempty tmpfuse: warning: library too old, some operations may not not work

这样你需要挂载的程序就可以挂载了,不过我在这里强调一下尽量避免本来目录下的文件名和挂载后的文件名相同,如果必须相同,那么在程序编写时可以将相同的文件名加上区别字符,当然这只是我的做法,仅供参考。ps:区别字符我是加了一串uid。

0 0
原创粉丝点击