Re: [opensuse] Software RAID with existing drive

2007-07-11 Thread Brandon Carl

On 07/10/2007 01:35 PM, Brandon Carl wrote:
OK, I can successfully boot from either hard drive and choose the
option to boot from HDA or the RAID drive from grub.

Good.


Now what do I do from here?

First, as you seem to realize, you need to be certain your data is
synced.  Then, you will be changing the partition type on hda to linux
software raid (fd).  You can do this in Yast, System, Partitioner, which
you can then use to add the new raid partitions to your existing raid,
thus allowing for both drives to work.

I'm pretty sure the data is all copied over, but is there a way I can
be sure?

rsync  Mount the raid devices on /mnt, ie. mount /dev/md10 /mnt, then
mount /dev/md11 /mnt/home.
Then, rsync -auvzH --exclude=/proc --exclude=/sys / /mnt/ (you can add a
-n for a dry-run to check, man rsync for more info).  I think that would
do it.

You said something about using rsync, but I'm not familiar with that
tool.

It is a great tool.  Check it out.


And then, once that is done, how do I add the old drive into the
RAID array.

either using mdadm, i.e. mdadm /dev/md10 -a /dev/hdax (what ever
partition it is.), etc., for md11 or you can use Yast partitioner.  HTH.

--
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64





Hurray!!  It is working!
Finally!
I think I might create a tutorial on how to do this in case others run into 
the same situation I was in.


So, finally, is there a way I can make absolutely sure the raid array is up, 
running, and mirroring before I release this server back onto my company's 
network?


-Brandon 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-11 Thread Brandon Carl

On 07/12/2007 06:49 AM, Brandon Carl wrote:

Hurray!!  It is working!

Great!

Finally!
I think I might create a tutorial on how to do this in case others run
into the same situation I was in.

Sounds like a good idea, while it is fresh.


So, finally, is there a way I can make absolutely sure the raid array
is up, running, and mirroring before I release this server back onto
my company's network?

-Brandon

mdadm --detail /dev/md10 and mdadm --detail /dev/md11.  That will tell
you the present state.  I have now forgotten which version you were
using, but if 10.2 you can have mdadm (which you should have enabled in
the runlevel editor) email you about any status changes, like a disk
that goes offline for any reason.  You can also test to make sure Yast
Partitioner sees it all ok.  Final test is a reboot.  If it passes all
those, it is good to go.

--
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64



I am running 10.2, but how would I set it up to email me?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-11 Thread Brandon Carl

Brandon Carl wrote:

On 07/12/2007 06:49 AM, Brandon Carl wrote:

Hurray!!  It is working!

Great!

Finally!
I think I might create a tutorial on how to do this in case others run
into the same situation I was in.

Sounds like a good idea, while it is fresh.


So, finally, is there a way I can make absolutely sure the raid array
is up, running, and mirroring before I release this server back onto
my company's network?

-Brandon

mdadm --detail /dev/md10 and mdadm --detail /dev/md11.  That will tell
you the present state.  I have now forgotten which version you were
using, but if 10.2 you can have mdadm (which you should have enabled in
the runlevel editor) email you about any status changes, like a disk
that goes offline for any reason.  You can also test to make sure Yast
Partitioner sees it all ok.  Final test is a reboot.  If it passes all
those, it is good to go.

--
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64



I am running 10.2, but how would I set it up to email me?


Yast, System, etc/sysconfig Editor, System, File Systems, Mdadm,
MDADM_MAIL.  Just put in your email address.
--
Joe


Thanks, although I'm not sure if I have sendmail configured correctly.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-11 Thread Brandon Carl

Brandon Carl wrote:

On 07/12/2007 06:49 AM, Brandon Carl wrote:

Hurray!!  It is working!

Great!

Finally!
I think I might create a tutorial on how to do this in case others run
into the same situation I was in.

Sounds like a good idea, while it is fresh.


So, finally, is there a way I can make absolutely sure the raid array
is up, running, and mirroring before I release this server back onto
my company's network?

-Brandon

mdadm --detail /dev/md10 and mdadm --detail /dev/md11.  That will tell
you the present state.  I have now forgotten which version you were
using, but if 10.2 you can have mdadm (which you should have enabled in
the runlevel editor) email you about any status changes, like a disk
that goes offline for any reason.  You can also test to make sure Yast
Partitioner sees it all ok.  Final test is a reboot.  If it passes all
those, it is good to go.

--
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64



I am running 10.2, but how would I set it up to email me?


Yast, System, etc/sysconfig Editor, System, File Systems, Mdadm,
MDADM_MAIL.  Just put in your email address.
--
Joe



Nevermind, I got sendmail working.
Thanks a lot for your help!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-09 Thread Brandon Carl

On 07/09/2007 06:31 AM, Brandon Carl wrote:




That way I can boot from either the first drive, or the one-drive RAID
on the second drive.

I have run into a problem, however.  When I attempt to choose Boot
from RAID it gets to the boot commands, but it stalls at Waiting for
device /dev/md10 to appear: . not
found -- Exiting to /bin/sh.

Why is it now md10?  It should be md0, md1, md2.  What does
/etc/mdadm.conf show you?


I changed it to md10 because somehow I accidentally deleted /dev/md0,
/dev/md1, and /dev/md2, probably in an attempt to unmount them, lol.
I couldn't find a way to create them again, so I just decided to use
md10 and md11.  I can't imagine this would affect anything, however.
/etc/mdadm.conf does not exist on either drive.

OK, I think it would be helpful to create that file.  Examples are in
the man page for mdadm.  I will attach mine for reference.




Here is the contents of my fstab under the /dev/md10, in case it's
helpful:
/dev/md10/reiserfs
acl,user_xattr,usrquota,grpquota1 1
/dev/md11/homereiserfs
acl,user_xattr,usrquota,grpquota1 2
/dev/hdb5swap swap
defaults  0 0
proc /procproc
defaults  0 0
proc /procproc
defaults  0 0
sysfs/sys sysfs
noauto0 0
debugfs  /sys/kernel/debugdebugfs
noauto0 0
usbfs/proc/bus/usbusbfs
noauto0 0
devpts   /dev/pts devpts
mode=0620,gid=5   0 0
/dev/fd0 /media/floppyauto
noauto,user,sync  0 0

Is that a typo, or are you missing a comma between reiserfs and acl?  Do
you really have proc twice?  You did make sure there was a /proc and
/sys folder for mounting their respective filesystems.


I copied directly from the file, but there is a few spaces in between
the reiserfs and the acl,user...  The formatting got messed up, sorry.

I am not bothered by the formatting, but those lines options and syntax
are important.  There should NOT be spaces between the options, and
there should be a comma separating the list options.  Having 2 proc
entries will probably cause an error message.




I have decided against mirroring the swap space, and just using both
the /dev/hda5 and /dev/hdb5 as swap space, so it is doubled.

OK


Is this a wise choice?

I would say yes.  I see no need to raid swap, and making them separate
doubles swaps size, assuming the same priority.




So that is where I am stuck.  I cannot figure how to get past the
waiting for device /dev/md10 to appear...
I have tried mkinitrd and cd /mnt; chroot /mnt; mkinitrd to try
and fix it, but to no avail.

Anyone have any ideas?
Thanks for your help thus far!

Check /etc/mdadm.conf to make sure you really have such raid devices.


The file does not exist.

Create it as per man mdadm, check attachment for reference.

--
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64





OK, I can successfully boot from either hard drive and choose the option to 
boot from HDA or the RAID drive from grub.


Now what do I do from here?  I'm pretty sure the data is all copied over, 
but is there a way I can be sure?  You said something about using rsync, but 
I'm not familiar with that tool.


And then, once that is done, how do I add the old drive into the RAID 
array.


Thanks!

-Brandon Carl
[EMAIL PROTECTED]
www.spleeyah.com 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-08 Thread James Knott
Brandon Carl wrote:

 Incorrect, with RAID 1, you have two partitions, or complete drives in
 my case, that are exactly the same, both written to at the same time
 with the same data.
 If one drive fails, the other drive is there until you replace the
 hosed drive and rebuild the array by copying the data to the replacement.
 http://en.wikipedia.org/wiki/RAID1#RAID_1

 -Brandon

One thing I find annoying is that SUSE 10.2 requires a reboot to add a
removed drive back on.


-- 
Use OpenOffice.org http://www.openoffice.org
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-08 Thread Joe Morris (NTM)
On 07/08/2007 07:57 PM, James Knott wrote:
 One thing I find annoying is that SUSE 10.2 requires a reboot to add a
 removed drive back on.
If you are talking about software raid 1, that is not the case.  I have
done it without a reboot.  IIRC, I had to tell it the partition was
failed first before I could readd, but it did work.  In that situation,
I felt it was not the drive failing but either a cable or controller hiccup.

-- 
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-08 Thread James Knott
Joe Morris (NTM) wrote:
 On 07/08/2007 07:57 PM, James Knott wrote:
   
 One thing I find annoying is that SUSE 10.2 requires a reboot to add a
 removed drive back on.
 
 If you are talking about software raid 1, that is not the case.  I have
 done it without a reboot.  IIRC, I had to tell it the partition was
 failed first before I could readd, but it did work.  In that situation,
 I felt it was not the drive failing but either a cable or controller hiccup.

   
I'm running RAID 5 and if I use mdadm to remove the drive, I can add it
back in again.  However, if I physically remove the drive, even when
removed from the array with mdadm, I have to reboot to get it added back
in again.  There was some discussion about this a few weeks ago.


-- 
Use OpenOffice.org http://www.openoffice.org
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-08 Thread Brandon Carl

On 07/09/2007 05:47 AM, Brandon Carl wrote:

