upgrades & mdadm's raid1

When you run into problems installing MX Linux XFCE
Message
Author
User avatar
gour
Posts: 12
Joined: Wed Sep 15, 2021 4:00 am

upgrades & mdadm's raid1

#1 Post by gour »

Hello!

After many years of using unstable/rolling releases, I've settled on Debian stable (bookworm) + backports, but would like to migrate to MX considering it is kind of Debian++.

My root is on single SDD, while home is on 2 HDDs assembled in mdadm's raid1 array.

Afact, MX installer can't install on such a combination, but I can install on the primary SDD, assemble mdadm array and then migrate data to newly created raid1 array.

When the system is newly installed, it's not much work, but I'm concerned about future upgrades, iow. can be MX upgraded using the usual Debian-way:

Code: Select all

$ apt update
$ apt upgrade
$ apt full-upgrade
since dismantling mdadm array, copying ~2TB of data and re-assembling is time-consuming?

Or is better to stay on Debian with such hardware/software setup?

User avatar
DukeComposed
Posts: 1324
Joined: Thu Mar 16, 2023 1:57 pm

Re: upgrades & mdadm's raid1

#2 Post by DukeComposed »

gour wrote: Fri Jun 21, 2024 2:40 am Afact, MX installer can't install on such a combination, but I can install on the primary SDD, assemble mdadm array and then migrate data to newly created raid1 array.

When the system is newly installed, it's not much work, but I'm concerned about future upgrades, iow. can be MX upgraded using the usual Debian-way:

Code: Select all

$ apt update
$ apt upgrade
$ apt full-upgrade
The short version is that MX can't be upgraded to a new release. When a new major version of MX is published, say MX-23, it is recommended that MX-21 users do a new install and migrate data manually.

The long version is that there are a number of unofficial, unsupported methods to migrate to a newer version of MX Linux. While the installer claims to support installing to LVM and MD RAID virtual devices in the documentation for gazelle-installer, I haven't found any references in minstall.cpp or partman.cpp for such support, the two most likely places I'd expect to find them. If you have, say, an sda for root and and sdb+sdc for RAID, "lsblk" will show the md0 software RAID device as a child of the physical devices, so the installer will only show sda and sdb, with the RAID-configured partition of sdb1 being in locked state. I have mercifully not had to touch mdadm in almost 20 years, but it wasn't too difficult to set up an MX-23.2 VM and get an ext3-formatted /dev/md0p1 partition put together to test this.

Fortunately you can always configure all of your disks however you like, mount them by hand, and then unsquash the linuxfs file yourself. The documentation calls the use of virtual devices "an advanced feature" and I don't think they're joking about that.

User avatar
fehlix
Developer
Posts: 12634
Joined: Wed Apr 11, 2018 5:09 pm

Re: upgrades & mdadm's raid1

#3 Post by fehlix »

gour wrote: Fri Jun 21, 2024 2:40 am Hello!

After many years of using unstable/rolling releases, I've settled on Debian stable (bookworm) + backports, but would like to migrate to MX considering it is kind of Debian++.

My root is on single SDD, while home is on 2 HDDs assembled in mdadm's raid1 array.

Afact, MX installer can't install on such a combination, but I can install on the primary SDD, assemble mdadm array and then migrate data to newly created raid1 array.

When the system is newly installed, it's not much work, but I'm concerned about future upgrades, iow. can be MX upgraded using the usual Debian-way:

Code: Select all

$ apt update
$ apt upgrade
$ apt full-upgrade
For advanced user, upgrade through the method like the one described here Upgrading from MX-21 to MX-23 without reinstalling
will probably work in similare way also for future upgrades to a newer Debian based released .
But read disclaimer and follow the instructions carefully .
And note, on MX Linux, it's not recommended to keep debian backports enabled,
b/c MX used repostiories are debian's and mx-repos, and it's not guaranteed, that there will never be conflicts
with debian backports and mx-repos. So always better, use "MX Package installer" to manually install
from backports, where backpost repos is only turned on temporary.
Don't see a big issue with you'r mdam raid, that should work fine.

