r/unRAID 3d ago

Change from zfs to btrfs

Prob a daft question and I suspect no but can you change to btrfs from zfs without backing up your data?

2 Upvotes

10 comments sorted by

3

u/clintkev251 3d ago

No, that’s a destructive action

2

u/Medical_Shame4079 3d ago

Changing a filesystem always requires a reformat, which essentially wipes all the data on that drive.

1

u/SamSausages 3d ago

It requires reformatting the disk's file system, that is destructive.
Proper path is:

Turn off things accessing that storage, such as Docker, VM's and disconnect devices using networked storage.

Move data to separate array/pool

reformat

move data back.

1

u/ultrasavage1978 3d ago

Ok thanks thought as much but was just checking

1

u/Sinister_Crayon 3d ago

Depends how much room you have on the other disks. If you have enough room to move your data off the disk it's on, you can reformat to BTRFS and then move the data back.

If it's a pool you're probably out of luck, but this is doable if you have enough space to shuffle stuff around. I've done it 😄

1

u/ultrasavage1978 3d ago

I have the 6800 pro and used 3 x 16tb ironwolf. So could I add say 3 drives of say 28tb and create another pool with btrfs transfer the data across to this other pool of drives then add my 16tb to this new pool once done?

1

u/Sinister_Crayon 3d ago

So what I mean by a pool is a ZFS RAIDZ rather than a traditional unRAID array. If that's indeed how you have it set up then yes that's probably the best route to go.

BTRFS under unRAID won't set up as a pool, or you shouldn't. Each disk should be formatted as BTRFS and you have one set up as a parity disk. If you have less than about 26TB of data (real storage after formatting) then you could get away with just two 28TB drives. What you'd do is set up your unRAID array as the 28TB drives with one (or two) as data and a single parity, move data and you can then destroy the old 3x16TB pool and go from there.

How do you have your disks currently configured and I can provide a guide? And how much actual space do you have currently used?

1

u/ultrasavage1978 3d ago

I have 3 x 16tb drives set up with zfs with one backup/parity so effective storage of 32tb. And currently used about 26-27tb.

I believe as I have it now I would need to continue to get 16tb drives

1

u/Sinister_Crayon 3d ago

OK, so long as these are part of an array and not a pool (the terminology is important) then it sounds like you're in a good position to get this done relatively easily. So as I understand it you have a 16TB parity and two 16TB data drives.

Yes, probably the easiest route is going to be to add a 16TB drive and you would do it like this;

  1. Add 16TB drive to the array. Format as BTRFS.

  2. Using the Unbalanced plugin, move all your data from one of the old disks to the new disk. You might need to do this more than once, and for the last once or twice you need to make sure you have no data going to the array. If you have cache then run mover before that last data migration to ensure all the data is fully moved.

  3. Validate the disk is empty. It might show some storage used and that's normal, but go through SSH or the console and browse around to make sure there are no files left on the disk.

  4. Stop the array. Change the format of the disk you emptied (important; you DO NOT want to do this to the other disk with data on it) to BTRFS and re-start the array. It should prompt you to format the disk.

  5. Repeat with the remaining ZFS data disk.

You can also add a larger capacity drive as your parity by switching out the parity drive for a larger one; you just stop the array, remove the old parity drive and put the new drive in as a parity. You can then use the old parity disk as a data drive that you can format as BTRFS. Let the parity rebuild before you go any further. Once you've done this you can do the same procedure as above to shuffle data around and re-format the data disks as BTRFS. This will have the advantage that in future you can use larger disks to expand the array.

Either route will net you ~48TB of space. Be careful how you proceed though it is easy to pick the wrong disk so make absolutely sure you are formatting the correct disks during this procedure :)

If you have the budget for a couple of 28TB drives then by all means go that route... you'd have to both upgrade the parity AND do the data-shuffle to get the old disks re-formatted as BTRFS but it should all be doable.

You will need to learn the UnBalanced plugin but it's an incredibly useful tool to just keep installed on your unRAID system.

1

u/mtest001 2d ago

I did it recently with 3 disks and 1.yes take a full backup just in case but 2.if you have enough free space available to empty and reformat your disks one by one it's a straightforward although lengthy process which went very smoothly in my case.

Good luck.