Well, I've gotten really far, I think.
I mounted both raid partitions and copied over everything under /
except for /sys, /mnt, and /proc

/dev/md10 (RAID1: /dev/hdb1  missing) will mount as /
/dev/md11 (RAID1: /dev/hdb3  missing) will mount as /home

I have grub installed in the MBR of both drives, so I can boot from
either.
My menu.lst is setup as so:

title Boot from Hard Drive A
   root (hd0,0)
   kernel /boot/vmlinuz root=/dev/hda1 noapic resume=/dev/hda5
splash=silent  showopts
   initrd /boot/initrd

title Boot from RAID
   root (hd1,0)
   kernel /boot/vmlinuz root=/dev/md10 noapic resume=/dev/hdb5
splash=silent  showopts
   initrd /boot/initrd

If you raided swap, resume would be /dev/md2, or whatever you swap raid
was.  Just read below, so swap, or the resume line, may be ok.


Ok.



That way I can boot from either the first drive, or the one-drive RAID
on the second drive.

I have run into a problem, however.  When I attempt to choose Boot
from RAID it gets to the boot commands, but it stalls at Waiting for
device /dev/md10 to appear: . not
found -- Exiting to /bin/sh.

Why is it now md10?  It should be md0, md1, md2.  What does
/etc/mdadm.conf show you?


I changed it to md10 because somehow I accidentally deleted /dev/md0, 
/dev/md1, and /dev/md2, probably in an attempt to unmount them, lol.  I 
couldn't find a way to create them again, so I just decided to use md10 and 
md11.  I can't imagine this would affect anything, however.

/etc/mdadm.conf does not exist on either drive.


After this I reboot my computer and choose the Boot from Hard Drive
A and then when I try to mount the /dev/md10 as /mnt it says: cannot
read superblock.  I get around this by going into the Yast
partitioner and deleting the /dev/md10 and /dev/md11 and by doing
mdadm -S /dev/md10;mdadm -S /dev/md11 as super user.  I then do
mdadm -C /dev/md10 -l raid1 -n 2 /dev/hdb1 missing; mdadm -C
/dev/md11 -l raid1 -n 2 /dev/hdb3 missing to recreate the two raid
partitions.  After that it is back to normal.

Why md10?  If it is the first md, it should be 0.


See above.



Here is the contents of my fstab under the /dev/md10, in case it's
helpful:
/dev/md10/reiserfs
acl,user_xattr,usrquota,grpquota1 1
/dev/md11/homereiserfs
acl,user_xattr,usrquota,grpquota1 2
/dev/hdb5swap swap
defaults  0 0
proc /procproc
defaults  0 0
proc /procproc
defaults  0 0
sysfs/sys sysfs
noauto0 0
debugfs  /sys/kernel/debugdebugfs
noauto0 0
usbfs/proc/bus/usbusbfs
noauto0 0
devpts   /dev/pts devpts
mode=0620,gid=5   0 0
/dev/fd0 /media/floppyauto
noauto,user,sync  0 0

Is that a typo, or are you missing a comma between reiserfs and acl?  Do
you really have proc twice?  You did make sure there was a /proc and
/sys folder for mounting their respective filesystems.


I copied directly from the file, but there is a few spaces in between the 
reiserfs and the acl,user...  The formatting got messed up, sorry.




I have decided against mirroring the swap space, and just using both
the /dev/hda5 and /dev/hdb5 as swap space, so it is doubled.

OK


Is this a wise choice?



So that is where I am stuck.  I cannot figure how to get past the
waiting for device /dev/md10 to appear...
I have tried mkinitrd and cd /mnt; chroot /mnt; mkinitrd to try
and fix it, but to no avail.

Anyone have any ideas?
Thanks for your help thus far!

Check /etc/mdadm.conf to make sure you really have such raid devices.


The file does not exist.



--
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64




-Brandon Carl 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-08 Thread Joe Morris (NTM)
On 07/08/2007 09:06 PM, James Knott wrote:
 Joe Morris (NTM) wrote:
   
 On 07/08/2007 07:57 PM, James Knott wrote:
   
 
 One thing I find annoying is that SUSE 10.2 requires a reboot to add a
 removed drive back on.
 
   
 If you are talking about software raid 1, that is not the case.  I have
 done it without a reboot.  IIRC, I had to tell it the partition was
 failed first before I could readd, but it did work.  In that situation,
 I felt it was not the drive failing but either a cable or controller hiccup.

   
 
 I'm running RAID 5 and if I use mdadm to remove the drive, I can add it
 back in again.  However, if I physically remove the drive, even when
 removed from the array with mdadm, I have to reboot to get it added back
 in again.  There was some discussion about this a few weeks ago.


   
OK, now I understand.  That doesn't really have anything to do with raid
in general, but more to do with hot pluggable disks and kernel support
for them.

-- 
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread James Tremblay
Brandon,
 I have played with software raid several times.
