yas3fs icon indicating copy to clipboard operation
yas3fs copied to clipboard

Failed to link : Read-only file system

Open Biserni0F opened this issue 10 years ago • 1 comments

Why if yas3fs is not mounted as read only, still cannot make any links ?

Biserni0F avatar Nov 26 '15 05:11 Biserni0F

@voundaries If you are talking about hard links, I think the reason is because object storage doesn't support them. In a regular file system, directory entries are just pointers to inodes in the file system. The inodes are where the actual data resides. The inodes keep a reference count of how many file entries point to them. Once that reference count hits zero, the inode is forgotten and is available to be overwritten at some point in the future. However, with object storage, that abstraction does not exist. A file path points directly to its contents. Things like symbolic links are straight forward to support because the file contents are the file path to which they point, and then the file itself is just flagged (in its metadata) as a symbolic link, so reading the file contents means something totally different than reading a regular file. Similarly, named pipes, sockets and directories just need to have a flag in their metadata to support them. So, relatively speaking, they are easy to implement.

So, to my knowledge, there isn't a way to implement hard links with a file system that maps one-to-one with object names in the object storage. If that is a feature that you need, there are other projects that can offer something like that. s3ql implements a filesystem in s3 type object stores, but it does so with its own custom object format and layout; you can't browse the files with third party tools like s3cmd or gsutil. Another option is s3backer, which allows the file system to be mounted like a single file with blocks of a predetermined size. Then you place what ever filesystem you want on top of that (ext4, btrfs, zfs, whatever); you'll get all the features of whatever file system you choose to put on top of it :grinning:. But, again, you can't use tools like s3cmd and gsutil. In order to traverse the file system, you MUST mount it like block storage :cry:.

To get hardlinks, you need to break the paradigm of object storage as a one-to-one mapping to file system layout. It is one or the other, it seems.

eestrada avatar Mar 05 '16 00:03 eestrada