Loading... # 一、查看 ## 1.1 查看控制器数量 ```storecli64.exe show```。查询结果如下。其中,uzizhong要的是获取控制器的数量,以及编号。 ``` D:\360安全浏览器下载>storcli64.exe show CLI Version = 007.2807.0000.0000 Dec 22, 2023 Operating system = Windows Server 2016 Status Code = 0 Status = Success Description = None Number of Controllers = 1 # 该服务器共有1个控制器 Host Name = WIN-A5EKATO5N6K Operating System = Windows Server 2016 StoreLib IT Version = 07.2900.0200.0100 System Overview : =============== # 控制器的编号为0,型号是AVAGOMegaRAIDSAS9361-8i,4块物理驱动器,1个驱动器组,1个虚拟驱动器 ------------------------------------------------------------------------------------ Ctl Model Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs Hlth ------------------------------------------------------------------------------------ 0 AVAGOMegaRAIDSAS9361-8i 8 4 1 0 1 0 N/A On 1&2 Y 3 Opt ------------------------------------------------------------------------------------ Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed PDs=Physical drives|DNOpt=Array NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Spare Drive Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit/CV Hlth=Health|Safe=Safe-mode boot|CertProv-Certificate Provision mode Chrg=Charging | MsngCbl=Cable Failure ``` ## 1.2 查看指定VD的详细信息,例如查看VD 0的信息 ```storcli64.exe /c0 /v0 show all``` ``` D:\360安全浏览器下载>storcli64.exe /c0 /v0 show CLI Version = 007.2807.0000.0000 Dec 22, 2023 Operating system = Windows Server 2016 Controller = 0 Status = Success Description = None Virtual Drives : ============== -------------------------------------------------------------- DG/VD TYPE State Access Consist Cache Cac sCC Size Name -------------------------------------------------------------- 0/0 RAID5 Optl RW No RWTD - ON 10.914 TB -------------------------------------------------------------- VD=Virtual Drive| DG=Drive Group|Rec=Recovery Cac=CacheCade|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|dflt=Default|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady B=Blocked|Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled Check Consistency D:\360安全浏览器下载>storcli64.exe /c0 /v0 show all CLI Version = 007.2807.0000.0000 Dec 22, 2023 Operating system = Windows Server 2016 Controller = 0 Status = Success Description = None /c0/v0 : ====== -------------------------------------------------------------- DG/VD TYPE State Access Consist Cache Cac sCC Size Name -------------------------------------------------------------- 0/0 RAID5 Optl RW No RWTD - ON 10.914 TB -------------------------------------------------------------- VD=Virtual Drive| DG=Drive Group|Rec=Recovery Cac=CacheCade|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|dflt=Default|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady B=Blocked|Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled Check Consistency PDs for VD 0 : ============ ---------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type ---------------------------------------------------------------------------- 252:4 12 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:6 13 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:5 11 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:7 10 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - ---------------------------------------------------------------------------- EID=Enclosure Device ID|Slt=Slot No|DID=Device ID|DG=DriveGroup DHS=Dedicated Hot Spare|UGood=Unconfigured Good|GHS=Global Hotspare UBad=Unconfigured Bad|Sntze=Sanitize|Onln=Online|Offln=Offline|Intf=Interface Med=Media Type|SED=Self Encryptive Drive|PI=PI Eligible SeSz=Sector Size|Sp=Spun|U=Up|D=Down|T=Transition|F=Foreign UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded UBUnsp=UBad Unsupported|Rbld=Rebuild VD0 Properties : ============== Strip Size = 256 KB Number of Blocks = 23438819328 VD has Emulated PD = No Span Depth = 1 Number of Drives Per Span = 4 Write Cache(initial setting) = WriteBack Disk Cache Policy = Disk's Default Encryption = None Data Protection = Disabled Active Operations = None Exposed to OS = Yes OS Drive Name = Disk 0 Creation Date = 24-04-2024 Creation Time = 09:55:55 AM Emulation type = default Cachebypass size = Cachebypass-64k Cachebypass Mode = Cachebypass Intelligent Is LD Ready for OS Requests = Yes SCSI NAA Id = 600605b01128a7302dbb93ab19866fdd Unmap Enabled = N/A ``` ## 1.3 查询RAID详细信息 ``` storcli64.exe /c0 show all ``` <div class="panel panel-default collapse-panel box-shadow-wrap-lg"><div class="panel-heading panel-collapse" data-toggle="collapse" data-target="#collapse-a1e17b5d0a2477f98f5a2636ad69ec3a69" aria-expanded="true"><div class="accordion-toggle"><span style="">详细输出</span> <i class="pull-right fontello icon-fw fontello-angle-right"></i> </div> </div> <div class="panel-body collapse-panel-body"> <div id="collapse-a1e17b5d0a2477f98f5a2636ad69ec3a69" class="collapse collapse-content"><p></p> ``` D:\360安全浏览器下载>storcli64.exe /c0 show all Generating detailed summary of the adapter, it may take a while to complete. CLI Version = 007.2807.0000.0000 Dec 22, 2023 Operating system = Windows Server 2016 Controller = 0 Status = Success Description = None Basics : ====== Controller = 0 Model = AVAGO MegaRAID SAS 9361-8i Serial Number = SKB3965942 Current Controller Date/Time = 04/25/2024, 11:50:13 Current System Date/time = 04/25/2024, 11:50:14 SAS Address = 500605b01128a730 PCI Address = 00:17:00:00 Mfg Date = 09/28/21 Rework Date = 00/00/00 Revision No = 08C Version : ======= Firmware Package Build = 24.21.0-0132 Firmware Version = 4.680.00-8527 CPLD Version = 26747-01A Bios Version = 6.36.00.3_4.19.08.00_0x06180203 HII Version = 03.25.05.13 Ctrl-R Version = 5.19-0603 Preboot CLI Version = 01.07-05:#%0000 NVDATA Version = 3.1705.00-0021 Boot Block Version = 3.07.00.00-0004 Driver Name = megasas2.sys Driver Version = 6.706.06.00 Bus : === Vendor Id = 0x1000 Device Id = 0x5D SubVendor Id = 0x1000 SubDevice Id = 0x9361 Host Interface = PCI-E Device Interface = SAS-12G Bus Number = 23 Device Number = 0 Function Number = 0 Domain ID = 0 Pending Images in Flash : ======================= Image name = No pending images Status : ====== Controller Status = Optimal Memory Correctable Errors = 0 Memory Uncorrectable Errors = 0 ECC Bucket Count = 0 Any Offline VD Cache Preserved = No BBU Status = NA PD Firmware Download in progress = No Support PD Firmware Download = Yes Lock Key Assigned = No Failed to get lock key on bootup = No Lock key has not been backed up = No Bios was not detected during boot = No Controller must be rebooted to complete security operation = No A rollback operation is in progress = No At least one PFK exists in NVRAM = Yes SSC Policy is WB = No Controller has booted into safe mode = No Controller shutdown required = No Controller has booted into certificate provision mode = No Current Personality = RAID-Mode Supported Adapter Operations : ============================ Rebuild Rate = Yes CC Rate = Yes BGI Rate = Yes Reconstruct Rate = Yes Patrol Read Rate = Yes Alarm Control = Yes Cluster Support = No BBU = NA Spanning = Yes Dedicated Hot Spare = Yes Revertible Hot Spares = Yes Foreign Config Import = Yes Self Diagnostic = Yes Allow Mixed Redundancy on Array = No Global Hot Spares = Yes Deny SCSI Passthrough = No Deny SMP Passthrough = No Deny STP Passthrough = No Support more than 8 Phys = Yes FW and Event Time in GMT = No Support Enhanced Foreign Import = Yes Support Enclosure Enumeration = Yes Support Allowed Operations = Yes Abort CC on Error = Yes Support Multipath = Yes Support Odd & Even Drive count in RAID1E = No Support Security = No Support Config Page Model = Yes Support the OCE without adding drives = Yes Support EKM = No Snapshot Enabled = No Support PFK = Yes Support PI = Yes Support LDPI Type1 = No Support LDPI Type2 = No Support LDPI Type3 = No Support Ld BBM Info = No Support Shield State = Yes Block SSD Write Disk Cache Change = Yes Support Suspend Resume BG ops = Yes Support Emergency Spares = Yes Support Set Link Speed = Yes Support Boot Time PFK Change = No Support JBOD = Yes Disable Online PFK Change = No Support Perf Tuning = Yes Support SSD PatrolRead = Yes Real Time Scheduler = Yes Support Reset Now = Yes Support Emulated Drives = Yes Headless Mode = Yes Dedicated HotSpares Limited = No Point In Time Progress = Yes Extended LD = Yes Support Uneven span = No Support Config Auto Balance = No Support Maintenance Mode = No Support Diagnostic results = Yes Support Ext Enclosure = Yes Support Sesmonitoring = Yes Support SecurityonJBOD = Yes Support ForceFlash = Yes Support DisableImmediateIO = Yes Support LargeIOSupport = Yes Support DrvActivityLEDSetting = Yes Support FlushWriteVerify = Yes Support CPLDUpdate = Yes Support ForceTo512e = Yes Support discardCacheDuringLDDelete = Yes Support JBOD Write cache = No Support Large QD Support = No Support Ctrl Info Extended = No Support IButton less = No Support AES Encryption Algorithm = No Support Encrypted MFC = No Support Snapdump = Yes Support Force Personality Change = No Support Dual Fw Image = No Support PSOC Update = No Support Secure Boot = No Support Debug Queue = Yes Support Least Latency Mode = Yes Support OnDemand Snapdump = Yes Support Clear Snapdump = Yes Support FW Triggered Snapdump = Yes Support PHY current speed = No Support Lane current speed = No Support NVMe Width = No Support Lane DeviceType = No Support Extended Drive performance Monitoring = No Support NVMe Repair = No Support Platform Security = No Support None Mode Params = No Support Extended Controller Property = No Support Smart Poll Interval for DirectAttached = No Support Write Journal Pinning = No Support SMP Passthru with Port Number = No Support SnapDump Preboot Trace Buffer Toggle = No Support Parity Read Cache Bypass = No Support NVMe Init Error Device ConnectorIndex = No Support VolatileKey = No Support PSOC Part Information = No Support Slow array threshold calculation = No Support PCIe Reference Clock override = No Support PCIe PERST override = No Support Drive FW Download Mask = No Support Start of day PL log capture = No Support Drive Unrecovered Medium Error Count = No Supported PD Operations : ======================= Force Online = Yes Force Offline = Yes Force Rebuild = Yes Deny Force Failed = No Deny Force Good/Bad = No Deny Missing Replace = No Deny Clear = No Deny Locate = No Support Power State = Yes Set Power State For Cfg = No Support T10 Power State = No Support Temperature = Yes NCQ = Yes Support Max Rate SATA = No Support Degraded Media = No Support Parallel FW Update = Yes Support Drive Crypto Erase = Yes Support SSD Wear Gauge = No Support Sanitize = Yes Support Extended Sanitize = No Supported VD Operations : ======================= Read Policy = Yes Write Policy = Yes IO Policy = Yes Access Policy = Yes Disk Cache Policy = Yes Reconstruction = Yes Deny Locate = No Deny CC = No Allow Ctrl Encryption = No Enable LDBBM = Yes Support FastPath = Yes Performance Metrics = Yes Power Savings = No Support Powersave Max With Cache = No Support Breakmirror = Yes Support SSC WriteBack = No Support SSC Association = No Support VD Hide = Yes Support VD Cachebypass = Yes Support VD discardCacheDuringLDDelete = Yes Support VD Scsi Unmap = No Advanced Software Option : ======================== ---------------------------------------- Adv S/W Opt Time Remaining Mode ---------------------------------------- MegaRAID FastPath Unlimited - MegaRAID RAID6 Unlimited - MegaRAID RAID5 Unlimited - ---------------------------------------- Safe ID = TGJFK1LBHGUQXCKBX49E56PN7W3VRN7Q57SGT4RZ HwCfg : ===== ChipRevision = C0 BatteryFRU = N/A Front End Port Count = 0 Backend Port Count = 8 BBU = Absent Alarm = On Serial Debugger = Present NVRAM Size = 32KB Flash Size = 16MB On Board Memory Size = 2048MB CacheVault Flash Size = NA TPM = Absent Upgrade Key = Absent On Board Expander = Absent Temperature Sensor for ROC = Present Temperature Sensor for Controller = Absent Upgradable CPLD = Present Upgradable PSOC = Absent Current Size of CacheCade (GB) = 0 Current Size of FW Cache (MB) = 1698 ROC temperature(Degree Celsius) = 58 Policies : ======== Policies Table : ============== ------------------------------------------------ Policy Current Default ------------------------------------------------ Predictive Fail Poll Interval 300 sec Interrupt Throttle Active Count 16 Interrupt Throttle Completion 50 us Rebuild Rate 30 % 30% PR Rate 30 % 30% BGI Rate 30 % 30% Check Consistency Rate 30 % 30% Reconstruction Rate 30 % 30% Cache Flush Interval 4s ------------------------------------------------ Flush Time(Default) = 4s Drive Coercion Mode = none Auto Rebuild = On Battery Warning = On ECC Bucket Size = 15 ECC Bucket Leak Rate (hrs) = 24 Restore Hot Spare on Insertion = Off Expose Enclosure Devices = On Maintain PD Fail History = On Reorder Host Requests = On Auto detect BackPlane = SGPIO/i2c SEP Load Balance Mode = Auto Security Key Assigned = Off Disable Online Controller Reset = Off Use drive activity for locate = Off Boot : ==== BIOS Enumerate VDs = 1 Stop BIOS on Error = Off Delay during POST = 0 Spin Down Mode = None Enable Ctrl-R = Yes Enable Web BIOS = No Enable PreBoot CLI = No Enable BIOS = Yes Max Drives to Spinup at One Time = 2 Maximum number of direct attached drives to spin up in 1 min = 10 Delay Among Spinup Groups (sec) = 12 Allow Boot with Preserved Cache = Off High Availability : ================= Topology Type = None Cluster Permitted = No Cluster Active = No Defaults : ======== Phy Polarity = 0 Phy PolaritySplit = 0 Strip Size = 256 KB Write Policy = WB Read Policy = RA Cache When BBU Bad = Off Cached IO = Off VD PowerSave Policy = Controller Defined Default spin down time (mins) = 30 Coercion Mode = None ZCR Config = Unknown Max Chained Enclosures = 16 Direct PD Mapping = No Restore Hot Spare on Insertion = No Expose Enclosure Devices = Yes Maintain PD Fail History = Yes Zero Based Enclosure Enumeration = No Disable Puncturing = No EnableLDBBM = Yes DisableHII = No Un-Certified Hard Disk Drives = Allow SMART Mode = Mode 6 Enable LED Header = Yes LED Show Drive Activity = Yes Dirty LED Shows Drive Activity = No EnableCrashDump = Yes Disable Online Controller Reset = No Treat Single span R1E as R10 = No Power Saving option = Enabled TTY Log In Flash = No Auto Enhanced Import = Yes BreakMirror RAID Support = single span R1 Disable Join Mirror = Yes Enable Shield State = Yes Time taken to detect CME = 60 sec Capabilities : ============ Supported Drives = SAS, SATA RAID Level Supported = RAID0, RAID1(2 or more drives), RAID5, RAID6, RAID00, RAID10(2 or more drives per span), RAID50, RAID60 Enable JBOD = No Mix in Enclosure = Allowed Mix of SAS/SATA of HDD type in VD = Allowed Mix of SAS/SATA of SSD type in VD = Allowed Mix of SSD/HDD in VD = Allowed SAS Disable = No Max Arms Per VD = 32 Max Spans Per VD = 8 Max Arrays = 128 Max VD per array = 16 Max Number of VDs = 64 Max Parallel Commands = 928 Max SGE Count = 60 Max Data Transfer Size = 512 sectors Max Strips PerIO = 128 Max Configurable CacheCade Size(GB) = 0 Max Transportable DGs = 0 Enable Snapdump = Yes Enable SCSI Unmap = Yes Read cache bypass enabled for Parity RAID LDs = No FDE Drive Mix Support = No Min Strip Size = 64 KB Max Strip Size = 1.000 MB Scheduled Tasks : =============== Consistency Check Reoccurrence = 168 hrs Next Consistency check launch = 04/27/2024, 03:00:00 Patrol Read Reoccurrence = 168 hrs Next Patrol Read launch = 04/27/2024, 03:00:00 Battery learn Reoccurrence = NA Next Battery Learn = NA OEMID = Broadcom Security Protocol properties : ============================ Security Protocol = None Drive Groups = 1 TOPOLOGY : ======== ---------------------------------------------------------------------------- DG Arr Row EID:Slot DID Type State BT Size PDC PI SED DS3 FSpace TR ---------------------------------------------------------------------------- 0 - - - - RAID5 Optl N 10.914 TB dflt N N dflt N N 0 0 - - - RAID5 Optl N 10.914 TB dflt N N dflt N N 0 0 0 252:4 12 DRIVE Onln N 3.637 TB dflt N N dflt - N 0 0 1 252:6 13 DRIVE Onln N 3.637 TB dflt N N dflt - N 0 0 2 252:5 11 DRIVE Onln N 3.637 TB dflt N N dflt - N 0 0 3 252:7 10 DRIVE Onln N 3.637 TB dflt N N dflt - N ---------------------------------------------------------------------------- DG=Disk Group Index|Arr=Array Index|Row=Row Index|EID=Enclosure Device ID DID=Device ID|Type=Drive or RAID Type|Onln=Online|Rbld=Rebuild|Optl=Optimal Dgrd=Degraded|Pdgd=Partially degraded|Offln=Offline|BT=Background Task Active PDC=PD Cache|PI=Protection Info|SED=Self Encrypting Drive|Frgn=Foreign DS3=Dimmer Switch 3|dflt=Default|Msng=Missing|FSpace=Free Space Present TR=Transport Ready Virtual Drives = 1 VD LIST : ======= -------------------------------------------------------------- DG/VD TYPE State Access Consist Cache Cac sCC Size Name -------------------------------------------------------------- 0/0 RAID5 Optl RW No RWTD - ON 10.914 TB -------------------------------------------------------------- VD=Virtual Drive| DG=Drive Group|Rec=Recovery Cac=CacheCade|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|dflt=Default|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady B=Blocked|Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled Check Consistency Physical Drives = 4 PD LIST : ======= ---------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type ---------------------------------------------------------------------------- 252:4 12 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:5 11 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:6 13 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:7 10 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - ---------------------------------------------------------------------------- EID=Enclosure Device ID|Slt=Slot No|DID=Device ID|DG=DriveGroup DHS=Dedicated Hot Spare|UGood=Unconfigured Good|GHS=Global Hotspare UBad=Unconfigured Bad|Sntze=Sanitize|Onln=Online|Offln=Offline|Intf=Interface Med=Media Type|SED=Self Encryptive Drive|PI=PI Eligible SeSz=Sector Size|Sp=Spun|U=Up|D=Down|T=Transition|F=Foreign UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded UBUnsp=UBad Unsupported|Rbld=Rebuild Enclosures = 1 Enclosure LIST : ============== -------------------------------------------------------------------- EID State Slots PD PS Fans TSs Alms SIM Port# ProdID VendorSpecific -------------------------------------------------------------------- 252 OK 8 4 0 0 0 0 1 - SGPIO -------------------------------------------------------------------- EID=Enclosure Device ID | PD=Physical drive count | PS=Power Supply count TSs=Temperature sensor count | Alms=Alarm count | SIM=SIM Count | ProdID=Product ID ``` <p></p></div></div></div> # 二、操作 ## 2.1 设置磁盘工作模式 使用storecli64命令可以设置磁盘的工作模式,包括RAID模式和直通(JBOD)模式。以下是一些常用的设置命令: (1)直通模式设置磁盘为JBOD模式: ```storcli64 /c0 /eall /sall set jbod``` 这会将所有磁盘设为JBOD模式,磁盘不再受RAID卡管理,可以直接访问。 (2)设置磁盘为RAID模式: ```storcli64 /c0 /eall /sall set good``` 这会将所有JBOD磁盘重新设回RAID模式,由RAID卡管理。 将指定磁盘设为JBOD,例如Enclosure 252,Slot 0的磁盘: ```storcli64 /c0 /e252 /s0 set jbod``` 将指定JBOD磁盘设回RAID: ```storcli64 /c0 /e252 /s0 set good``` (3)设置磁盘的缓存策略为Cached: ```storcli64 /c0 /eall /sall set cachedbadbbu``` (4)设置磁盘的缓存策略为Direct: ```storcli64 /c0 /eall /sall set nocachedbadbbu`` Cached表示启用磁盘缓存,Direct表示禁用缓存,视使用场景而定。 (5)设置磁盘的协商链接速度,例如设为6Gb/s: ```storcli64 /c0 /eall /sall set linkspeed 6``` 根据实际需要,将linkspeed设为1.5、3、6或12,分别对应SATA 1.5Gb/s、3Gb/s、6Gb/s和SAS 12Gb/s。 以上命令可以灵活设置磁盘的工作模式和参数,切换RAID和JBOD,调整缓存和链接速度等。需要注意的是,切换磁盘模式时要谨慎,可能引起数据丢失,务必先做好数据备份。 ## 2.2 创建VD 使用storcli64创建Virtual Drive (VD)的步骤如下: 1. 打开命令行终端,进入storecli64所在目录。 2. 输入以下命令列出当前控制器信息,获取控制器ID: ```./storcli64 show``` ``` D:\360安全浏览器下载>storcli64.exe show CLI Version = 007.2807.0000.0000 Dec 22, 2023 Operating system = Windows Server 2016 Status Code = 0 Status = Success Description = None Number of Controllers = 1 Host Name = WIN-A5EKATO5N6K Operating System = Windows Server 2016 StoreLib IT Version = 07.2900.0200.0100 System Overview : =============== ------------------------------------------------------------------------------------ Ctl Model Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs Hlth ------------------------------------------------------------------------------------ 0 AVAGOMegaRAIDSAS9361-8i 8 4 1 0 1 0 N/A On 1&2 Y 3 Opt ------------------------------------------------------------------------------------ Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed PDs=Physical drives|DNOpt=Array NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Spare Drive Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit/CV Hlth=Health|Safe=Safe-mode boot|CertProv-Certificate Provision mode Chrg=Charging | MsngCbl=Cable Failure ``` 记下想要创建VD的控制器ID,例如0。 3. 输入以下命令列出控制器上的所有未配置物理磁盘: ```./storcli64 /c0 show pall``` 记下想要用于创建VD的磁盘ID,例如32:1-3。 ``` D:\360安全浏览器下载>storcli64.exe /c0 show Generating detailed summary of the adapter, it may take a while to complete. CLI Version = 007.2807.0000.0000 Dec 22, 2023 Operating system = Windows Server 2016 Controller = 0 Status = Success Description = None Product Name = AVAGO MegaRAID SAS 9361-8i Serial Number = SKB3965942 SAS Address = 500605b01128a730 PCI Address = 00:17:00:00 System Time = 04/25/2024 11:34:29 Mfg. Date = 09/28/21 Controller Time = 04/25/2024 11:34:29 FW Package Build = 24.21.0-0132 BIOS Version = 6.36.00.3_4.19.08.00_0x06180203 FW Version = 4.680.00-8527 Driver Name = megasas2.sys Driver Version = 6.706.06.00 Current Personality = RAID-Mode Vendor Id = 0x1000 Device Id = 0x5D SubVendor Id = 0x1000 SubDevice Id = 0x9361 Host Interface = PCI-E Device Interface = SAS-12G Bus Number = 23 Device Number = 0 Function Number = 0 Domain ID = 0 Security Protocol = None Drive Groups = 1 TOPOLOGY : ======== ---------------------------------------------------------------------------- DG Arr Row EID:Slot DID Type State BT Size PDC PI SED DS3 FSpace TR ---------------------------------------------------------------------------- 0 - - - - RAID5 Optl N 10.914 TB dflt N N dflt N N 0 0 - - - RAID5 Optl N 10.914 TB dflt N N dflt N N 0 0 0 252:4 12 DRIVE Onln N 3.637 TB dflt N N dflt - N 0 0 1 252:6 13 DRIVE Onln N 3.637 TB dflt N N dflt - N 0 0 2 252:5 11 DRIVE Onln N 3.637 TB dflt N N dflt - N 0 0 3 252:7 10 DRIVE Onln N 3.637 TB dflt N N dflt - N ---------------------------------------------------------------------------- DG=Disk Group Index|Arr=Array Index|Row=Row Index|EID=Enclosure Device ID DID=Device ID|Type=Drive or RAID Type|Onln=Online|Rbld=Rebuild|Optl=Optimal Dgrd=Degraded|Pdgd=Partially degraded|Offln=Offline|BT=Background Task Active PDC=PD Cache|PI=Protection Info|SED=Self Encrypting Drive|Frgn=Foreign DS3=Dimmer Switch 3|dflt=Default|Msng=Missing|FSpace=Free Space Present TR=Transport Ready Virtual Drives = 1 VD LIST : ======= -------------------------------------------------------------- DG/VD TYPE State Access Consist Cache Cac sCC Size Name -------------------------------------------------------------- 0/0 RAID5 Optl RW No RWTD - ON 10.914 TB -------------------------------------------------------------- VD=Virtual Drive| DG=Drive Group|Rec=Recovery Cac=CacheCade|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|dflt=Default|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady B=Blocked|Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled Check Consistency Physical Drives = 4 PD LIST : ======= ---------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type ---------------------------------------------------------------------------- 252:4 12 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:5 11 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:6 13 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - 252:7 10 Onln 0 3.637 TB SAS HDD N N 512B ST4000NM003A U - ---------------------------------------------------------------------------- EID=Enclosure Device ID|Slt=Slot No|DID=Device ID|DG=DriveGroup DHS=Dedicated Hot Spare|UGood=Unconfigured Good|GHS=Global Hotspare UBad=Unconfigured Bad|Sntze=Sanitize|Onln=Online|Offln=Offline|Intf=Interface Med=Media Type|SED=Self Encryptive Drive|PI=PI Eligible SeSz=Sector Size|Sp=Spun|U=Up|D=Down|T=Transition|F=Foreign UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded UBUnsp=UBad Unsupported|Rbld=Rebuild Enclosures = 1 Enclosure LIST : ============== -------------------------------------------------------------------- EID State Slots PD PS Fans TSs Alms SIM Port# ProdID VendorSpecific -------------------------------------------------------------------- 252 OK 8 4 0 0 0 0 1 - SGPIO -------------------------------------------------------------------- EID=Enclosure Device ID | PD=Physical drive count | PS=Power Supply count TSs=Temperature sensor count | Alms=Alarm count | SIM=SIM Count | ProdID=Product ID ``` 4. 使用以下命令创建VD: ```./storcli64 /c0 add vd type=r0 drives=32:1-3``` 该命令会在控制器0上用32:1、32:2、32:3三块盘创建RAID 0的VD。 常用参数说明: - type: 指定RAID级别,如r0, r1, r5等 - drives: 指定物理磁盘,格式为[EID:]Slot-Slot或[EID:]Slot,Slot - wb: write back策略,默认为on - pdcache: 磁盘缓存策略,默认为on - name: 指定VD名称 - size: 指定VD大小,默认为最大 5. 创建完成后,可以用以下命令查看VD信息: ```./storcli64 /c0 /v0 show``` ``` D:\360安全浏览器下载>storcli64.exe /c0 /v0 show CLI Version = 007.2807.0000.0000 Dec 22, 2023 Operating system = Windows Server 2016 Controller = 0 Status = Success Description = None Virtual Drives : ============== -------------------------------------------------------------- DG/VD TYPE State Access Consist Cache Cac sCC Size Name -------------------------------------------------------------- 0/0 RAID5 Optl RW No RWTD - ON 10.914 TB -------------------------------------------------------------- VD=Virtual Drive| DG=Drive Group|Rec=Recovery Cac=CacheCade|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|dflt=Default|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady B=Blocked|Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled Check Consistency ``` 总之,创建VD的关键是先确定控制器ID和物理磁盘ID,然后用add vd命令指定RAID级别和磁盘即可。可以根据需要调整其他参数如缓存策略、名称和大小等。storcli64还提供更多管理功能,可通过help命令查看完整的命令列表和用法说明。 ## 2.3 清理VD 要清理VD并恢复硬盘到原始状态,可以使用storcli64的delete vd命令删除VD,然后用set drive命令将磁盘状态设置为unconfigured good。具体步骤如下: 1. 输入以下命令列出所有VD: ```./storcli64 /c0 show vd``` 记下要删除的VD的ID,例如0。 2. 使用以下命令删除VD: ```./storcli64 /c0 /v0 del force``` 该命令会强制删除控制器0上的VD 0。注意删除操作不可恢复,请谨慎执行。 3. 删除VD后,原本属于该VD的物理磁盘会变为unconfigured bad状态。需要手动将其状态改为unconfigured good,才能重新用于创建VD或其他用途。 输入以下命令列出所有物理磁盘: ```./storcli64 /c0 show pall``` 记下之前VD包含的磁盘的EID和Slot号,例如32:1。 4. 对每块磁盘,使用以下命令将其设置为unconfigured good状态: ```./storcli64 /c0 /e32 /s1 set good``` 该命令会将控制器0上编号为32:1的磁盘设置为unconfigured good。 5. 重复步骤4,直到所有相关磁盘都已设置为unconfigured good状态。 6. 最后,可以再次用show pall命令查看所有磁盘状态,确认它们都已恢复到原始的unconfigured good状态: ```./storcli64 /c0 show pall``` 这样,原本的VD就被完全删除,相关的物理磁盘也恢复到了初始状态,可以重新用于其他用途了。 注意事项: - 删除VD会导致数据丢失,请确保VD上没有重要数据后再执行删除操作 - 大容量磁盘恢复到unconfigured good状态可能需要较长时间,请耐心等待 - 如果磁盘无法恢复到unconfigured good状态,可能是磁盘已损坏,需要更换磁盘 最后修改:2024 年 05 月 11 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