tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Setting up raid correctly



On 24.02.2013 18:15, Manuel Bouyer wrote:
On Sun, Feb 24, 2013 at 06:23:30PM +0000, Philip Mueller wrote:
No, I think you first have to create a partition of type raid on wd3,
instead of using the whole disk. If your disk is less than 2TB, it may
be easier to use disklabel instead of gpt.

I want to use gpt, if possible, my size is 2TB
How do we create a raid partition, like:
spectre# gpt show wd3d
        start        size  index  contents
            0  3907029168
spectre# gpt create wd3d
spectre# gpt add -t gpt wd3d
usage: gpt add [-b lba] [-i index] [-s lba] [-t type] device ...
spectre# gpt add -t raid wd3d
Partition added, use:
         dkctl wd3d addwedge <wedgename> 34 3907029101 <type>
to create a wedge for it

And now should I dkctl wd3d and copy dkX in my raid1.conf or should
I use wd3d?
No, you dkctl and use dkx in your raid1.conf


spectre# dkctl wd3d delwedge dk0
spectre# dkctl wd3d addwedge dk0 34 3907029101 raid
dk0 created successfully.
spectre# vi /etc/raid1.conf
spectre# cat /etc/raid1.conf
START array
#numrow physical disks
1 2 0

#Identify physical disks
START disks
absent
/dev/dk0
#Layout ist simple 64 sectors per stripe
START layout
#Sect/StripeUnit StripeUnit/PariityiUnit Stripe/ReconUnit Raidlevel
128 1 1 1

#No spares
#START spare

#Command
START queue
fifo 100

spectre# raidctl -C /etc/raid1.conf raid1
spectre# label=`date +%Y%m%d%H%M`
spectre# raidctl -I $label raid1
spectre# raidctl -i raid1
Initiating re-write of parity
spectre# raidctl -s raid1
Components:
          component0: failed
            /dev/dk0: optimal
No spares.
component0 status is: failed.  Skipping label.
Component label for /dev/dk0:
   Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
   Version: 2, Serial Number: 3733746304, Mod Counter: 7
   Clean: No, Status: 0
   sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
   Queue size: 100, blocksize: 512, numBlocks: 3907028992
   RAID Level: 1
   Autoconfig: No
   Root partition: No
   Last configured as: raid1
Parity status: DIRTY
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
spectre# gpt show raid1
       start        size  index  contents
           0  3907028992


What is the next step?
Create gpt+ shifted partition?


Home | Main Index | Thread Index | Old Index