Upgrading Omnia with NAS to latest version

So i have finally decided to migrate from old version of turris 3.x to the latest 6.x version. I wanted to share some of my insights as i had a hard time with the migration.

So first i did a backup and copied it to my laptop. This was useful so i could reference my previous config.

I have tried to enable automatic migration but it failed due to mismatch of busybox version. After going through forum it seems that it is no longer working. I have flashed a medkid with latest version. I recommend unmounting the disk first else you might have some issues.

I setup the router again from scratch and then i wanted to mount the disk. So now the painful part. I have a 2 disks in raid 1 with btrfs. What is needed for that is mdadm to assemble the raid and storage plugin (srv service) to mount it after boot.

First check if you have the nas package installed in reforis. then you need to check the mdadm config and see if the disk works. See /etc/config/mdadm

Edit this file and add /etc/mdadm/mdadm.conf from your backup if you have it. See if mdadm --assemble --scan works. You need to have proper uuid in your setup. Commands lsblk and cat /proc/mdstat and mdadm --detail /dev/md0 will help a lot. If discs got out of syncs and only 1 is in raid try mdadm add. After you have all good in mdadm detail you are ready for next steps.

When you have a disk ready, see the storage plugin page. For me it only allowed to reformat the diska. I obviously didnt want to loose the data so I proceeded to edit the storage plugin with with proper uuid and raid1 mode in /etc/config storage.

Now i tried service srv start and see what happens. There was some error but error notification was broken - create_notification invalid option -n . So i fixed the script instead of -n use -s and you will see the error in reforris notifications and syslog.

Now when i could see the error, the script failed because in my old setup i didnt have any subvolumes on the drive. So i changed the mount command in the srv service script and this time it worked well.

Having both mdadm and srv enabled after statup everything now works. After that i installed lxc plugin and run the config migration script for lxc.

Took me 4 days to figure this stuff out. Cheers.

1 Like

srv init script expects that the btrfs was created using storage plugin which creates a @ subvolume and stores all data there. You can therefore use schnapps to manage snapshots on top of it using schnapps -d /srv. In general, we use Btrfs raid because it handles drives with different sizes better and sync is faster.

In case you want to migrate, it should be easy. btrfs subvolume snapshot /srv /srv/@ and delete everything in /srv except new snapshot @.