Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.