FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-05-2010, 12:27 PM
Reiner Buehl
 
Default Use RAID1 mirror as backup during dist-upgrade?

Hi all,

I have a Debian Etch system that runs on a RAID 1 software raid system.
now I would like to upgrade it to Lenny by splitting the mirror off and
keep one mirror as a backup. Alternatively I could add a third disk as a
second mirror and split off this one.
If the upgrade works, I then add in the old disk again. If it fails I'd
like to be able to rebuild the array using the OLD mirror that I kept.
Does anybody have a more detailed description on how to do this? I know
I can fail a drive with mdadm, but my understanding is that the data on
this this drive can't then be used again after that. Is that correct or
can the bad upgrade disk be failed and then the old disk un-failed? How
would I tell the system which disk to use? What preparation steps are
necessary other than making both/all mirrors bootable?


Best regards,
Reiner.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-05-2010, 01:03 PM
Stan Hoeppner
 
Default Use RAID1 mirror as backup during dist-upgrade?

Reiner Buehl put forth on 1/5/2010 7:27 AM:
> Hi all,
>
> I have a Debian Etch system that runs on a RAID 1 software raid system.
> now I would like to upgrade it to Lenny by splitting the mirror off and
> keep one mirror as a backup. Alternatively I could add a third disk as a
> second mirror and split off this one.
> If the upgrade works, I then add in the old disk again. If it fails I'd
> like to be able to rebuild the array using the OLD mirror that I kept.
> Does anybody have a more detailed description on how to do this? I know
> I can fail a drive with mdadm, but my understanding is that the data on
> this this drive can't then be used again after that. Is that correct or
> can the bad upgrade disk be failed and then the old disk un-failed? How
> would I tell the system which disk to use? What preparation steps are
> necessary other than making both/all mirrors bootable?

The purpose of RAID implementations is to

A. Prevent data loss due to disk failure
B. In some cases increase disk I/O throughput

RAID was never intended as a file backup mechanism, which it seems is what you
are wanting to use it for in this instance. Tape, eSATA/USB/firewire disk,
CD/DVD-R, Magneto Optical, USB stick, and other such devices are meant for this
task, along with tar'ing files to remote network storage via ftp/nfs/cifs.

You're standing on the edge of the earth with this method. I'd dare say few
people have stood where you are standing now. You may well be better off using
a more traditional and proven method, instead of trying to take the "easy" way
out.

--
Stan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-05-2010, 01:40 PM
Chris Davies
 
Default Use RAID1 mirror as backup during dist-upgrade?

Reiner Buehl <reiner@buehl.net> wrote:
> I have a Debian Etch system that runs on a RAID 1 software raid system.
> now I would like to upgrade it to Lenny by splitting the mirror off and
> keep one mirror as a backup. Alternatively I could add a third disk as a
> second mirror and split off this one.
> If the upgrade works, I then add in the old disk again. If it fails I'd
> like to be able to rebuild the array using the OLD mirror that I kept.

Pretty reasonable.


> Does anybody have a more detailed description on how to do this? I know
> I can fail a drive with mdadm, but my understanding is that the data on
> this this drive can't then be used again after that.

I don't have details to hand but the general principles may help. Be
aware that this is from memory, although I have successfully done it.

Preparation...
* When you fail the mirror, do it in single-user mode after a sync
* Note which physical disk is live (eg /dev/sdl) and failed (sdf)
* Boot your rescue CD and ensure you can differentiate sdl and sdf
* BACKUP your system. Or at the very least, the important bits

Installation...
* Fail the mirror (/dev/sdl == live, sdf == failed)
* Use mdadm to zero the RAID superblock on sdf ONLY
* Trash/upgrade/reinstall using RAID on /dev/sdl. Ignore sdf
* When you're happy, bring in sdf (possibly with --force)

If it all goes badly...
* Boot from the rescue CD
* Use mdadm to zero the RAID superblocks on sdl AND sdf
* Use mdadm to create a RAID1 wrapper around sdf
* Bring in sdl as a new disk for the RAID1 array
* Update fstab, menu.lst, etc. to reference the new /dev/md* device

Chris


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-05-2010, 01:55 PM
Scott Gifford
 
Default Use RAID1 mirror as backup during dist-upgrade?

Reiner Buehl <reiner@buehl.net> writes:

> I have a Debian Etch system that runs on a RAID 1 software raid
> system. now I would like to upgrade it to Lenny by splitting the
> mirror off and keep one mirror as a backup.

Hello Reiner,

I do exactly this when I upgrade a system. I simply disconnect the
drive I'd like to remain as a backup. When I am satisfied that
everything is working, I shut the system down, reconnect the drive in
a way that ensures the system will boot from the upgraded drive, then
reboot and use mdadm to restart the mirror (if they are hot-swap
drives the same applies, but you don't need to shut the machine down
to put the drive back in). If I need to revert to the backup, do the
same thing but make sure the backup drive is the boot drive.

Many systems let you choose which drive to boot from in the BIOS;
those that don't will generally give priority to the first drive on
the first controller of the system.

If I have spare drives, sometimes I will save the old drive as a
long-term backup and put a new drive in. Then I can stick that in a
USB enclosure to get data from it. I have never ended up using the
data, though; the upgrades have either worked completely or not at
all.

Hope this helps!

----Scott.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-08-2010, 01:43 AM
martin f krafft
 
Default Use RAID1 mirror as backup during dist-upgrade?

also sprach Reiner Buehl <reiner@buehl.net> [2010.01.06.0227 +1300]:
> Does anybody have a more detailed description on how to do this?

If you come across one, please submit it as a bug report against the
mdadm package.

> I know I can fail a drive with mdadm, but my understanding is that
> the data on this this drive can't then be used again after that.

You just can't write to both copies, but you can use this method to
create clones.

> Is that correct or can the bad upgrade disk be failed and then the
> old disk un-failed? How would I tell the system which disk to use?
> What preparation steps are necessary other than making both/all
> mirrors bootable?

Use grub-pc.

--
.'`. martin f. krafft <madduck@d.o> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems

"the college students who are using lsd and marijuana today do not
comprise a criminal class. they are not drug addicts seeking to
escape. they're your best educated, your most creative, and your
most couragious, young people. and like it or not, they might build
you a new civilisation." -- porcupine tree, voyage 34
 

Thread Tools




All times are GMT. The time now is 08:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org