LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-30-2018, 09:14 AM   #1
pappin
LQ Newbie
 
Registered: Feb 2005
Posts: 16

Rep: Reputation: 0
A question about Raid 1 backups


I've just upgraded to software Raid 1 (mdadm) when I upgraded to Debian Stretch so my knowledge of Raid is a little thin at the moment.

Our backup before moving to raid was daily tape backups of user data and a weekly image backup of the hdd with an automated Clonezilla live which was fairly quick at less than 30 minutes.

With moving to raid 1 the Clonezilla live backup now takes over 3 hours using dd so its a real pain now.

I wondered if I would cause any problems with the Raid 1 if I did this instead.

Down the server and remove one of the mirrored drives - sdb (without running mdadm to remove it !! ) then insert a clean drive and resync.

In the event of needing to go back to a backup remove all drives from the server and then insert the original backup drive I removed alongside a clean drive and then resync. After resync restore user data from backup tape - We'd still be keeping the tape backups !!

Would that work without causing any problems to the raid setup. Its certainly a lot quicker and simpler to let the drives resync than using any of the other options I've looked at

The disk drives are all sata.

Thanks
 
Old 03-30-2018, 09:28 AM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Hardware swaps to do a backup seem an extremely bad idea to me.

For one thing, when resyncing a RAID1 array, the boot sectors are not mirrored. So if you finished syncing your new drive, you will not be able to boot from it. Unless you install GRUB on the new drive.

This is something to always take into account. It might be that it you choose RAID1 during system installation, the installer installed GRUB on both disks. If you created your RAID1 manually you have to install GRUB manually.

Linux is able to boot from RAID1. Which is a blessing in disguise because it does not force you to have a separate boot partition. With the risk that you did not have the boot loader on the mirrored disk.

jlinkels
 
Old 03-30-2018, 05:56 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
And just yanking a drive out then re-booting seems an extremely bad idea to me.
Great to test your environment - i.e. you should have already done it, and thus know the answer, but awful as a long-term strategy. Too many variables - spilt coffee, bent connector, power short ....

If you have a body available, it certainly is an option, but I'd fail the drive (mdadm) then replace it. The RAID will know to come up degraded and replacing the drive should be cleaner.
As per jlinkels concerns, you'd better fail sda and test booting sdb after all this. That might get interesting.
FWIW I reckon image backups are the pits, but each to their own. Also, you are attacking the symptom, not the problem. Clonezilla is not dealing with the mdadm (maybe also LVM, you haven't said) setup properly if it is falling back to using dd. dd is known to be slow, and will do the entire disk, used or not, whereas clonezilla will (last I looked some years ago) use partimage or similar to only backup used data blocks.
 
Old 03-31-2018, 11:43 AM   #4
pappin
LQ Newbie
 
Registered: Feb 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the replies - you've given me a few points to think about.

jlinkels I tested to see if grub was installed during the sync process and it seems on my system it is and the subsequent mirrored drive is bootable.

syg00 It looks like at the moment Clonezilla doesn't support software raid ( mdadm ) and dd is just way too slow.

I note the points both of you have made though and I will keep looking for an alternative.

Thanks again
 
Old 03-31-2018, 01:44 PM   #5
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 483

Rep: Reputation: 153Reputation: 153
Quote:
With moving to raid 1 the Clonezilla live backup now takes over 3 hours using dd so its a real pain now.
Is there any reason you need to keep using Clonezilla ? Using rsync for backups will avoid the problems you are likely having as it will copy only the data that exists and not the whole disk as with dd. It would handle mdadm, LVM as it just copies the data in the file system.
 
Old 04-01-2018, 04:42 AM   #6
pappin
LQ Newbie
 
Registered: Feb 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Hi tofino_surfer,

Thanks for your input

I'm aware of rsync but the tape backup is working fine for backing up user files.

I'm looking for a disk clone solution to give me a bare metal type recovery if its needed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gzipped dd VM backups on LVM + soft RAID-1 failing Gerard Lally Linux - Virtualization and Cloud 5 04-03-2012 04:08 AM
Grub, SW RAID and Backups crokett Linux - General 0 08-03-2010 08:25 AM
Proof That RAID Is Not Intended For Backups trickykid General 6 01-02-2009 11:05 PM
Question about backups gymnart Linux - Newbie 4 12-20-2007 11:14 PM
CDRW RAID Array for backups jgombos Linux - Security 1 08-01-2003 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration