At Wednesday, 15 December 2004, you wrote: >On Thu, 16 Dec 2004, Joao Clemente wrote: > >> Ok, Alvin, as far as I understand when you said at the top "for sanity >> ... i always fdisk the new disk to be the same as the remaining disk" >> you mean limiting it's size, as you say here at last few lines, right? > >i manually partition the new disk, because i do not trust that >the sw raid mirroring will partition the right way > >> My doubt is: If you DONT do this (and, following my steps, you CANT >> fdisk unless you power the machine first :-) what will happen then? > >you cannot fdisk once /dev/mdxxx is created > >you create the sw raid by: > fdisk /dev/hda ... > fdisk /dev/hdc ... > > ( if you do NOT partition it ... i think sw raid uses > ( the whole disk as 1 giant partiton .. i always partition it > > mdadd /dev/md0 /dev/hda1 /dev/hdc1 > mdadd /dev/md1 /dev/hda2 /dev/hdc2 > ... > > mke2fs -j /dev/md0 > mke2fs -j /dev/md1 > ... > > mount /dev/md0 / > mount /dev/md1 /home
Oh, I think I see what I am doing incorrectly, I still have mounted /dev/hda1 /home ... not /dev/md0 /home Also, my raidtab is: development:/etc# cat raidtab raiddev /dev/md0 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 chunk-size 4 persistent-superblock 1 device /dev/hda raid-disk 0 device /dev/hdc raid-disk 1 > ... > > fix /etc/mtab or wherever the equivalent file is saved > >> Supose you have your disks with 3 partitions each, {hd?1, hd?2, hda?3} >> from wich you have your 3 software raid partitions {md0, md1, md2}. > >good > >> One disk fails. You put a new one. New as "out-of-the-shop", no >> partitions, no filesystem. What happens? Will the partitions be >> generated? > >yes ... if you trust the system to do it for you > >> Or you need do setup {hdx1, hdx2, hdx3} on the new disk, >> before software raid resyncs the disks? > >i prefer to manually fdisk the new disk so that i dont count >on the sw code to do it right or wrong > >> Or this is not the way to do it? > >trail and error ... > >i've never had a problem when i fdisk it manually first >and it also tells me i can write the disk, at least partition it > >> From what I remember reading, HW RAID handles "disks", SW RAID handles >> "partitions". > >i think you can make /dev/hda1 and /dev/hdc1 as one "whole disk" > >even "hw raid" will have at least one partition > >if you use oracle .. they will use raw disks .. no partitions > >> If you replace a disk in a HW RAID, the new disk will be >> copied and be equal to the older ones. > >not necessarily... > >but than again, most people do not mix and match different sized >disks when replacing the dead one > >and in sw raid .. you can have the dead 40GB disks replaced by >a 300GB disks and everythign will still work properly > and have a spare (unused) 260GB on the new disk > >> Mapping this to SW RAID makes the >> sentence like this: "If you replace a PARTITION in a SW RAID, the new >> PARTITION will be copied and be equal to the older ones". > >for the mirrored and used portion of the raid .. > >> So what >> happens if the disk has no partitions? > >sw raid will partition the new disk for you >and format it and merge it into the raid array and sync >the data onto the new disk > >c ya >alvin > >-- ---------------------------------------------------------------------- Zero Crossings, Inc. -- Embedded and Digital Signal Processing Systems http://www.zerocrossings.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]