1) If you are looking for your whole system in a mirrored state, it's
tricky but possible.
2) if you want to  build a new mirrored /home that is easier.

1- you can do a reinstall and manually do the partitioning in yast.
you will need two equal partitions for /boot but not as mirrors the
second is a place holder for rescue and recovery, and two set up as a
linux raid for each of the sections you want mirrored, i.e, two for
swap, two for /, while remembering not to touch your current /home but
creating an equal partition for it to raid to later.  I would recommend
creating a mirrored /srv partition with as much space as you have
in /home now when the system is running you can copy your /home into the
new /srv in a folder like /srv/storage and then delete and recreate a
new linux raid partition for /home.
2- create a software raid using the free space on your current disk and
the new disk and mount it as /storage or /vol1 or 

James Tremblay
Director of Technology
Newmarket School District
Newmarket,NH
http://en.opensuse.org/Education
let's make a difference

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Brandon Carl
I've gotten to the Expert Partitioner in Yast on the install disc, but I 
don't know what to do from there.


Listed are 8 devices:

Device: /dev/mapper/sli_ahahafdeeibj
Size: 232.8 Gb
F:
Type: BIOS RAID sli_ahahafdeeibj
Mount:
Mount By:
Start: 0
End: 30400
Used By:
Label:
Device ID:
Device Path:

Device: /dev/mapper/sli_ahahafdeeibj_part1
Size: 70.5 Mb
F: F
Type: DM Raid (Ext3)
Mount: /boot
Mount By: K
Start: 1542
End: 1550
Used By:
Label:
Device ID:
Device Path:

Device: /dev/mapper/sli_ahahafdeeibj_part2
Size: 839.3 Mb
F:
Type: DM Raid
Mount:
Mount By:
Start: 1435
End: 1541
Used By:
Label:
Device ID:
Device Path:

Device:  /dev/mapper/sli_ahahafdeeibj_part3
Size: 221.0 Gb
F: F
Type: DM Raid (Ext3)
Mount: /home
Mount By: K
Start: 1551
End: 30400
Used By:
Label:
Device ID:
Device Path:

Device:  /dev/mapper/sli_ahahafdeeibj_part4
Size: 10.9 Gb
F: F
Type: DM RAID (Ext3)
Mount: /
Mount By: K
Start: 0
End: 1434
Used By:
Label:
Device ID:
Device Path:

Device:  /dev/mapper/sli_ahahafdeeibj_part5
Size: 831.4 Mb
F:
Type: DM Raid
Mount: swap
Mount By: K
Start: 1435
End: 1540
Used By:
Label:
Device ID:
Device Path:

Device: /dev/hda
Size: 232.8 Gb
F:
Type: ST3250623A
Mount:
Mount By:
Start: 0
End: 30400
Used By: RAID sli_ahahafdeeibj
Label:
Device ID: ata-ST3250623A_4ND4WY67
Device Path: pci-:00:0f.0-ide-0:0

Device: /dev/hdb
Size: 232.8 Gb
F:
Type: WDC-WD2500jB-00REA0
Mount:
Mount By:
Start: 0
End: 30400
Used By: RAID sli_ahahafdeeibj
Label:
Device ID: ata-WDC_WD2500jB-00REA0_WD-WMANK5725185
Device Path: pci-:00:0f.0-ide-0:1


The /dev/hda is the hard drive that openSUSE is currently installed on.
The /dev/hdb is the new hard drive I would like to use as a mirror.
I would like to have the entire system mirrored, but I only require the 
/home to be mirrored, because it contains all of my important data.


-Brandon Carl
[EMAIL PROTECTED]
www.spleeyah.com

- Original Message - 
From: James Tremblay [EMAIL PROTECTED]

To: Brandon Carl [EMAIL PROTECTED]
Cc: opensuse@opensuse.org
Sent: Saturday, July 07, 2007 3:54 PM
Subject: Re: [opensuse] Software RAID with existing drive



Brandon,
I have played with software raid several times.
1) If you are looking for your whole system in a mirrored state, it's
tricky but possible.
2) if you want to  build a new mirrored /home that is easier.

1- you can do a reinstall and manually do the partitioning in yast.
you will need two equal partitions for /boot but not as mirrors the
second is a place holder for rescue and recovery, and two set up as a
linux raid for each of the sections you want mirrored, i.e, two for
swap, two for /, while remembering not to touch your current /home but
creating an equal partition for it to raid to later.  I would recommend
creating a mirrored /srv partition with as much space as you have
in /home now when the system is running you can copy your /home into the
new /srv in a folder like /srv/storage and then delete and recreate a
new linux raid partition for /home.
2- create a software raid using the free space on your current disk and
the new disk and mount it as /storage or /vol1 or 

