0

Lets say I have an unencrypted file container; I ran mkfs.ext4 on some file. Now lets say I've backed up this file to Dropbox and am using rclone to actively mount the directory containing this file container on 2 computers.

Can I safely mount this file container and begin writing files on those computers simultaneously? What would happen?

Now, assuming the above is a safe operation, would I be able to do the same with a tomb or luks encrypted container? I really want to do this because it sounds super convenient, but I smell danger.

1 Answer 1

1

Can I safely mount this file container and begin writing files on those computers simultaneously? What would happen?

Generally, no. Most filesystems are not designed to be accessed by multiple systems at once. They assume that various metadata is safe to cache in memory, and won't pay attention to changes happening externally; for example, one host might have already allocated a specific sector for file A, while the other host still thinks that sector is 'free' (according to the in-memory metadata) and places file B there as well. Applying delayed sync to the volume only makes the situation worse.

(There exist filesystems designed for concurrent use (such as OCFS), but they're still designed with the assumption that it will be the same disk accessed concurrently by all systems – i.e. if one machine makes an update, it's assumed that other machines will immediately see it. Of course, that won't happen with Dropbox.)

1
  • Those sound like dragons not worth slaying
    – Raven
    Commented Mar 27, 2023 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .