Hi,
Today I tried to create different raid devices for different partitions. It works
perfectly but
only under certain circumstances.
My /etc/raidtab file is as follows :
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/sda5
raid-disk 0
device /dev/sdb5
raid-disk 1
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/sda6
raid-disk 0
device /dev/sdb6
raid-disk 1
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/sda7
raid-disk 0
device /dev/sdb7
raid-disk 1
raiddev /dev/md3
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/sda9
raid-disk 0
device /dev/sdb9
raid-disk 1
raiddev /dev/md4
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/sda11
raid-disk 0
device /dev/sdb11
raid-disk 1
My partitions are as follows :
sda5 - /home to be mirrored to - sdb5
sda6 - /usr to be mirrored to - sdb6
sda7 - /opt to be mirrored to - sdb7
sda9 - /tmp to be mirrored to - sdb9
sda11 - /var to be mirrored to - sdb11
Now since all the above partitions are mounted on sda, when I try to do mkraid /dev/md0
it gives me error that sda5 is mounted and hence mkraid fails. Then I tried to unmount
/home i.e. /dev/sda5 and then tried with mkraid /dev/md0. Now it works perfectly.
Everything from /home got mirrored on /dev/sdb5. Fine. Same thing I repeated for all
the partitions in single user mode since some partitions such as /usr etc. cannot be
unmounted(unless in single user mode). But after doing all the above stuff I added the
following to /etc/rc.d/rc.local file :
raidstart /dev/md0
raidstart /dev/md1
raidstart /dev/md2
raidstart /dev/md3
raidstart /dev/md4
But raid does not start and it gives me the following error :
<SNIP>
cannot import sda5, has active inodes!
could not import sda5!
autostart sda5 failed!
<SNIP>
This error repeats for all the above partitions. However after booting if I unmount
say /home and then give raidstart /dev/md0 than everything works fine.
What I have to do to start raid ? Any suggestions.
Thanks for your patient reading. Hope I have made clear my problem.
Thanks again.
Regards
Rajesh
Nick Hill saw fit to inform LI that:
>
>> Rajesh Fowkar wrote:
>> >
>> > Hi,
>> >
>> > I have got say 6 partitions on sda.
>> > I have created 6 partitions on sdb of equal size.
>> >
>> > My /etc/raidtab file is as follows :
>> >
>> > raiddev /dev/md0
>> > raid-level 1
>
>RAID-1 _is_ mirroring and that's what u're getting. It
>will mirror the _same_ data on to all the partitions
>assigned. And the final size of the raid partition
>created (/dev/md0 in u're case) will be the size of
>the lowest sized partition among the partition cluster
>u've assigned to be mirrored, as all the data cannot
>be mirrored equally on to all the partitions if
>they're of different sizes... If u want to use all of
>u're 9 GB, go for striping. RAID-0 will do, for most
>cases, unless u're too wary of u're data, then u may
>consider RAID-5, but u'll some space because of the
>parity data involved, but u'll get excellent recovery
>of data in cases of failure...
>
>Nikhil.
--
Rajesh(ALIAS Shriram) Fowkar
--------------------------------------------------------------------------------
How I Configured my SiS6215 Card ?Visit:http://rajesh.computers.webjump.com/
Web Site : http://rajesh.computers.webjump.com/ Email :[EMAIL PROTECTED]
Address : KURTARKAR NAGARI, BLDG-C, FLAT NO. T4, THIRD FLOOR, SHANTINAGAR,
PONDA - GOA. (INDIA) PHONE : (0832)315932
Do not dwell in the past, do not dream of the future, concentrate the mind
on the present moment. - Buddha
Scandisk is now checking your hard disk. You can start praying. - Anon. :-)
---------------------------------------------------------------------------------
----------------------------------------------
An alpha version of a web based tool to manage
your subscription with this mailing list is at
http://lists.linux-india.org/cgi-bin/mj_wwwusr