tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Setting up raid correctly
I have a question, how to set up raid1 correctly.
There are two storages wd0 and wd3.
Both should be partioned as gpt.
Storage wd0 will be added later to raid1 as "component".
1.) Cleaning: wd3
gpt destroy wd3
dd if=/dev/zero of=/dev/wd3d
^C11833+0 records in
11832+0 records out
6057984 bytes transferred in 4.743 secs (1277247 bytes/sec)
gpt show wd3
start size index contents
0 3907029168
2.) Init raid1:
cat /etc/raid1.conf START array #numrow physical disks 1 2 0 #Identify
physical disks START disks absent /dev/wd3d #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 raidctl -C /etc/raid1.conf raid1 label=`date
+%Y%m%d%H%M` raidctl -I $label raid1 raidctl -i raid1 Initiating
re-write of parity raidctl -s raid1 Components: component0: failed
/dev/wd3d: optimal No spares. component0 status is: failed. Skipping
label. Component label for /dev/wd3d: Row: 0, Column: 1, Num Rows: 1,
Num Columns: 2 Version: 2, Serial Number: 3732525787, 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
3.) Partition as GPT and dkctl it. After that destroy raid1 and try to
mount wd3d
gpt show raid1
start size index contents
0 3907028992
gpt create raid1
gpt show raid1
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 3907028925
3907028959 32 Sec GPT table
3907028991 1 Sec GPT header
gpt add -t ffs raid1
Partition added, use:
dkctl raid1 addwedge <wedgename> 34 3907028925 <type>
dkctl raid1 addwedge dk0 34 3907028925 ffs
dk0 created successfully.
newfs -O2 /dev/rdk0
/dev/rdk0: 1907729.0MB (3907028920 sectors) block size 32768, fragment size 4096
using 2570 cylinder groups of 742.31MB, 23754 blks, 46848 inodes.
super-block backups (for fsck_ffs -b #) at:
192, 1520448, 3040704, 4560960, 6081216, 7601472, 9121728, 10641984, 12162240,
...............................................................................
mount /dev/dk0 /mnt
df -h
Filesystem Size Used Avail %Cap Mounted on
/dev/wd2a 35G 5.0G 28G 14% /
kernfs 1.0K 1.0K 0B 100% /kern
ptyfs 1.0K 1.0K 0B 100% /dev/pts
procfs 4.0K 4.0K 0B 100% /proc
/dev/dk0 1.8T 4.0K 1.7T 0% /mnt
umount /dev/dk0
raidctl -uv raid1
gpt show wd3
start size index contents
0 3907029168
mount /dev/wd3d /mnt
mount_ffs: /dev/wd3d on /mnt: incorrect super block
I can not mount wd3d after partition and create the right ffs. Did I
something wrong?
Home |
Main Index |
Thread Index |
Old Index