How to write a filesystem in 50 lines of code
blog.ksplice.com
How to write a filesystem in 50 lines of code
1–10 of 31 posts
Re: How to write a filesystem in 50 lines of code
#2It would be awesome if this was added to the FAQ or something.
Re: How to write a filesystem in 50 lines of code
#3Yes, FUSE is indeed fun and poses an easy entry barrier to writing a user-space filesystem. Many projects that are based on it are listed on their wiki page as well and a lot of them have source code available.
Re: How to write a filesystem in 50 lines of code
#4I tried the fuse-python xmp example and accidentally mounted the filesystem on top of an existing folder with the result being that the folder vanished. Now if I try to cd into that folder I get an input/output error. It doesn't show up on directory listings. And umount says it's not mounted. I have a backup so this is not an unmitigated disaster, but the folder is huge (it's my development folder) so I'd much prefer not to have to do a restore. This is MacFuse 2.0.3 running on Snow Leopard. Any suggestions on how to proceed would be greatly appreciated.
Re: How to write a filesystem in 50 lines of code
#5Youch! Beware, there are hidden pitfalls here. I tried the fuse-python xmp example and accidentally mounted the filesystem on top of an existing folder with the result being that the folder vanished. Now if I try to cd into that folder I get an input/output error. It doesn't show up on directory listings. And umount says it's not mounted. I have a backup so this is not an unmitigated disaster, but the folder is huge…
Re: How to write a filesystem in 50 lines of code
#6Re: How to write a filesystem in 50 lines of code
#7While this is a very interesting article, I think it would be great if people stopped using "How to do x in y lines of code" titles - it's just as bad as "x things about y" titles. It's a lot better when title actually describes what the article is really about. It would be awesome if this was added to the FAQ or something.
Re: How to write a filesystem in 50 lines of code
#8Youch! Beware, there are hidden pitfalls here. I tried the fuse-python xmp example and accidentally mounted the filesystem on top of an existing folder with the result being that the folder vanished. Now if I try to cd into that folder I get an input/output error. It doesn't show up on directory listings. And umount says it's not mounted. I have a backup so this is not an unmitigated disaster, but the folder is huge…
have you tried rebooting?
Re: How to write a filesystem in 50 lines of code
#9Youch! Beware, there are hidden pitfalls here. I tried the fuse-python xmp example and accidentally mounted the filesystem on top of an existing folder with the result being that the folder vanished. Now if I try to cd into that folder I get an input/output error. It doesn't show up on directory listings. And umount says it's not mounted. I have a backup so this is not an unmitigated disaster, but the folder is huge…
have you tried rebooting?
Re: How to write a filesystem in 50 lines of code
#10Youch! Beware, there are hidden pitfalls here. I tried the fuse-python xmp example and accidentally mounted the filesystem on top of an existing folder with the result being that the folder vanished. Now if I try to cd into that folder I get an input/output error. It doesn't show up on directory listings. And umount says it's not mounted. I have a backup so this is not an unmitigated disaster, but the folder is huge…
Rebooting will fix it. But you should be able to just unmount the filesystem, which will also fix it. Does 'mount' list something mounted there? Does 'df /path/to/folder/' reflect the FUSE filesystem rather than the underlying filesystem? The input/output error sounds like the FUSE filesystem being mounted indeed, and just being broken.