Unix Technical Forum

Raid1 in a existing system

This is a discussion on Raid1 in a existing system within the Linux Operating System forums, part of the Unix Operating Systems category; --> Hello everyone, I am running a Redhat9 with a 36gb scsi HD and I need to install a mirror ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 07:45 PM
Alvaro Melo
 
Posts: n/a
Default Raid1 in a existing system

Hello everyone,
I am running a Redhat9 with a 36gb scsi HD and I need to install a
mirror HD on it (raid1). I think raidtools will work for me, but I
have a question in how to setup it up.

I Already purchased a identical HD and physically installed it. Also,
I already install the raidtools software on my machine.

In all "how-to" I have seen so far, they only show how to setup
raidtools with new hard drives (which are not in production and with
any data).

What I need to know is: How to add the mirror drive in a HD already in
production and with critical data?


My hardrive with the data and OS is

[root@localhost root]# df
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 33G 21G 11G 66% /
/dev/sda1 99M 15M 80M 16% /boot
none 251M 0 251M 0% /dev/shm

The mirror hardrive is

[root@localhost root]# df /dev/sdb
Filesystem Size Used Avail Use% Mounted on
/dev/sdb 33G 21G 11G 66%


Base in what I read, that's how my raidtools looks like
/etc/raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1

Is it correct ?

If so, when I try to start the raid, I have this message:


[root@localhost /]# mkraid /dev/md0
handling MD device /dev/md0
analyzing super-block
disk 0: /dev/sda1, 104391kB, raid superblock at 104320kB
/dev/sda1 is mounted
mkraid: aborted.
(In addition to the above messages, see the syslog and /proc/mdstat as
well
for potential clues.)

I claims my HD is mounted, But how Can I umount my main hardrive, if
the system is on it?



Thanks for any help you guys can provide.
Alvaro Melo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 07:45 PM
Michael Heiming
 
Posts: n/a
Default Re: Raid1 in a existing system

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

Alvaro Melo <alvaro_melo@yahoo.com> wrote:
> Hello everyone,
> I am running a Redhat9 with a 36gb scsi HD and I need to install a
> mirror HD on it (raid1). I think raidtools will work for me, but I
> have a question in how to setup it up.


> I Already purchased a identical HD and physically installed it. Also,
> I already install the raidtools software on my machine.


> In all "how-to" I have seen so far, they only show how to setup
> raidtools with new hard drives (which are not in production and with
> any data).


[..]

> I claims my HD is mounted, But how Can I umount my main hardrive, if
> the system is on it?


You need one disk more, setup/initialize the raid set, copy your
system over, edit fstab and rerun lilo, it would be a good idea to
do this from single user mode, or even from a rescue system,
depending on what there's running on the system.

AFAIR you can't setup sw raid without loosing all data on your
disks.

Good luck

--
Michael Heiming (GPG-Key ID: 0xEDD27B94)

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of spam.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAfCX8AkPEju3Se5QRAvr1AJ4szE9eHq1V/BOK6SyEhHlP2UchSACfVMEY
m/0OUErumIZOaaeX6q+D7D0=
=8a0V
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-17-2008, 07:45 PM
Michael Buchenrieder
 
Posts: n/a
Default Re: Raid1 in a existing system

alvaro_melo@yahoo.com (Alvaro Melo) writes:

>Hello everyone,
>I am running a Redhat9 with a 36gb scsi HD and I need to install a
>mirror HD on it (raid1). I think raidtools will work for me, but I
>have a question in how to setup it up.


>I Already purchased a identical HD and physically installed it. Also,
>I already install the raidtools software on my machine.


>In all "how-to" I have seen so far, they only show how to setup
>raidtools with new hard drives (which are not in production and with
>any data).


No. Please read the Software-RAID-HOWTO; it specifically explains
how to setup a SW-RAID on an already existing filesystem.

>What I need to know is: How to add the mirror drive in a HD already in
>production and with critical data?


[...]

By marking the _existing_ disk in /etc/raidtab as failed, copying the
contents over onto the newly installed RAID that will then be running
in degraded mode (at that time), and re-adding the old disk using
raidhotadd.

WARNING: Don't try that without having a backup ready. If you mess
things up, all existing data will be lost.

Sidenote: I wouldn't bother booting off of the RAID; instead, keep
the / and /boot filesystem on separate partitions, and run rsync
on a regular base.

Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:32 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com