James Tremblay
Director of Technology
Newmarket School District
Newmarket,NH
http://en.opensuse.org/Education
let's make a difference





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Joe Morris (NTM)
On 07/08/2007 07:49 AM, Brandon Carl wrote:
 Device: /dev/hda
 Size: 232.8 Gb
 F:
 Type: ST3250623A
 Mount:
 Mount By:
 Start: 0
 End: 30400
 Used By: RAID sli_ahahafdeeibj
 Label:
 Device ID: ata-ST3250623A_4ND4WY67
 Device Path: pci-:00:0f.0-ide-0:0

 Device: /dev/hdb
 Size: 232.8 Gb
 F:
 Type: WDC-WD2500jB-00REA0
 Mount:
 Mount By:
 Start: 0
 End: 30400
 Used By: RAID sli_ahahafdeeibj
 Label:
 Device ID: ata-WDC_WD2500jB-00REA0_WD-WMANK5725185
 Device Path: pci-:00:0f.0-ide-0:1


 The /dev/hda is the hard drive that openSUSE is currently installed on.
 The /dev/hdb is the new hard drive I would like to use as a mirror.
 I would like to have the entire system mirrored, but I only require
 the /home to be mirrored, because it contains all of my important data.
I am not too familiar with the DM RAID, which I think is the fake raid
driver for your motherboard (or raid card IIRC from your first post). 
Assuming that is correct, I wouldn't use it.  Software raid now uses the
mdadm program instead of raidtools.  You could do this, which I am sure
would work but will take time.  You will need two drives with matching
partition sizes for each raid 1 partition.  At the point you are at, I
don't think it really matters.  If you like the partitioning scheme you
have on /dev/hda, match it on /dev/hdb.  each partition will need to be
marked as Linux Raid.  Then, you could create a raid 1 for each
partition on /dev/hdb with mdadm with only one disk initially, then
format the new raid 1 partitions, then copy from /dev/hda.  After
copying, you will need to change the partition type of each raided
partition on /dev/hda to Linux raid.  Then use mdadm to add those
partition to your raid 1 partitions from /dev/hdb.  This will sync each
one in turn.  You will then need to edit /etc/fstab to correct your
partitions, i.e /dev/hda2 / to /dev/md0 /, etc.  You should also edit
/boot/grub/menu.lst and correct as necessary (root=/dev/md0, etc), then
I would double check everything and reboot.  You may or may not need to
reinstall Grub, though I probably would via the grub command prompt to
triple check it can find everything it needs BEFORE I am booting and it
tells me it cannot find.  I have done the above, and it will work. 
It is a bit of work, and depending on data size will take a while. 
ALSO, one other thing I just thought about, you would need to add raid1
module to your initrd modules and run mkinitrd to create the raid
bootable image.  Check out
http://lists.opensuse.org/opensuse-amd64/2006-09/msg00034.html for
additional info.

-- 
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Carlos E. R.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


The Saturday 2007-07-07 at 15:02 -0700, Brandon Carl wrote:

 I recently installed a IDE RAID card (Syba Ultra ATA IDE card SILO680) in my
 linux box and mirrored one of my drives (250Gb) to another 250Gb drive. When
 this was done, I tried to boot into openSUSE 10.2 and it kept stalling at
 waiting for /dev/hda1 to appear.  I then decided to just try and boot from
 my original hard drive, and it stalled on opensuse hangs runaway loop
 modprobe binfmt-.  I thought that was very odd, so I took out the RAID
 card and tried to just boot from my one hdd, and it worked, thankfully.
 
 Now I am wondering if there is a software alternative to RAID 1 that i can use
 with my existing hard drive.  I have about 100Gb of irreplaceable data under
 the /home/spleeyah/ directory, which is on a seperate partition from the /
 directory.
 
 I would like to be able to just copy this drive over to the other one and then
 set it up as a RAID 1 configuration, but I cannot find any information about
 how to set this up using Yast or any other tools.
 I found this tutorial: http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html but
 when I try to find raidtools in my software management, it doesn't show up.
 This is an internet installation with my repository set as:
 ftp://mirrors.kernel.org/opensuse/distribution/10.2/repo/oss/.

I think you got it wrong.

To create a raid 1 setup, first you need to empty disks, or two empty 
partitions on two disks. Next you create the raid, and finally you copy 
over the data.

However, if what you have is a lot of important files, it is way safer to 
have two separate disks (better three disks), and simply copy everything 
from one to the other, then disconect (and power off) or at least umount 
the second. Notice that if on a raid setup you delete something or have a 
bad software crash both mirror copies will be damaged. Raid doesn't 
protect your valuable data from all mishaps: only a few kinds of mishaps, 
like some hardware failures.

Ie, a good backup procedure is safer than just raid.


- -- 
Cheers,
   Carlos E. R.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Made with pgp4pine 1.76

