Difference between revisions of "Add a new RAID array to m2 using storcli64"
From AN!Wiki
Line 7: | Line 7: | ||
{{note|1=Physically install the disks into the nodes before proceeding.}} | {{note|1=Physically install the disks into the nodes before proceeding.}} | ||
+ | = Finding the Disks = | ||
+ | {{note|1=This assumes the controller ID is '<span class="code">0</span>'.}} | ||
+ | |||
+ | The newly added disks will be in the state <span class="code">UGood</span>. We can use this to list their enclosure and slot numbers; | ||
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
+ | storcli64 /c0 /eall /sall show all | grep UGood | grep -v '|' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
+ | 8:6 21 UGood - 446.625 GB SATA SSD N N 512B SAMSUNG MZ7KH480HAHQ-00005 U | ||
+ | 8:7 22 UGood - 446.625 GB SATA SSD N N 512B SAMSUNG MZ7KH480HAHQ-00005 U | ||
+ | 8:8 19 UGood - 446.625 GB SATA SSD N N 512B SAMSUNG MZ7KH480HAHQ-00005 U | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | Here we see the three drives in positions <span class="code">8:6</span>, <span class="code">8:7</span>, and <span class="code">8:8</span>. | ||
+ | |||
+ | We want to create a RAID level 5 array, which <span class="code">storcli64</span> takes as <span class="code">r5</span> or <span class="code">RAID5</span>. Knowing this, the command to create the array is: | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | storcli64 /c0 add vd type=r5 drives=8:6-8 | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="text"> | ||
+ | Controller = 0 | ||
+ | Status = Success | ||
+ | Description = Add VD Succeeded | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | |||
+ | <span class="code"></span> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="text"> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == RAW == | ||
+ | |||
+ | <syntaxhighlight lang="text"> | ||
+ | [root@nr-a04n02 ~]# storcli64 /c0 /vall show all | grep -B2 -A1 RAID5 | ||
+ | DG/VD TYPE State Access Consist Cache Cac sCC Size Name | ||
+ | -------------------------------------------------------------- | ||
+ | 1/0 RAID5 Optl RW No RWBD - OFF 893.25 GB | ||
+ | -------------------------------------------------------------- | ||
+ | -- | ||
+ | DG/VD TYPE State Access Consist Cache Cac sCC Size Name | ||
+ | ------------------------------------------------------------- | ||
+ | 0/1 RAID5 Optl RW Yes RWBC - OFF 1.361 TB | ||
+ | ------------------------------------------------------------- | ||
+ | [root@nr-a04n02 ~]# storcli64 /c0 /v0 set pdcache=on | ||
+ | Controller = 0 | ||
+ | Status = Success | ||
+ | Description = None | ||
+ | |||
+ | Detailed Status : | ||
+ | =============== | ||
+ | |||
+ | --------------------------------------- | ||
+ | VD Property Value Status ErrCd ErrMsg | ||
+ | --------------------------------------- | ||
+ | 0 PdCac On Success 0 - | ||
+ | --------------------------------------- | ||
+ | |||
+ | |||
+ | [root@nr-a04n02 ~]# | ||
+ | [root@nr-a04n02 ~]# storcli64 /c0 /v0 set iopolicy=cached | ||
+ | Controller = 0 | ||
+ | Status = Success | ||
+ | Description = None | ||
+ | |||
+ | Detailed Status : | ||
+ | =============== | ||
+ | |||
+ | ---------------------------------------- | ||
+ | VD Property Value Status ErrCd ErrMsg | ||
+ | ---------------------------------------- | ||
+ | 0 IoPolicy Cached Success 0 - | ||
+ | ---------------------------------------- | ||
+ | |||
+ | |||
+ | [root@nr-a04n02 ~]# | ||
+ | [root@nr-a04n02 ~]# storcli64 /c0 /v0 set bootdrive=off | ||
+ | Controller = 0 | ||
+ | Status = Success | ||
+ | Description = None | ||
+ | |||
+ | Detailed Status : | ||
+ | =============== | ||
+ | |||
+ | ----------------------------------------- | ||
+ | VD Property Value Status ErrCd ErrMsg | ||
+ | ----------------------------------------- | ||
+ | 0 Boot Drive Off Success 0 - | ||
+ | ----------------------------------------- | ||
+ | |||
+ | |||
+ | [root@nr-a04n02 ~]# | ||
+ | [root@nr-a04n02 ~]# storcli64 /c0 /v1 set bootdrive=on | ||
+ | Controller = 0 | ||
+ | Status = Success | ||
+ | Description = None | ||
+ | |||
+ | Detailed Status : | ||
+ | =============== | ||
+ | |||
+ | ----------------------------------------- | ||
+ | VD Property Value Status ErrCd ErrMsg | ||
+ | ----------------------------------------- | ||
+ | 1 Boot Drive On Success 0 - | ||
+ | ----------------------------------------- | ||
+ | |||
+ | ------------------ | ||
+ | |||
+ | [root@nr-a04n02 ~]# parted -a opt /dev/sdb | ||
+ | GNU Parted 2.1 | ||
+ | Using /dev/sdb | ||
+ | Welcome to GNU Parted! Type 'help' to view a list of commands. | ||
+ | (parted) mklabel gpt | ||
+ | (parted) mkpart primary 0% 100% | ||
+ | (parted) print free | ||
+ | Model: FTS PRAID EP420i (scsi) | ||
+ | Disk /dev/sdb: 959GB | ||
+ | Sector size (logical/physical): 512B/4096B | ||
+ | Partition Table: gpt | ||
+ | |||
+ | Number Start End Size File system Name Flags | ||
+ | 17.4kB 1049kB 1031kB Free Space | ||
+ | 1 1049kB 959GB 959GB primary | ||
+ | 959GB 959GB 1032kB Free Space | ||
+ | |||
+ | (parted) q | ||
+ | Information: You may need to update /etc/fstab. | ||
+ | |||
+ | [root@nr-a04n02 ~]# drbdadm create-md r1 | ||
+ | initializing activity log | ||
+ | initializing bitmap (28584 KB) to all zero | ||
+ | ioctl(/dev/sdb1, BLKZEROOUT, [959088480256, 29270016]) failed: Inappropriate ioctl for device | ||
+ | Using slow(er) fallback. | ||
+ | 100% | ||
+ | Writing meta data... | ||
+ | New drbd meta data block successfully created. | ||
+ | success | ||
+ | [root@nr-a04n02 ~]# drbdadm up r1 | ||
+ | |||
+ | |||
+ | [root@nr-a04n01 drbd.d]# drbdadm primary r1 --force | ||
+ | [root@nr-a04n01 drbd.d]# | ||
+ | |||
+ | |||
+ | GIT-hash: d232dfd1701f911288729c9144056bd21856e6f6 README.md build by root@rhel6-builder-production.alteeve.ca, 2020-01-28 00:30:13 | ||
+ | 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----- | ||
+ | ns:40679264 nr:1332 dw:40680564 dr:9570892 al:2445 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:0 | ||
+ | 1: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r---n- | ||
+ | ns:15346440 nr:0 dw:0 dr:15353752 al:8 bm:0 lo:0 pe:15 ua:26 ap:0 ep:1 wo:d oos:921266996 | ||
+ | [>....................] sync'ed: 1.7% (899672/914656)M | ||
+ | finish: 2:10:23 speed: 117,744 (111,180) K/sec | ||
+ | |||
+ | |||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
{{footer}} | {{footer}} |
Revision as of 23:03, 10 July 2020
AN!Wiki :: How To :: Add a new RAID array to m2 using storcli64 |
This tutorial is designed to walk you through adding a new bank of drives as a RAID array, and then using those to create a new DRBD-backed volume group for hosting servers.
In our example, we will be adding 3x SATA SSDs in a simple RAID level 5 array.
Note: Physically install the disks into the nodes before proceeding. |
Finding the Disks
Note: This assumes the controller ID is '0'. |
The newly added disks will be in the state UGood. We can use this to list their enclosure and slot numbers;
storcli64 /c0 /eall /sall show all | grep UGood | grep -v '|'
8:6 21 UGood - 446.625 GB SATA SSD N N 512B SAMSUNG MZ7KH480HAHQ-00005 U 8:7 22 UGood - 446.625 GB SATA SSD N N 512B SAMSUNG MZ7KH480HAHQ-00005 U 8:8 19 UGood - 446.625 GB SATA SSD N N 512B SAMSUNG MZ7KH480HAHQ-00005 U
Here we see the three drives in positions 8:6, 8:7, and 8:8.
We want to create a RAID level 5 array, which storcli64 takes as r5 or RAID5. Knowing this, the command to create the array is:
storcli64 /c0 add vd type=r5 drives=8:6-8
Controller = 0 Status = Success Description = Add VD Succeeded
RAW
[root@nr-a04n02 ~]# storcli64 /c0 /vall show all | grep -B2 -A1 RAID5 DG/VD TYPE State Access Consist Cache Cac sCC Size Name -------------------------------------------------------------- 1/0 RAID5 Optl RW No RWBD - OFF 893.25 GB -------------------------------------------------------------- -- DG/VD TYPE State Access Consist Cache Cac sCC Size Name ------------------------------------------------------------- 0/1 RAID5 Optl RW Yes RWBC - OFF 1.361 TB ------------------------------------------------------------- [root@nr-a04n02 ~]# storcli64 /c0 /v0 set pdcache=on Controller = 0 Status = Success Description = None Detailed Status : =============== --------------------------------------- VD Property Value Status ErrCd ErrMsg --------------------------------------- 0 PdCac On Success 0 - --------------------------------------- [root@nr-a04n02 ~]# [root@nr-a04n02 ~]# storcli64 /c0 /v0 set iopolicy=cached Controller = 0 Status = Success Description = None Detailed Status : =============== ---------------------------------------- VD Property Value Status ErrCd ErrMsg ---------------------------------------- 0 IoPolicy Cached Success 0 - ---------------------------------------- [root@nr-a04n02 ~]# [root@nr-a04n02 ~]# storcli64 /c0 /v0 set bootdrive=off Controller = 0 Status = Success Description = None Detailed Status : =============== ----------------------------------------- VD Property Value Status ErrCd ErrMsg ----------------------------------------- 0 Boot Drive Off Success 0 - ----------------------------------------- [root@nr-a04n02 ~]# [root@nr-a04n02 ~]# storcli64 /c0 /v1 set bootdrive=on Controller = 0 Status = Success Description = None Detailed Status : =============== ----------------------------------------- VD Property Value Status ErrCd ErrMsg ----------------------------------------- 1 Boot Drive On Success 0 - ----------------------------------------- ------------------ [root@nr-a04n02 ~]# parted -a opt /dev/sdb GNU Parted 2.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mklabel gpt (parted) mkpart primary 0% 100% (parted) print free Model: FTS PRAID EP420i (scsi) Disk /dev/sdb: 959GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Number Start End Size File system Name Flags 17.4kB 1049kB 1031kB Free Space 1 1049kB 959GB 959GB primary 959GB 959GB 1032kB Free Space (parted) q Information: You may need to update /etc/fstab. [root@nr-a04n02 ~]# drbdadm create-md r1 initializing activity log initializing bitmap (28584 KB) to all zero ioctl(/dev/sdb1, BLKZEROOUT, [959088480256, 29270016]) failed: Inappropriate ioctl for device Using slow(er) fallback. 100% Writing meta data... New drbd meta data block successfully created. success [root@nr-a04n02 ~]# drbdadm up r1 [root@nr-a04n01 drbd.d]# drbdadm primary r1 --force [root@nr-a04n01 drbd.d]# GIT-hash: d232dfd1701f911288729c9144056bd21856e6f6 README.md build by root@rhel6-builder-production.alteeve.ca, 2020-01-28 00:30:13 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----- ns:40679264 nr:1332 dw:40680564 dr:9570892 al:2445 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:0 1: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r---n- ns:15346440 nr:0 dw:0 dr:15353752 al:8 bm:0 lo:0 pe:15 ua:26 ap:0 ep:1 wo:d oos:921266996 [>....................] sync'ed: 1.7% (899672/914656)M finish: 2:10:23 speed: 117,744 (111,180) K/sec
Any questions, feedback, advice, complaints or meanderings are welcome. | ||||
Us: Alteeve's Niche! | Support: Mailing List | IRC: #clusterlabs on Freenode | © Alteeve's Niche! Inc. 1997-2019 | |
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions. |