User avatar
gour
Posts: 12
Joined: Wed Sep 15, 2021 4:00 am

Re: upgrades & mdadm's raid1

#4 Post by gour »

DukeComposed wrote: Fri Jun 21, 2024 6:25 am The short version is that MX can't be upgraded to a new release. When a new major version of MX is published, say MX-23, it is recommended that MX-21 users do a new install and migrate data manually.

The long version is that there are a number of unofficial, unsupported methods to migrate to a newer version of MX Linux.
Thank you.
While the installer claims to support installing to LVM and MD RAID virtual devices in the documentation for gazelle-installer, I haven't found any references in minstall.cpp or partman.cpp for such support, the two most likely places I'd expect to find them. If you have, say, an sda for root and and sdb+sdc for RAID, "lsblk" will show the md0 software RAID device as a child of the physical devices, so the installer will only show sda and sdb, with the RAID-configured partition of sdb1 being in locked state. I have mercifully not had to touch mdadm in almost 20 years, but it wasn't too difficult to set up an MX-23.2 VM and get an ext3-formatted /dev/md0p1 partition put together to test this.
You're correct. Installer can't handle raid devices created by mdadm. I was able to manually create raid1 array for my home, but then had issue that it did not automount from

Code: Select all

/etc/fstab
I tried many things, looked at several posts and at the end I relized that instead of "defaults" mount option, I put "default" and whenever I started my machine, had to go into console and manually mount it. :frustrated:

User avatar
gour
Posts: 12
Joined: Wed Sep 15, 2021 4:00 am

Re: upgrades & mdadm's raid1

#5 Post by gour »

fehlix wrote: Fri Jun 21, 2024 7:31 am For advanced user, upgrade through the method like the one described here Upgrading from MX-21 to MX-23 without reinstalling
will probably work in similare way also for future upgrades to a newer Debian based released .
But read disclaimer and follow the instructions carefully .
This is encouraging! :celebrate:
And note, on MX Linux, it's not recommended to keep debian backports enabled,
b/c MX used repostiories are debian's and mx-repos, and it's not guaranteed, that there will never be conflicts
with debian backports and mx-repos. So always better, use "MX Package installer" to manually install
from backports, where backpost repos is only turned on temporary.
Out of curiosity, I tried to install LinuxMint/Xfce since those two distros are usually compared...LM's installer can cope with mdadm array, but in every other aspect MX is vastly superior!
I must say that since I use Linux (25 yrs), I've never had experience with such a polished distribution as MX. :winner:

Started with SUSE, spent time with Gentoo, Arch for many years, then Debian/sid, some time with Fedora, openSUSE, shortly with Siduction, but MX is the best so far. Such a nice blend of Debian/Xfce's stability with nice add-ons. Installer's handling of testing/backports/flatpaks repo is great, and I'll be glad to recommend it to all my friends (still) migrating from Windows to Linux.

Now it's the time to (finally) dive into *.deb packaging — have to either bump or rebuild some rebuild packages and, possibly, contribute something back to MX.
My sincere gratitude for MX devs providing such a mature product. :birthdaycake:

Sincerely,
Gour

User avatar
fehlix
Developer
Posts: 12634
Joined: Wed Apr 11, 2018 5:09 pm

Re: upgrades & mdadm's raid1

#6 Post by fehlix »

gour wrote: Sun Jun 23, 2024 3:03 am .. and, possibly, contribute something back to MX.
Maybe in case, you can provide some user-friendly kind of howto setup and install MX on RAID1.
The trick might be to explain to the user how to handel those "virtual" drives within the MX Installer.
I've tried recently to show in a reply to some question of a user
viewtopic.php?p=777744#p777744,
how to use the "MX Installer" on LVM's, but only very shortly and missed explaining to setup LV's.
Maybe if you have some spare drive, and to get familiarize yourself with the installer
and perform installation on mdam raids. Also in case you find some showstopper, always good
to have something to get fixed.

Post Reply

Return to “Installation”