find instances with slaves stuck in WFConnection
[gnt-info] / doc / megaraid-to-md.txt
index 7190f8b..3535644 100644 (file)
@@ -1,5 +1,53 @@
 In our testing, md raid10 is about 30% faster than megaraid's internal raid10.
 
+First, let's test original configuration. It 6*1T disks and one SSD before and after bios update.
+
+root@lib24:~# lsblk --scsi -m
+NAME HCTL       TYPE VENDOR   MODEL             REV TRAN NAME   SIZE OWNER GROUP MODE
+sdb  0:0:7:0    disk ATA      INTEL SSDSC2BW24 DC32      sdb  223.6G root  disk  brw-rw----
+sdc  0:2:0:0    disk DELL     PERC H310        2.12      sdc    2.7T root  disk  brw-rw----
+
+root@lib24:~# dmidecode | grep 'BIOS Rev'
+        BIOS Revision: 2.5
+
+root@lib24:~# hdparm -tT /dev/sd[bc]
+
+/dev/sdb:
+ Timing cached reads:   13750 MB in  2.00 seconds = 6890.40 MB/sec
+ Timing buffered disk reads: 950 MB in  3.00 seconds = 316.44 MB/sec
+
+/dev/sdc:
+ Timing cached reads:   13304 MB in  1.99 seconds = 6670.01 MB/sec
+ Timing buffered disk reads: 1332 MB in  3.00 seconds = 443.81 MB/sec
+
+
+
+root@lib24:~# dmidecode | grep 'BIOS Rev'
+        BIOS Revision: 2.7
+root@lib24:~# lsblk --scsi -m
+NAME HCTL       TYPE VENDOR   MODEL             REV TRAN NAME   SIZE OWNER GROUP MODE
+sda  0:0:6:0    disk ATA      WDC WD1002FBYS-1 0C12      sda  931.5G root  disk  brw-rw----
+sdb  0:0:7:0    disk ATA      INTEL SSDSC2BW24 DC32      sdb  223.6G root  disk  brw-rw----
+sdc  0:2:0:0    disk DELL     PERC H310        2.12      sdc    2.7T root  disk  brw-rw----
+root@lib24:~# hdparm -tT /dev/sd[abc]
+
+/dev/sda:
+ Timing cached reads:   13960 MB in  1.99 seconds = 7002.59 MB/sec
+ Timing buffered disk reads: 320 MB in  3.00 seconds = 106.57 MB/sec
+
+/dev/sdb:
+ Timing cached reads:   14004 MB in  1.99 seconds = 7024.47 MB/sec
+ Timing buffered disk reads: 962 MB in  3.00 seconds = 320.66 MB/sec
+
+/dev/sdc:
+ Timing cached reads:   13920 MB in  1.99 seconds = 6981.76 MB/sec
+ Timing buffered disk reads: 1356 MB in  3.00 seconds = 451.81 MB/sec
+
+
+
+
+
+
 Here are steps to replace hardware megaraid with software md5 on ganeti.
 
 
@@ -85,6 +133,32 @@ Adapter: 0: EnclId-32 SlotId-6 state changed to JBOD.
 Exit Code: 0x00
 
 
+Let's now wipe disks which where detected as bcache:
+
+root@lib24:~# dmesg | grep register_bdev
+[    4.941396] bcache: register_bdev() registered backing device sdc
+[  496.314350] bcache: register_bdev() registered backing device sdc
+[  510.221356] bcache: register_bdev() registered backing device sdd
+
+root@lib24:~# wipefs /dev/sd[cd]
+offset               type
+----------------------------------------------------------------
+0x1018               bcache   [other]
+                     UUID:  08a9ea8e-0a25-4efd-9075-8966c0d1fb00
+
+offset               type
+----------------------------------------------------------------
+0x1018               bcache   [other]
+                     UUID:  08a9ea8e-0a25-4efd-9075-8966c0d1fb00
+
+
+If there are partition tables on disks, they should be wiped with wipefs -a /dev/drive
+
+It's probably a good idea to reboot here so that linux kernel can re-numerate disks.
+
+
+
+
 root@lib28:~# lsblk --scsi -m
 NAME HCTL       TYPE VENDOR   MODEL             REV TRAN NAME   SIZE OWNER GROUP MODE
 sda  0:0:7:0    disk ATA      INTEL SSDSC2BW24 DC32      sda  223.6G root  disk  brw-rw----
@@ -96,6 +170,9 @@ sdf  0:0:4:0    disk ATA      ST1000NM0033-9ZM GA0A      sdf  931.5G root  disk
 sdg  0:0:5:0    disk ATA      ST1000NM0033-9ZM GA0A      sdg  931.5G root  disk  brw-rw----
 sdh  0:0:6:0    disk ATA      ST1000NM0033-9ZM GA0A      sdh  931.5G root  disk  brw-rw----
 
+
+If you didn't wipe old bcache data you might get error when creating array:
+
 root@lib28:~# mdadm --create /dev/md0 --level=10 --raid-devices=7 /dev/sd{b,c,d,e,f,g,h}
 mdadm: cannot open /dev/sdb: Device or resource busy
 root@lib28:~# lsblk 
@@ -177,6 +254,7 @@ root@lib28:~# hdparm -Tt /dev/sdh /dev/sda /dev/md0
  Timing buffered disk reads: 1888 MB in  3.01 seconds = 628.05 MB/sec
 
 
+Now we need to create new backing block device for bcache:
 
 root@lib28:~# cat /proc/mdstat 
 Personalities : [raid10] [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] 
@@ -201,6 +279,12 @@ cset.uuid               4a61e966-f18d-4fab-836a-3ff027963781
 root@lib28:~# echo 4a61e966-f18d-4fab-836a-3ff027963781 > /sys/block/bcache0/bcache/attach 
 [Thu Sep 20 14:18:08 2018] bcache: bch_cached_dev_attach() Caching md127 as bcache0 on set 4a61e966-f18d-4fab-836a-3ff027963781
 
+Same as one-liner for easier copy/paste:
+
+root@lib30:/srv/gnt-info# bcache-super-show /dev/sdh3 | grep cset.uuid | awk '{ print $2 }' > /sys/block/bcache0/bcache/attach
+[Mon Sep 24 09:38:35 2018] bcache: bch_cached_dev_attach() Caching md0 as bcache0 on set b8b500d6-b933-428b-a040-5fb0b2cbef49
+
+
 
 Verify that bcache is active (values should NOT be all zeros if it's working):