[olug] Mirroring a boot drive

Justin Reiners justin at hotlinesinc.com
Thu Sep 27 09:02:59 CDT 2018


On Thu, Sep 27, 2018 at 8:40 AM Ben Hollingsworth <obiwan at jedi.com> wrote:

> On 09/27/2018 08:02 AM, Justin Reiners wrote:
> > Periodically dd your drive and compress it to another location, then you
> > can just dd it to a new drive the same or larger in size.
>
> Yes, but will that overwrite any of the RAID config that's needed for
> the mirrored boot?  Probably.  I need to know what must be preserved /
> merged vs overwritten.
>
> Writing dd data to a hardware raid will not overwrite the data. Software
raid it would for sure.


> > Honestly, I'm not sure the best way to do it from a live system, it's
> been
> > a long time since I have used software raid, everything I have has a raid
> > card onboard.
>
> The system doesn't have to be live.  I can take it down for an evening &
> run off a live USB stick to do the switch.
>

By live system, I mean one someone has lived in. I do see instructions for
software raid here:
https://wiki.archlinux.org/index.php/Convert_a_single_drive_system_to_RAID
but honestly if you do not need raid the best bet would be a couple cron
scripts to back up the partition or drive, and restores should always work
with dd and a single drive. I've done it for years now.
I'm mainly a hardware raid guy, I'm a sysadmin with a bunch of poweredge
hardware so the raid cards take care of setting up the raid, and I just
dump data back onto the array once it's built. I can also just pull a bad
drive and replace it and it happily rebuilds without having to do anything
on the OS itself. Some motherboards also have this functionality.

Just make sure you take a backup before you start messing with adding or
removing raid. A rebuild of the host is always better imo because you also
have a solid backup, which raid is not. Is it a production setup or homelab?

>
> > I remember horror stories of software raid screwing up when we used it,
> not
> > being able to replace drives, no documentation, and onsite helping hands
> > tech confusion.
>
> I've been using software RAID5 on my data filesystems for many years
> now, so I'm quite comfortable with managing it once it's running. I'm
> just not sure how to get Ubuntu to boot off a RAID1 (short of a fresh
> server install), and how to best get my current OS over to it.
>

I'm sure someone here knows the answer to this, I'm really out of touch
with mdadm anymore, even my home stuff has hardware raid, which I run a
RAID 10 on. Can't lose the movies :)


>
> > If I had to do it, I'd buy a pci express raid card, do a full backup,
> buy a
> > couple new SSDs and dd the info back on to the new raid,
>
> As long as I can get my mobo to boot off that card, I could do that.
> However, I've grown fond of the easy notifications & monitoring that
> software RAID provides.  I also want to run SMART tests on the
> individual disks.  I'm guessing I wouldn't get any of that with a
> hardware RAID card.  Am I wrong?
>
Hardware raid will flash a heath led on my stuff, and the dell software set
up properly can send notifications when things go bad. I'm pretty sure a
decent card would offer the same features, or you could roll your own.

>
> > On Wed, Sep 26, 2018 at 10:40 PM Ben Hollingsworth <obiwan at jedi.com>
> wrote:
> >
> >> I've got a Ubuntu system (currently 16.04, but soon 18.04) with a
> >> single, 5.5-yr-old SSD boot/root drive and a handful of other disks in a
> >> RAID5 data array.  I'd like to add a second boot drive to create a RAID1
> >> mirror, since the current boot drive won't last forever.
> >>
> >> There are plenty of instructions available for installing a fresh Ubuntu
> >> server install on a RAID1 partition.  However, I need to keep & upgrade
> >> my existing install, since it's heavily customized.  I can't find any
> >> instructions specifically for this scenario.  Have any of you ever done
> >> this?
> >>
> >> The idea I've had is to install the new disk and unplug the existing
> >> boot disk.  Install a fresh 18.04 server release using the new disk and
> >> some spare space from another old disk as the mirrored pair. Once that's
> >> running, copy the old boot drive's data on top of the new boot drive
> >> (this is the part I'm not sure will work well).  Once the new
> >> drive/mirror is set up with my old OS, remove the old spare drive from
> >> the mirror and replace it with the old boot drive.  Yes, I have multiple
> >> backups.
> >>
> >> Does that sound plausible?  Is there a better way?
> >>
> >> I suppose the alternative is to just keep running off a single drive,
> >> and replace the old one as soon as it throws the first SMART error.
> >> That makes me nervous, though.
>
>
> --
> *Ben "Obi-Wan" Hollingsworth* obiwan at jedi.com <mailto:obiwan at jedi.com>
> www.Jedi.com <http://www.jedi.com>
> The stuff of earth competes for the allegiance I owe only to the
> Giver of all good things, so if I stand, let me stand on the
> promise that You will pull me through. /-- Rich Mullins/
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://www.olug.org/mailman/listinfo/olug
>


More information about the OLUG mailing list