Leandro et al,

THANKS!! normally i don't type in caps, but this was so amazingly helpful
that i can't help it.

i followed your instructions nearly step for step and i now have

Personalities : [linear] [raid0] [raid1] [raid5] 
read_ahead 1024 sectors
md3 : active raid1 sda7[1] sdb7[0] 530048 blocks [2/2] [UU]
md0 : active raid1 sda2[1] sdb2[0] 104320 blocks [2/2] [UU]
md1 : active raid1 sda3[1] sdb3[0] 530048 blocks [2/2] [UU]
md2 : active raid1 sda5[1] sdb5[0] 1052160 blocks [2/2] [UU]
md4 : active raid1 sda8[1] sdb8[0] 6409792 blocks [2/2] [UU]
unused devices: <none>

it's all working!

the only part i got lost on was part f with editing lilo.conf

i think i might rewrite the method2 and submit it to jakob for inclusion
in the faq.

thanks again,
jon

-- 
Jonathan Nathan
Web Systems Engineer, CAIS Internet
[EMAIL PROTECTED]

On Fri, 17 Sep 1999, Leandro Dybal Bertoni wrote:

> Jonathan Nathan wrote:
> 
> > now, i'm at the point in the howto where it says:
> > 
> > (method 2)
> > Now, set up the RAID with your current root-device as the failed-disk in
> > the raidtab file. Don't put the failed-disk as the first disk in the
> > raidtab, that will give you problems with starting the RAID. Create the
> > RAID, and put a filesystem on it.
> > 
> > my question is, how do i create a raid device (/dev/md3 for example) and
> > then put a filesystem on it without losing the current data?
> > 
> > i tested this with my /dev/md3, which would be /home.  i unmounted it,
> > mkfs /dev/md3, then remounted it, and teh data was gone (not a big deal,
> > nothing of importance).
> > 
> > this is my /proc/mdstat :
> > 
> > Personalities : [linear] [raid0] [raid1] [raid5]
> > read_ahead 1024 sectors
> > md0 : active raid1 sdb2[0] 104320 blocks [2/1] [U_]
> > md1 : active raid1 sdb3[0] 530048 blocks [2/1] [U_]
> > md2 : active raid1 sdb5[0] 1052160 blocks [2/1] [U_]
> > md3 : active raid1 sdb7[0] 530048 blocks [2/1] [U_]
> > md4 : active raid1 sdb8[0] 6409792 blocks [2/1] [U_]
> > unused devices: <none>
> > 
> > so the md devices are all created and in degraded mode [U_] .
> > 
> > i want to mount the devices, but the system complains that it can't find a
> > valid filesystem on it.  but i can't create a valid filesystem without
> > destroying the current data.  i must be missing something..
> > 
> > thanks again to all.
> > 
> 
> This is what I usually do:
> 
> a) Make the raid devices
> 
> mkraid /dev/md*
> 
> You might have to use the --force option if mkraid thinks these
> partitions are already part of a raid device (they have a raid
> superblock) or have a filesystem
> 
> You already did this.
> 
> b) Make a filesystem in the raid devices
> 
> mke2fs -c -b <your block size> -R stride=<your chunk size / your block
> size> /dev/md*
> 
> This will destroy the data in the /dev/sdb* partitions (in your case),
> but I assume your valuable data is in /dev/sda
> 
> c) mount the raid devices
> 
> d) copy your data from the /dev/sda* partitions to the raid devices
> (ensure the mount points to other filesystems are created in your future
> / device)
> 
> e) if you /dev/sdb* partitions aren't already type 'fd', then run fdisk
> and change their type to that (I neve stoped the arrays to do that, I
> guess the warning about fdisk'ing disks with active arrays is about
> changing the actual partition sizes, not type) so the kernel can
> reconize them as raid partitions at boot time
> 
> f) if you plan to put / in a raid, edit your lilo.conf and put another
> boot option with root=/dev/md<your / device> and run lilo; edit yout
> fstab in your future / raid device so that when it's time to mount /
> read-write it will mount your raid device and not the old partiotin on
> /dev/sda
> (warnig: your /boot must not be in a raid device; warnign2: make a boot
> floppy!)
> 
> g) unmount your raid devices and reboot
> 
> h) if all goes well you should be running raid devices in degraded mode;
> fdisk again changing the /decv/sda* partition's types to 'fd'
> 
> i) run 
> 
> raidhotadd /dev/md* /dev/sda*
> 
> to add your /dev/sda partitions into the arrays.
> 
> Good luck
> 
> Leandro
> 


Reply via email to