Steve Terrell wrote:
> 
> Rainer Krienke wrote:
> 
> > Hello,
> >
> > in between I learned how to setup a raid1 from existing data. Now I have
> > one more question:
> 
> ---snip---
> 
> Maybe I missed a response, but perhaps you could share this with us?
> 
> --
> Steve Terrell
> Sr. Network Administrator
> Illinois Mathematics and Science Academy
> [EMAIL PROTECTED]



Well there were several replys. I thought they reached the list as well.
In case they did not:

The way this can be done is described in the Software Raid Howto
http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/ in the section about
Root filesystem on RAID.

Basically the idea is as follows. You configure a raid1 with say two
disks where one of those tow disks contains your original data. In order
not to loose the data on this disk you mark it as "failed". This can be
done in the configuration in /etc/raidtab by setting the parameter
"failed-disk" pointing to the disk in question. Take a look at this
example:

raiddev /dev/md2
          raid-level      1
          nr-raid-disks   2
          nr-spare-disks  0
          chunk-size      4
          persistent-superblock 1

          device          /dev/sdb2
          raid-disk       0

          device          /dev/sdc2
          raid-disk       1 
          failed-disk   1

The disk with the original data here is /dev/sdc2. 
It is somehow important to mark the SECOND disk as failed (so in the
example above /dev/sdc2 contains still your original data) not the first
disk. 

After you have created the configuration from above, you simply create
your raid by mkraid and make a filesystem on it. Because you marked your
data disk as "failed", it will not be touched. 

Next you mount the new raid somehwere and you mount your second "failed"
disk and copy its contens to the raid. After you have umounted the
"faulted" disk you simply add this disk to your raid which will cause a
resync. In the example above you would finally say raidhotadd /dev/md2
/dev/sdc2. 

Thats it.

Rainer. 

-- 
---------------------------------------------------------------------
Rainer Krienke                     [EMAIL PROTECTED]
Universitaet Koblenz,              http://www.uni-koblenz.de/~krienke
Rechenzentrum,                     Voice: +49 261 287 - 1312
Rheinau 1, 56075 Koblenz, Germany  Fax:   +49 261 287 - 1001312
---------------------------------------------------------------------

Reply via email to