[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving mdadm raid volume to new OS install



On 01/27/2013 10:13 PM, Sam Martin wrote:
> Thanks Frank,
> 
> But this is kind of my backup.  I don't have any capacity to backup to another drive/ext HDD.

Raid is not a backup. All data can easily get lost by one wrong command,
e.g. someone does rm -rf /mountpoint (accidentally, some do because of
wrongly-predicted shell-expansion) and suddenly all data are gone... You
would be probably better off not having a raid but one main HDD for your
data and one for your backup.

> The OS is running off a small SSD.
> I have 2x3TB drives for data running in RAID1.
> 
> I assumed with software raid, the drives couldn't be used without being part of the RAID config, i.e. presented via mdadm.
> 
> I'm fairly new to Linux and software raid, so please forgive any stupid /obvious comments.
> 
> Am I right in thinking, I could get new OS up and running. Mount one of the disks as a standard drives (not raid) and them somehow rebuild a raid based with the data present?

This might work, as someone already posted, depending on the metadata
format. But I would never try this without being entirely sure, because
-- as I have already mentioned -- a single wrong command (and that can
also be a wrong mount) can damage your RAID.

Why not try to restore the whole raid in one step. Although it seems
more complex, I believe it is safer, because you do not rely on a
specific metadata format. On the other hand you could also try to mount
a device and if it fails, rebuild the raid using the one left as if the
second HDD was just damaged but I would not recommend this.

> What problems might I face using the raid config as is under 64bit dist?

I guess there are none, unless you try to mount the devices without a
raid array.

> Thanks for your advice
> 
> Sam
> 
> 
> On Sunday, January 27, 2013 3:50:01 PM UTC, Frank wrote:
>> On 01/27/2013 02:18 PM, Sam Martin wrote:
>>
>>
>>
>>> I'm about to reinstall linux using 64bit wheezy dist rather than the 32bit on i inadvertently used.
>>
>>>
>>
>>> I've got a copy of /etc but I'm concerned that in /etc/mdadm/mdadm.config there is no reference to the array.
>>
>>>
>>
>>> The only lines that are uncommented are 
>>
>>>
>>
>>> CREATE owner=root group=disk mode=0660 auto=yes
>>
>>> HOMEHOST = <system>
>>
>>> MAILADDR root
>>
>>
>>
>> Why keeping a mdadm raid which incompatible binarys? Backup you data,
>>
>> install from scratch and restore your data, makes more sense to me.
>>
>>
>>
>>> Presuably is automatically detecting /dev/md0 (the raid vol)?
>>
>>>
>>
>>> Can anyone offer any opinion/advice on this?  i don't want to be in a position where i cannot get it back up.
>>
>>
>>
>> Make sure you have a working and up2date backup, a print out of your
>>
>> /etc/fstab and the contents from "cat /prod/mdstat" can be helpful as
>>
>> well if something goes wrong.
>>
>>
>>
>>> The raid is a simple mirror at the moment, but I'm guessing I cannot use it without mdadm if it did go wrong?
>>
>>
>>
>> Of course, you can boot from both disks. Just change the device name in
>>
>> your bootloader from /dev/mdX to i.e the first detected SCSI / SATA disk
>>
>> /dev/sdaX. So if you screw up one of them, boot from the other device
>>
>> and resync your data.
>>
>>
>>
>> Best
>>
>> Frank
>>
>>
>>
>>
>>
>> -- 
>>
>> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
>>
>> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>>
>> Archive: [🔎] 51054A4E.8010203@dead-link.org">http://lists.debian.org/[🔎] 51054A4E.8010203@dead-link.org


Reply to: