Skip to content

Conversation

aslak47
Copy link

@aslak47 aslak47 commented Feb 25, 2025

I added handling of btrfs. I have tested both full copying to new disk as well as refreshening old copies.
I added a force option (-f) when changing contents of existing partition to new btrfs filesystem (from ext4).
You will find interesting information on setting labels for different filesystems here. e2label is primarily for ext2/3/4 filesystem.

@framps
Copy link

framps commented Feb 25, 2025

Looks pretty good 👍

I added a force option (-f) when changing contents of existing partition to new btrfs filesystem (from ext4).

I don't see any force option code added in your PR. Do I miss something?

@aslak47
Copy link
Author

aslak47 commented Feb 25, 2025

See line # 1607 in my version of the script file

@framps
Copy link

framps commented Feb 25, 2025

I saw this addition but I expected you add another invocation option for rpi-clone. So I misunderstood your comment. Would you please explain the usage scenario of when changing contents of existing partition to new btrfs filesystem (from ext4) to better understand your comment?

@aslak47
Copy link
Author

aslak47 commented Feb 25, 2025

I actually copied from a disk containing the btrfs in a partisjon to another disk where the corresponding partisjon contaned a ext4 filesystem. That forced creating a btrfs to replace the ext4 filesystem and a full copy of contents.

@framps
Copy link

framps commented Mar 1, 2025

Thank you. I got it now. That's a nice feature but for me a clone should be identical to the source which is not true if the ext4 filesystem is changed to btrfs under the cover. Other than that the PR LGTM.

@geerlingguy What's your opinion on this? We may add a new option which enables this under the cover FS conversation. But frankly I think that's overkill. So I think we either accept this under the cover conversation or the PR should be updated so it fails if the clone doesn't have a btrfs filesystem already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants