Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-31-2007, 10:49 PM   #1
LQ Newbie
Registered: Nov 2007
Posts: 15

Rep: Reputation: 1
How do I Avoid a full raid resync with mdadm.

Hi all,
I recently delved into the world of software raid, and set up a sometimes-connected usb drive to mirror the disk in my laptop (raid 1). Everything works great except that when I connect the usb drive to the system and add one of its partitions to one of my raid devices, it insists on resyncing the entire partition, which is quite a drain on my not-so-powerful laptop.

Reading the man page for mdadm, the system should be smart enough to use the raid internal write-intent bitmap to only write the sectors that have changed. If I software-fail the device, remove it, and re-add it without stopping the array, this is exactly what happens. However; if I stop the array (either manually, or by shutting down), then start up in a degraded state and try to add the device back into the array, I get a full resync.

Right now I'm not using an initrd image to boot, and relying on the auto-detect feature of the kernel. This lets me boot with a root md device started in degraded mode by default.

I've tried all of the following:
- mdadm /dev/mdx -a /dev/sdax
- mdadm /dev/mdx --re-add /dev/sdax
- mdadm -I /dev/sdax
which all result in a full resync.

The one command that doesn't cause a full resync is:
- mdadm -A /dev/mdx /dev/hdax /dev/sdax
but I can only use this for my secondary partitions, as my root partition is already started, mounted, and in use in degraded mode.

Is there a way to do what I'm trying without having to also delve into custom initrd images?

Last edited by JivanAmara; 01-24-2008 at 05:00 AM.
Old 08-01-2010, 02:50 PM   #2
LQ Newbie
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
wrong tech

You're using the wrong technology RAID, for the wrong purpose - mirrored backups. If your goal is simply mirroring a drive for backup purposes you should investigate `rsync' or `unison'. RAID is meant to have continuously connected hardware.



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
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
RAID mdadm - Sending E-Mails on RAID Failure? rootking Linux - General 1 12-25-2007 03:59 AM
Can't stop mdadm resync! mackdav Linux - Server 3 03-27-2007 12:57 PM
resync in Partitionable RAID 5. FinalFantasy Linux - General 4 10-15-2005 09:02 AM
RAID resync thedeud Linux - General 6 03-14-2003 05:22 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:32 PM.

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