Can I cancel BTRFS balance on pool raid1 without repercussions?


Recommended Posts

On 8/27/2021 at 11:20 AM, JorgeB said:

It will if it's being moved from a different share and you are using user shares (/mnt/user/share) as source and dest, never move from user shares to disk shares or vice versa, fine to use disk shares only.

I'm curious, what happens or doesn't happen if you go from disk shares to user shares or vice versa?

Link to comment

This:

 

If you mix user shares and disks when moving/copying files, you can actually lose data, because Linux doesn't realize that the source path and the destination path might actually be the same file, and so tries to overwrite what it is trying to read. This is often referred to as the User Share Copy Bug.

 

I tried it out of curiosity, pretty sure lost that data. It wasn't a ton though, so not a big deal. I've been searching the whole server for it.

Link to comment

For it to really lose data, the source and destination path have to be the same file.

 

For example, /mnt/user/data/file.txt, and /mnt/disk1/data/file.txt, are both the same file.txt in the data user share, since the user shares are just the aggregate of all top level folders on all pool and array disks.

 

So, if you copy or move /mnt/user/data/file.txt to/from /mnt/disk1/data/file.txt, Linux doesn't know these are the same file, so it tries to overwrite what it is trying to read.

 

In that case, the usual result is the file still exists, but it has no contents.

Link to comment
16 minutes ago, live4soccer7 said:

I'll be sure all these files are a part of the share

 

19 minutes ago, trurl said:

the user shares are just the aggregate of all top level folders on all pool and array disks.

No matter how those top level folders or the files and folders in them got created, they are part of user shares.

 

If you don't already have a user share named Media, and you create a top level folder named Media on a pool or array disk, it is automatically a user share named Media with default settings.

 

If you already have a user share named Media, and you create a new top level folder named Media on a pool or array disk, it is part of that Media share and has its settings.

Link to comment
7 minutes ago, trurl said:

 

No matter how those top level folders or the files and folders in them got created, they are part of user shares.

 

If you don't already have a user share named Media, and you create a top level folder named Media on a pool or array disk, it is automatically a user share named Media with default settings.

 

If you already have a user share named Media, and you create a new top level folder named Media on a pool or array disk, it is part of that Media share and has its settings.

That's sort of what I've grasped from all of this. haha. I was thinking share parameters/ownership or whatever was applied during a file transfer and not strictly based on the share being created and the file just being transferred to that folder.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.