iD8DBQFGkEGetTMYHG2NR9URAvHrAKCZgFoDdMREDjgNJFmhP35OZYjsRgCfYXUF
kizCgKFd7nip8NnUHnOVsS4=
=Wolx
-END PGP SIGNATURE-

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Mike McMullin
On Sun, 2007-07-08 at 03:44 +0200, Carlos E. R. wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 
 The Saturday 2007-07-07 at 15:02 -0700, Brandon Carl wrote:
 
  I recently installed a IDE RAID card (Syba Ultra ATA IDE card SILO680) in my
  linux box and mirrored one of my drives (250Gb) to another 250Gb drive. When
  this was done, I tried to boot into openSUSE 10.2 and it kept stalling at
  waiting for /dev/hda1 to appear.  I then decided to just try and boot from
  my original hard drive, and it stalled on opensuse hangs runaway loop
  modprobe binfmt-.  I thought that was very odd, so I took out the RAID
  card and tried to just boot from my one hdd, and it worked, thankfully.
  
  Now I am wondering if there is a software alternative to RAID 1 that i can 
  use
  with my existing hard drive.  I have about 100Gb of irreplaceable data under
  the /home/spleeyah/ directory, which is on a seperate partition from the 
  /
  directory.
  
  I would like to be able to just copy this drive over to the other one and 
  then
  set it up as a RAID 1 configuration, but I cannot find any information about
  how to set this up using Yast or any other tools.
  I found this tutorial: http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html 
  but
  when I try to find raidtools in my software management, it doesn't show 
  up.
  This is an internet installation with my repository set as:
  ftp://mirrors.kernel.org/opensuse/distribution/10.2/repo/oss/.
 
 I think you got it wrong.
 
 To create a raid 1 setup, first you need to empty disks, or two empty 
 partitions on two disks. Next you create the raid, and finally you copy 
 over the data.
 
 However, if what you have is a lot of important files, it is way safer to 
 have two separate disks (better three disks), and simply copy everything 
 from one to the other, then disconect (and power off) or at least umount 
 the second. Notice that if on a raid setup you delete something or have a 
 bad software crash both mirror copies will be damaged. Raid doesn't 
 protect your valuable data from all mishaps: only a few kinds of mishaps, 
 like some hardware failures.
 
 Ie, a good backup procedure is safer than just raid.

  I've never used RAID but I was under the impression that RAID 1 and
disk failure was terminal, but the ones that use parity drives allow for
the rebuilding of the data drive if one gets hosed. 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Brandon Carl
- Original Message - 
From: Joe Morris (NTM) [EMAIL PROTECTED]

To: opensuse@opensuse.org
Sent: Saturday, July 07, 2007 5:40 PM
Subject: Re: [opensuse] Software RAID with existing drive



On 07/08/2007 07:49 AM, Brandon Carl wrote:

Device: /dev/hda
Size: 232.8 Gb
F:
Type: ST3250623A
Mount:
Mount By:
Start: 0
End: 30400
Used By: RAID sli_ahahafdeeibj
Label:
Device ID: ata-ST3250623A_4ND4WY67
Device Path: pci-:00:0f.0-ide-0:0

Device: /dev/hdb
Size: 232.8 Gb
F:
Type: WDC-WD2500jB-00REA0
Mount:
Mount By:
Start: 0
End: 30400
Used By: RAID sli_ahahafdeeibj
Label:
Device ID: ata-WDC_WD2500jB-00REA0_WD-WMANK5725185
Device Path: pci-:00:0f.0-ide-0:1


The /dev/hda is the hard drive that openSUSE is currently installed on.
The /dev/hdb is the new hard drive I would like to use as a mirror.
I would like to have the entire system mirrored, but I only require
the /home to be mirrored, because it contains all of my important data.

I am not too familiar with the DM RAID, which I think is the fake raid
driver for your motherboard (or raid card IIRC from your first post).
Assuming that is correct, I wouldn't use it.  Software raid now uses the
mdadm program instead of raidtools.  You could do this, which I am sure
would work but will take time.  You will need two drives with matching
partition sizes for each raid 1 partition.  At the point you are at, I
don't think it really matters.  If you like the partitioning scheme you
have on /dev/hda, match it on /dev/hdb.  each partition will need to be
marked as Linux Raid.  Then, you could create a raid 1 for each
partition on /dev/hdb with mdadm with only one disk initially, then
format the new raid 1 partitions, then copy from /dev/hda.  After
copying, you will need to change the partition type of each raided
partition on /dev/hda to Linux raid.  Then use mdadm to add those
partition to your raid 1 partitions from /dev/hdb.  This will sync each
one in turn.  You will then need to edit /etc/fstab to correct your
partitions, i.e /dev/hda2 / to /dev/md0 /, etc.  You should also edit
/boot/grub/menu.lst and correct as necessary (root=/dev/md0, etc), then
I would double check everything and reboot.  You may or may not need to
reinstall Grub, though I probably would via the grub command prompt to
triple check it can find everything it needs BEFORE I am booting and it
tells me it cannot find.  I have done the above, and it will work.
It is a bit of work, and depending on data size will take a while.
ALSO, one other thing I just thought about, you would need to add raid1
module to your initrd modules and run mkinitrd to create the raid
bootable image.  Check out
http://lists.opensuse.org/opensuse-amd64/2006-09/msg00034.html for
additional info.

