Editing
RAID Cards
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Adaptec = == CLI notes == On all of our 2450 servers and a handful of old FreeBSD boxes, we are running on adaptec RAID cards. The CLI program is <tt>aaccli</tt> on FreeBSD and <tt>afacli</tt> on linux Once you're in the CLI, open the container - either `open aac0` on fbsd or `open afa0` on linux - everything else is the same regardless of the OS. Here are the most common things we ever do: <pre>AAC0> container list /full Executing: container list /full=TRUE Num Total Oth Chunk Scsi Partition Creation System Label Type Size Ctr Size Usage B:ID:L Offset:Size State RO Lk Task Done% Ent Date Time Files ----- ------ ------ --- ------ ------- ------ ------------- ------- -- -- ------- ------ --- ------ -------- ------ 0 Mirror 33.9GB Open 0:01:0 64.0KB:33.9GB Normal 0 071002 05:39:32 /dev/aacd0 mirror0 0:00:0 64.0KB:33.9GB Normal 1 071002 05:39:32 1 Mirror 33.9GB Open 0:02:0 64.0KB:33.9GB Normal 0 071002 05:39:50 /dev/aacd1 mirror1 0:03:0 64.0KB:33.9GB Normal 1 071002 05:39:50 AAC0> disk list /full Executing: disk list /full=TRUE B:ID:L Device Type Removable media Vendor-ID Product-ID Rev Blocks Bytes/Block Usage Shared Rate ------ -------------- --------------- --------- ---------------- ----- --------- ----------- ---------------- ------ ---- 0:00:0 Disk N FUJITSU MAJ3364MC 3702 71390320 512 Initialized NO 160 0:01:0 Disk N FUJITSU MAJ3364MC 3702 71390320 512 Initialized NO 160 0:02:0 Disk N FUJITSU MAJ3364MC 3702 71390320 512 Initialized NO 160 0:03:0 Disk N FUJITSU MAJ3364MC 3702 71390320 512 Initialized NO 160 AAC0> AAC0> disk show smart Executing: disk show smart Smart Method of Enable Capable Informational Exception Performance Error B:ID:L Device Exceptions(MRIE) Control Enabled Count ------ ------- ---------------- --------- ----------- ------ 0:00:0 Y 6 Y N 0 0:01:0 Y 6 Y N 0 0:02:0 Y 6 Y N 0 0:03:0 Y 6 Y N 0 0:06:0 N AAC0> task list Executing: task list Controller Tasks TaskId Function Done% Container State Specific1 Specific2 ------ -------- ------- --------- ----- --------- --------- No tasks currently running on controller AAC0> controller details Executing: controller details Controller Information ---------------------- Remote Computer: S Device Name: S Controller Type: PERC 3/Si Access Mode: READ-WRITE Controller Serial Number: Last Six Digits = 8C01D0 Number of Buses: 1 Devices per Bus: 15 Controller CPU: i960 R series Controller CPU Speed: 100 Mhz Controller Memory: 64 Mbytes Battery State: Not Present Component Revisions ------------------- CLI: 1.0-0 (Build #5263) API: 1.0-0 (Build #5263) Miniport Driver: 2.7-1 (Build #3571) Controller Software: 2.7-1 (Build #3571) Controller BIOS: 2.7-1 (Build #3571) Controller Firmware: (Build #3571) AAC0> disk show smart AAC0> task list</pre> type exit to leave it. All the mirrors you are getting are healthy - so even if a drive fails you should be ok. If an unexplained system crash occurs, after restarting all the systems you should check the mirrors with `container list /f` to see if one has degraded (one disk has died). Once in a while a mirror degrading will cause the system to crash - but not usually - usually it is just silent. == Creating/removing mirror == === via CLI === First, you have to make sure the new disk(s) is/are wiped clean – '''a disk with containers from another system will crash the system when inserted'''. You can do this initializing the drive(s) in another system. Get into the CLI, rescan the controller: AAC0> controller rescan to get it to find the newly inserted disks <pre>AAC0> container list Executing: container list Num Total Oth Chunk Scsi Partition Label Type Size Ctr Size Usage B:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/sda 0:01:0 64.0KB:68.3GB AAC0> disk list Executing: disk list B:ID:L Device Type Blocks Bytes/Block Usage Shared Rate ------ -------------- --------- ----------- ---------------- ------ ---- 0:00:0 Disk 143374738 512 Initialized NO 160 0:01:0 Disk 143374738 512 Initialized NO 160 0:02:0 Disk 143374738 512 Initialized NO 160 0:03:0 Disk 143374738 512 Initialized NO 160</pre> if the disks aren’t initialized: <pre>AAC0> disk initialize (0,2,0) AAC0> disk initialize (0,3,0) AAC0> disk show space Executing: disk show space Scsi B:ID:L Usage Size ----------- ---------- ------------- 0:00:0 Container 64.0KB:68.3GB 0:00:0 Free 68.3GB:7.50KB 0:01:0 Container 64.0KB:68.3GB 0:01:0 Free 68.3GB:7.50KB </pre> Finally, create the mirror: <pre>AAC0> container create volume /label=MIRROR1 ((0,2,0)) Executing: container create volume /label="MIRROR1" (BUS=0,ID=2,LUN=0) Container 1 created at /dev/sdb AAC0> container list Executing: container list Num Total Oth Chunk Scsi Partition Label Type Size Ctr Size Usage B:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/sda 0:01:0 64.0KB:68.3GB 1 Volume 8.47GB Valid 0:02:0 64.0KB:8.47GB /dev/sdb MIRROR1 Create volume on 1 of to disks to be in mirror (fdisk, format), Then to mirror: AAC0> container create mirror 1 (0,3,0) Executing: container create mirror 1 (BUS=0,ID=3,LUN=0) AAC0> container list Executing: container list Num Total Oth Chunk Scsi Partition Label Type Size Ctr Size Usage B:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/sda 0:01:0 64.0KB:68.3GB 1 Mirror 8.47GB Valid 0:02:0 64.0KB:8.47GB /dev/sdb MIRROR1 0:03:0 64.0KB:8.47GB AAC0> task list Executing: task list Controller Tasks TaskId Function Done% Container State Specific1 Specific2 ------ -------- ------- --------- ----- --------- --------- 100 Bld/Vfy 1.3% 1 RUN 00000000 00000000</pre> ---- To remove: MAKE SURE DRIVE NOT MOUNTED FIRST! Example: delete 2nd mirror installed in slots 2-3 <pre>AAC0> container delete 1 Executing: container delete 1 AAC0> container list Executing: container list Num Total Oth Chunk Scsi Partition Label Type Size Ctr Size Usage B:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/sda 0:01:0 64.0KB:68.3GB AAC0> enclosure prepare slot 0 2 Executing: enclosure prepare slot 0 2 AAC0> enclosure prepare slot 0 3 Executing: enclosure prepare slot 0 3</pre> You may now remove drives ---- To create mirrors from a volume (see next section where we add drives as volume) <pre>CLI > open aac0 AAC0> disk list Executing: disk list C:ID:L Device Type Blocks Bytes/Block Usage Shared Rate ------ -------------- --------- ----------- ---------------- ------ ---- 0:00:0 Disk 143374738 512 Initialized NO 160 0:01:0 Disk 143374738 512 Initialized NO 40 0:02:0 Disk 286749488 512 Initialized NO 320 0:03:0 Disk 286749488 512 Initialized NO 320 AAC0> container list Executing: container list Num Total Oth Stripe Scsi Partition Label Type Size Ctr Size Usage C:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Volume 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/aacd0 MIRROR0 1 Volume 136GB Open 0:02:0 64.0KB: 136GB /dev/aacd1 MIRROR1 AAC0> container create mirror 1 (0,3,0) Executing: container create mirror 1 (BUS=0,ID=3,LUN=0) AAC0> container list Executing: container list Num Total Oth Stripe Scsi Partition Label Type Size Ctr Size Usage C:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Volume 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/aacd0 MIRROR0 1 Mirror 136GB Open 0:02:0 64.0KB: 136GB /dev/aacd1 MIRROR1 0:03:0 64.0KB: 136GB AAC0> task list Executing: task list Controller Tasks TaskId Function Done% Container State Specific1 Specific2 ------ -------- ------- --------- ----- --------- --------- 100 Bld/Vfy 6.5% 1 RUN 00000000 00000000</pre> If this happens: <pre>AAC0> container create mirror 1 (0:3:0) Executing: container create mirror 1 (BUS=0,ID=3,LUN=0) Command Error: <The controller was not able to mirror the specified container.> AAC0> disk initialize /always (0,3,0) Executing: disk initialize /always=TRUE (BUS=0,ID=3,LUN=0)</pre> Then: <pre>AAC0> container create mirror 1 (0:3:0) Executing: container create mirror 1 (BUS=0,ID=3,LUN=0)</pre> In the case of a drive that won't remirror due to a Mirror Failover Container 0 no failover assigned: container set failover 0 (0,0,0) where 0,0,0 is the new empty drive === via BIOS configuration utility === Press Ctrl-A to enter the configuration utility while the Adaptec BIOS is booting. <pre>Container configuration utility-> Initialize drives->(ins to select all drives you wish to use- DO NOT CHOOSE DRIVES IN USE IN EXISTING ARRAY) Create container-> (Select the newly-initialized drives) Container type: RAID1 Container label: MIRROR0 (confirm correct size) Read caching: Y Write caching: enable when protected (done) </pre> Repeat the process if you're building another mirror. Call it MIRROR1 Procedure for setting two, ½ mirrors (two volumes) which you can later convert to two mirrors: <pre>Create array-> (Select 1st drive) (enter) Container type: Volume Container label: MIRROR0 (confirm correct size) Read caching: Y Write caching: enable always (answer y to both warnings) (done) Create array-> (Select 3rd drive) Container type: Volume Container label: MIRROR1 (confirm correct size) Read caching: Y Write caching: enable always (answer y to both warnings) (done) (exit util)</pre> ---- To remove a drive: Go to the "Manage Arrays" screen, move the cursor over the mirror you want to delete and press the delete key. == Remove a live drive == Remove, via CLI: <pre>AAC0> container list Executing: container list Num Total Oth Chunk Scsi Partition Label Type Size Ctr Size Usage B:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/aacd0 0:01:0 64.0KB:68.3GB AAC0> container unmirror 0 AAC0> container list Executing: container list Num Total Oth Stripe Scsi Partition Label Type Size Ctr Size Usage C:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Volume 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/aacd0 MIRROR0 AAC0> enclosure prepare slot 0 1</pre> (remove the drive) ---- To replace drive: put in new drive, run <tt>controller rescan</tt>, if necessary <pre>AAC0> container create mirror 0 1 AAC0> task list (scrubbing) </pre> Note: if you unmirror an unhealthy mirror, it will leave the healthy one there, otherwise it will remove (whichever is listed as) the 2nd drive in the mirror. == Replace a dead ("missing") drive == <pre>AAC0> container list Executing: container list Num Total Oth Chunk Scsi Partition Label Type Size Ctr Size Usage B:ID:L Offset:Size ----- ------ ------ --- ------ ------- ------ ------------- 0 Mirror 68.3GB Open 0:00:0 64.0KB:68.3GB /dev/aacd0 0:01:0 64.0KB:68.3GB 1 Mirror 68.3GB Open 0:02:0 64.0KB:68.3GB /dev/aacd1 MIRROR1 ?:??:? - Missing – (put in new drive)</pre> No tasks showing up after 2min? Rescan: <pre>AAC0> controller rescan AAC0> task list Executing: task list Controller Tasks TaskId Function Done% Container State Specific1 Specific2 ------ -------- ------- --------- ----- --------- --------- 100 Rebuild 0.0% 1 RUN 00000000 00000000 AAC0></pre> To replace failed drive, you can prepare slot and put in new (replacement) drives on dells and it should start scrubbing. In case it doesn’t start scrubbing (there is a delay, so wait 2min), AAC0> container set failover (scsi id of new disk) Or if that fails AAC0> container unmirror 1 That will demote it to a volume, Then container create, etc… == Enabling/disabling write cache == Write cache should ideally only be enabled when there is a backup battery present. Write cache speeds up I/O performance by allowing the RAID card to write data to a buffer before committing it to disk. This data lives in RAM. If power is lost and there is no backup battery, that data is lost. However, you can force write cache to be on regardless of whether a battery is present. Turning write cache on: <pre>AFA0> container show cache 1 Executing: container show cache 1 Global Container Read Cache Size : 0 Global Container Write Cache Size : 51380224 Read Cache Setting : ENABLE Write Cache Setting : DISABLE Write Cache Status : Inactive, battery not present AFA0> container set cache /unprotected=1 /write_cache_enable=1 0 Executing: container set cache /unprotected=TRUE /write_cache_enable=TRUE 0 AFA0> container set cache /unprotected=1 /write_cache_enable=1 1 Executing: container set cache /unprotected=TRUE /write_cache_enable=TRUE 1 AFA0> container show cache 0 Executing: container show cache 0 Global Container Read Cache Size : 483328 Global Container Write Cache Size : 51380224 Read Cache Setting : ENABLE Write Cache Setting : ENABLE ALWAYS Write Cache Status : Active, not protected, battery not present AFA0> container show cache 1 Executing: container show cache 1 Global Container Read Cache Size : 483328 Global Container Write Cache Size : 51380224 Read Cache Setting : ENABLE Write Cache Setting : ENABLE ALWAYS Write Cache Status : Active, not protected, battery not present</pre> Shutting off write cache: <pre>FASTCMD> open afa0 Executing: open "afa0" AFA0> container set cache 0 /write_cache_enable=0 Too many parameters AFA0> container set cache /write_cache_enable=0 0 Executing: container set cache /write_cache_enable=FALSE 0 AFA0> container set cache /write_cache_enable=0 1 Executing: container set cache /write_cache_enable=FALSE 1 AFA0> container show cache 0 Executing: container show cache 0 Global Container Read Cache Size : 483328 Global Container Write Cache Size : 51380224 Read Cache Setting : ENABLE Write Cache Setting : DISABLE Write Cache Status : Inactive, battery not present AFA0> container show cache 1 Executing: container show cache 1 Global Container Read Cache Size : 483328 Global Container Write Cache Size : 51380224 Read Cache Setting : ENABLE Write Cache Setting : DISABLE Write Cache Status : Inactive, battery not present AFA0> exit Executing: exit</pre>
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information