Convert NCP data file system to btrfs

Hello there!

I run a docker container with NCP on a NanoPi Neo2 and I am thinking about converting the data disk (used as a volume with the - v option) from ext to btrfs.

Has anyone done that? Any pitfalls or anything I should take into account?

I am planning to simply stop the NCP container before the conversion (with btrfs-utils, I think) and then fire it up again after it’s done… Is this simply going to work?

Thanks in advance for your help.
Stay healthy and stay responsible,

That is not possible, without wiping the disk, all data will be lost, as far as I know.
You would have to have a spare drive to hold the data, copy it back after the re-formating.

Also ncp’s btrfs tools are not available in the docker image.
Why do you think you need/want to move to btrfs?

Oh no, that’s totally possible for some ext filesystems. The btrfs metadata just live next to the ext metadata while it’s converted and the btrfs metadata simplz point to the same blocks as the ext metadata before. It’s even reversible!

Wait… the btrfs tools are not in the docker? How do you mean? Like the btrfs-snapshot functionality and so on? That might make me rethink, actually. It’s not my top reason for btrfs, but it’s a lot more convenient to use with those tools… so not having them could make things more work than I really want to have… hmmm.

My main reason for btrfs would be automatic deduplication, really. Without getting into the reasons, I have multiplied a lot of data shoveling it around and “backing it up”.
btrfs wouldn’t mind me being stupid and automagically deduplicate data and save a lot of disk space in my case…

also to establish an actual backup strategy, btrfs snapshots might come in quite handy.

At very end of this page, lists the ncp tools unavailable in ncp docker image. You could re-use the code if wanted to and have skills.

You are right, converting is possible, just didnt know about it :wink:

Oh yeah, well, that’s mostly solvable for my skill level, I guess. I just have to do it outside the docker and that should be easy enough since it’s a volume and an actual physical disk.

So, I guess I’ll just try it out in a couple of days (having a backup ready of course)…

Thanks for the help!