--
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Ok, I got as far as creating a raid 1 array for each partition on /dev/hdb.

I created these:
/dev/md0  /dev/hdb1  /
/dev/md1  /dev/hdb3  /home
/dev/md2  /dev/hdb5  swap

Those were the three partitions on the /dev/hda, and they are the exact same 
size as the ones on /dev/hda, and even start and end at the same cylinders.
I didn't know what to do about the extended partition on /dev/hda which was 
used for the swap space, I assume.  I created the exact same things on 
/dev/hdb, including extended partition.


Now, I don't know what to do.  I mount the /dev/md0 as /mnt/raid0, and I can 
see all the files on it that must have been copied over when I tried the 
hardware RAID card.  It is the exact same thing as my / directory.  I 
created a new folder under / just to make sure, and it didn't show up in 
the /dev/md0, so that's good.
When I tried to mount /dev/md1 as /mnt/raid1, it gives me an error: mount: 
Operation not supported.  So I don't know what that means.
Also, it won't let me mount the /dev/md2 because it says it looks like swap 
space, which it is.


Now, I don't know how to format the new raid 1 partitions on /dev/hdb so i 
can copy my data over.


And thanks for your help, Joe.

-Brandon 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Brandon Carl
- Original Message - 
From: Mike McMullin [EMAIL PROTECTED]

To: opensuse@opensuse.org
Sent: Saturday, July 07, 2007 7:23 PM
Subject: Re: [opensuse] Software RAID with existing drive



On Sun, 2007-07-08 at 03:44 +0200, Carlos E. R. wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


The Saturday 2007-07-07 at 15:02 -0700, Brandon Carl wrote:

 I recently installed a IDE RAID card (Syba Ultra ATA IDE card SILO680) 
 in my
 linux box and mirrored one of my drives (250Gb) to another 250Gb drive. 
 When
 this was done, I tried to boot into openSUSE 10.2 and it kept stalling 
 at
 waiting for /dev/hda1 to appear.  I then decided to just try and boot 
 from

 my original hard drive, and it stalled on opensuse hangs runaway loop
 modprobe binfmt-.  I thought that was very odd, so I took out the 
 RAID

 card and tried to just boot from my one hdd, and it worked, thankfully.

 Now I am wondering if there is a software alternative to RAID 1 that i 
 can use
 with my existing hard drive.  I have about 100Gb of irreplaceable data 
 under
 the /home/spleeyah/ directory, which is on a seperate partition from 
 the /

 directory.

 I would like to be able to just copy this drive over to the other one 
 and then
 set it up as a RAID 1 configuration, but I cannot find any information 
 about

 how to set this up using Yast or any other tools.
 I found this tutorial: 
 http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html but
 when I try to find raidtools in my software management, it doesn't 
 show up.

 This is an internet installation with my repository set as:
 ftp://mirrors.kernel.org/opensuse/distribution/10.2/repo/oss/.

I think you got it wrong.

To create a raid 1 setup, first you need to empty disks, or two empty
partitions on two disks. Next you create the raid, and finally you copy
over the data.

However, if what you have is a lot of important files, it is way safer to
have two separate disks (better three disks), and simply copy everything
from one to the other, then disconect (and power off) or at least umount
the second. Notice that if on a raid setup you delete something or have a
bad software crash both mirror copies will be damaged. Raid doesn't
protect your valuable data from all mishaps: only a few kinds of mishaps,
like some hardware failures.

Ie, a good backup procedure is safer than just raid.


 I've never used RAID but I was under the impression that RAID 1 and
disk failure was terminal, but the ones that use parity drives allow for
the rebuilding of the data drive if one gets hosed.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Incorrect, with RAID 1, you have two partitions, or complete drives in my 
case, that are exactly the same, both written to at the same time with the 
same data.
If one drive fails, the other drive is there until you replace the hosed 
drive and rebuild the array by copying the data to the replacement.

http://en.wikipedia.org/wiki/RAID1#RAID_1

-Brandon

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Brandon Carl
- Original Message - 
From: Carlos E. R. [EMAIL PROTECTED]

To: OS-en opensuse@opensuse.org
Sent: Saturday, July 07, 2007 6:44 PM
Subject: Re: [opensuse] Software RAID with existing drive



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


The Saturday 2007-07-07 at 15:02 -0700, Brandon Carl wrote:

I recently installed a IDE RAID card (Syba Ultra ATA IDE card SILO680) in 
my
linux box and mirrored one of my drives (250Gb) to another 250Gb drive. 
When

this was done, I tried to boot into openSUSE 10.2 and it kept stalling at
waiting for /dev/hda1 to appear.  I then decided to just try and boot 
from

