Just woke up and made my coffee, found that my migration is complete!
I built a nas when I was fresh out of college with 3 drives in raid5 but because btrfs was relatively new at the time, I decided to go with ext4 for the file system. Essentially it defines how the 1’s and 0’s are arranged on the disk and how reads/writes etc work. Btrfs boasted some neat new features, but I just wanted reliable storage so I went with the established tech. I also left the 4th bay open because drives were expensive as frig at the time.
Now that time has passed and btrfs is more widespread, I found myself missing some of the features like snapshots and copy-on-write, so I decided to both add a hd and convert at the same time.
Only thing is that there isn’t really a way to convert an ext4 drive to btrfs - you have to copy everything off and back on. Some of the files I’ve got I’ve had for more than a decade, so I was understandably terrified of the thought.
I ended up making my new drive in the final bay into a standalone volume which I manually copied everything to, then wrote a bash script to recursively check the hash of every file on both sides to make sure they’re the same. This took 4 days of straight copying and reading/verification.
And cuz I’m a paranoid fek, I repeated the process with an old external drive I bought so I’d have two copies, one on the raid volume and on the external. Less chance of something going wrong on both simultaneously.
Even with two verified copies I had to take a deep breath and think real hard about anything I maybe forgot before I deleted that >10yo volume full of photos, legal docs, etc. Terrifying.
But this morning the restore has finished! Now I just verify the restored files and I can nuke the temporary standalone and add it into the raid cluster, and I’ll have a shiny new ginormous storage volume with all the lovely btrfs features I’ve been reading about.
The nice thing about this project is that I realized that this single drive failure that my raid cluster isn’t really the same as a full separate backup on a separate media. So I’ve left the cheap external that spins down if not accessed and set up a job to spin it up once a night and back anything new or changed to it.
This morning I’m sitting here excited about my objectively dull accomplishment. I think if I explained this to anyone I know irl their eyes would glaze over in the first paragraph, but I’m living my best boring life and it’s fantastic.
Nature abhors a vacuum but it fucking loves a crab