my original hard drive, and it stalled on opensuse hangs runaway loop
modprobe binfmt-.  I thought that was very odd, so I took out the 
RAID

card and tried to just boot from my one hdd, and it worked, thankfully.

Now I am wondering if there is a software alternative to RAID 1 that i 
can use
with my existing hard drive.  I have about 100Gb of irreplaceable data 
under
the /home/spleeyah/ directory, which is on a seperate partition from 
the /

directory.

I would like to be able to just copy this drive over to the other one and 
then
set it up as a RAID 1 configuration, but I cannot find any information 
about

how to set this up using Yast or any other tools.
I found this tutorial: http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html 
but
when I try to find raidtools in my software management, it doesn't show 
up.

This is an internet installation with my repository set as:
ftp://mirrors.kernel.org/opensuse/distribution/10.2/repo/oss/.


I think you got it wrong.

To create a raid 1 setup, first you need to empty disks, or two empty
partitions on two disks. Next you create the raid, and finally you copy
over the data.

However, if what you have is a lot of important files, it is way safer to
have two separate disks (better three disks), and simply copy everything
from one to the other, then disconect (and power off) or at least umount
the second. Notice that if on a raid setup you delete something or have a
bad software crash both mirror copies will be damaged. Raid doesn't
protect your valuable data from all mishaps: only a few kinds of mishaps,
like some hardware failures.

Ie, a good backup procedure is safer than just raid.


- -- 
Cheers,

  Carlos E. R.


I do have two seperate 250Gb drives that I want to be mirrored exactly.  I 
know it's no replacement for backing up data, but that's not what I'm 
concerned about.  This server is not in the coolest of environments, and I 
have a feeling the old hard drive may give out sometime soon, so I want 
another hard drive to replace that when it does happen.


I think I might have it with the mdadm commands, I'm trying right now. 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Joe Morris (NTM)
On 07/08/2007 10:27 AM, Brandon Carl wrote:
 Incorrect, with RAID 1, you have two partitions, or complete drives in
 my case, that are exactly the same, both written to at the same time
 with the same data.
 If one drive fails, the other drive is there until you replace the
 hosed drive and rebuild the array by copying the data to the replacement.
Almost correct.  At least with Linux software RAID, and I am pretty sure
with any RAID, once you replace the disk it automatically syncs the
other disk, no need to copy or format.  You do need to partition it
correctly size wise and type.

-- 
Joe Morris
Registered Linux user 231871 running openSUSE 10.2 x86_64





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse] Software RAID with existing drive

2007-07-07 Thread Fajar Priyanto
On Sunday 08 July 2007 09:25, Brandon Carl wrote:
 Ok, I got as far as creating a raid 1 array for each partition on /dev/hdb.

 I created these:
 /dev/md0  /dev/hdb1  /
 /dev/md1  /dev/hdb3  /home
 /dev/md2  /dev/hdb5  swap

Hello Brandon,
I have been following the thread. So far, the biggest problem you face is that 
software raid need to be define at the very first stage in setting up 
partition type, in this case your original harddrive's partitions are not 
setup for software raid.

You said that on the least possible solution is to get mirroring done 
for /home, so here's how it can be done:
1. If possible, back all the data in /home to another computer. If it's not 
possible, back it up to your new 250GB disk:
0. boot into init 1. And work as root. We need this because we will 
destroy /home in the process.
1a. Assuming that your /home takes 100GB, then set 2 partition in the new 
250GB disk: 1 100GB as ordinary partition, and the rest is 150GB as fd (linux 
raid auto).
1b. format the 100GB partition in the new disk, and mount it to for 
example /tmpdata
1c. copy all the data in /home to /tmpdata
1d. umount /home
2. Now you are ready to setup the raid.
2a. repartition your /home using fdisk, and change the type to fd (please make 
sure that all data has been successfully copy to /tmpdata, otherwise it's 
gone forever).
3. setup raid array. Assuming your original /home is sda2, and the new 150GB 
in the new disk is sdb2, the command is:
mdadm -C /dev/md0 -l 1 -n 2 /dev/sda2 /dev/sdb2
3a. monitor the raid building process: watch cat /proc/mdstat
3b. format it to any filesystem you want:
mkfs.ext3 /dev/md0
3c. mount /dev/md0 as /home
3d. copy all data from /tmpdata to /home
3e. make sure the ownership and permission is correct in the new /home. Use 
chown, chmod if necessary.
4. Edit /etc/fstab to reflect the new setting:
/dev/md0/home   ext3acl,user_xattr  1 2
5. Reboot to test it.
6. If all is ok, congratulations! You have mirror your /home :)
HTH,
-- 
Fajar Priyanto | Reg'd Linux User #327841 | Linux tutorial 
http://linux2.arinet.org
12:06pm up 5:03, 2.6.18.2-34-default GNU/Linux 
Let's use OpenOffice. http://www.openoffice.org


pgpcF01b77dTl.pgp
Description: PGP signature