Giter Club home page Giter Club logo

Comments (18)

jonas-werner avatar jonas-werner commented on September 27, 2024 3

@eligosfx I think the easiest way would be to use SCP files as per the following:

  1. Configure RAID on a template server
  2. Export SCP (server configuration profile) in "clone" mode so the RAID settings aren't commented out
  3. Edit the resulting XML SCP file so only RAID settings remain
  4. Use Redfish to import the XML file to new servers (Note: this will result in a reboot)

@texroemer If you know of a better way please let us know :-)

from idrac-redfish-scripting.

eligosfx avatar eligosfx commented on September 27, 2024

from idrac-redfish-scripting.

jonas-werner avatar jonas-werner commented on September 27, 2024

The SCP files are in XML format by default (JSON can also be used though) there are several Import Redfish scripts on this site that can be used to push that XML to a target server. For example "ImportSystemConfigurationLocalFilenameREDFISH.py".

Changes to RAID would result in the system rebooting automatically. Any existing data on the disks would be wiped of course.

You could use Redfish for export too. For example:
Use "ExportSystemConfigurationLocalREDFISH.py" to export server settings (use RAID for the last argument for just the RAID settings) from the template server. Then use "ImportSystemConfigurationLocalFilenameREDFISH.py" to import it to the target server.

The following video shows SCP export and import. Please give us a shout if you have questions.
https://youtu.be/XI8net5mB60

Note:
The Redfish SCP export probably exports in normal, not clone mode. This means many of the RAID options would be commented out. Either modify the file to uncomment those lines or use RACADM for the
export. This is described in the following doc:
http://en.community.dell.com/cfs-file/__key/telligent-evolution-components-attachments/13-4491-00-00-20-43-93-35/Server-Cloning-with-Server-Configuration-Profiles-1_5F00_1-Final.pdf?forcedownload=true

Example: racadm get -f file -t xml -u myuser -p mypass -l //192.168.100.50/share -clone

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

Currently Dell doesn't support Redfish Storage Volume as stated in the Redfish Schema but support will be available next 14G iDRAC release in Q2 of this year (new Python scripts and cmdlets will be available once this version of iDRAC has been released). But Dell currently supports all storage controller operations using OEM Server Configuration Profile (SCP) using Redfish. Using this OEM feature has multiple advantages over Redfish Storage Volume. Some advantages are:

  • Create RAID levels 6 and 60 besides other supported RAID levels
  • Change the controller encryption key or remove the key
  • Lock a virtual disk
  • Create Dedicated or global hot spares
  • Configure Virtual Disk and storage controller attributes
  • Import or clear a foreign configuration
  • Reset the controller
  • Stack operations, only execute one POST command. Example: In the SCP configuration file, you can stack reset the controller, create VD, set the controller key, assign global hot spare.

The only disadvantage of using SCP compared to Storage Volume is the server needs to reboot to apply the storage configuration changes. Using Storage Volume, configuration changes get applied in real time with no server reboot needed.

Here's a workflow example of using SCP to export only RAID configuration locally to my system which i currentlty have a RAID 1 created. I will modify the SCP file to change size to 0 and RAID Types to RAID 0. Finally i will import this modified SCP file which once the job is marked completed, i will now have a RAID 0 created.

C:\Python27>racadm -r 192.168.0.120 -u root -p calvin storage get vdisks -o
Security Alert: Certificate is invalid - Certificate is not signed by Trusted Third Party
Continuing execution. Use -S option for racadm to stop execution on certificate-related errors.
Disk.Virtual.0:RAID.Slot.6-1
Status = Ok
DeviceDescription = Virtual Disk 0 on RAID Controller in Slot 6
Name = Virtual Disk 0
RollupStatus = Ok
State = Online
OperationalState = Background Initialization
Progress = 67 %
Layout = Raid-1
Size = 558.375 GB
SpanDepth = 1
AvailableProtocols = SAS
MediaType = HDD
ReadPolicy = Read Ahead
WritePolicy = Write Back
StripeSize = 256K
DiskCachePolicy = Disabled
BadBlocksFound = NO
Secured = NO
RemainingRedundancy = 1
EnhancedCache = Not Applicable
T10PIStatus = Disabled
BlockSizeInBytes = 512

C:\Python27>ExportSystemConfigurationLocalREDFISH.py -ip 192.168.0.120 -u root -p calvin -t RAID -e Clone

  • Job ID "JID_217233648672" successfully created for ExportSystemConfiguration method

@odata.type: #Task.v1_1_0.Task
Description: Server Configuration and other Tasks running on iDRAC are listed here
TaskState: Running
Messages: [{u'Message': u'Exporting Server Configuration Profile.', u'MessageId': u'SYS057', u'MessageArgs': [], u'[email protected]': 0}]
@odata.id: /redfish/v1/TaskService/Tasks/JID_217233648672
@odata.context: /redfish/v1/$metadata#Task.Task
TaskStatus: Ok
[email protected]: 1
StartTime: 2018-03-22T07:56:04-05:00
Oem: {u'Dell': {u'@odata.type': u'#DellManager.v1_0_0.DellManager', u'Jobs': {u'@odata.id': u'/redfish/v1/Managers/iDRAC.Embedded.1/Jobs'}}}
EndTime: 1969-12-31T18:00:00-06:00
Id: JID_217233648672
Name: Export: Server Configuration Profile

@odata.type: #Task.v1_1_0.Task
Description: Server Configuration and other Tasks running on iDRAC are listed here
TaskState: Running
Messages: [{u'Message': u'Exporting Server Configuration Profile.', u'MessageId': u'SYS057', u'MessageArgs': [], u'[email protected]': 0}]
@odata.id: /redfish/v1/TaskService/Tasks/JID_217233648672
@odata.context: /redfish/v1/$metadata#Task.Task
TaskStatus: Ok
[email protected]: 1
StartTime: 2018-03-22T07:56:04-05:00
Oem: {u'Dell': {u'@odata.type': u'#DellManager.v1_0_0.DellManager', u'Jobs': {u'@odata.id': u'/redfish/v1/Managers/iDRAC.Embedded.1/Jobs'}}}
EndTime: 1969-12-31T18:00:00-06:00
Id: JID_217233648672
Name: Export: Server Configuration Profile

  • Export locally successfully passed. Attributes exported:

SystemConfiguration Model="PowerEdge R740xd" ServiceTag="CDZZR71" TimeStamp="Thu Mar 22 07:56:06 2018">
!--Export type is Clone,XML,Selective-->
!--Exported configuration may contain commented attributes. Attributes may be commented due to dependency, destructive nature, preserving server identity or for security reasons.-->
Component FQDD="RAID.Slot.6-1">
Attribute Name="RAIDresetConfig">True
Attribute Name="RAIDforeignConfig">Clear
Attribute Name="RAIDrekey">False
Attribute Name="EncryptionMode">None
!-- -->
!-- -->
!--
-->
Attribute Name="RAIDprMode">Automatic
Attribute Name="RAIDPatrolReadUnconfiguredArea">Enabled
Attribute Name="RAIDloadBalancedMode">Automatic
Attribute Name="RAIDccMode">Normal
Attribute Name="RAIDcopybackMode">On
Attribute Name="RAIDControllerBootMode">Headless Safe Mode
Attribute Name="RAIDEnhancedAutoImportForeignConfig">Disabled
Attribute Name="RAIDrebuildRate">30
Attribute Name="RAIDbgiRate">30
Attribute Name="RAIDccRate">10
Attribute Name="RAIDreconstructRate">30
Component FQDD="Disk.Virtual.0:RAID.Slot.6-1">
Attribute Name="RAIDaction">Create
Attribute Name="LockStatus">Unlocked
Attribute Name="RAIDinitOperation">None
Attribute Name="DiskCachePolicy">Disabled
Attribute Name="RAIDdefaultWritePolicy">WriteBack
Attribute Name="RAIDdefaultReadPolicy">ReadAhead
Attribute Name="Name">Virtual Disk 0
Attribute Name="Size">599550590976
Attribute Name="StripeSize">512
Attribute Name="SpanDepth">1
Attribute Name="SpanLength">2
Attribute Name="RAIDTypes">RAID 1
Attribute Name="IncludedPhysicalDiskID">Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.6-1
Attribute Name="IncludedPhysicalDiskID">Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.6-1
/Component>
Component FQDD="Enclosure.Internal.0-1:RAID.Slot.6-1">
Component FQDD="Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.6-1">
Attribute Name="RAIDHotSpareStatus">No
Attribute Name="RAIDPDState">Ready
/Component>
Component FQDD="Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.6-1">
Attribute Name="RAIDHotSpareStatus">No
Attribute Name="RAIDPDState">Ready
/Component>
/Component>
/SystemConfiguration>

  • WARNING, final job status results -

@odata.type: #DellJob.v1_0_0.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_217233648672
@odata.context: /redfish/v1/$metadata#DellJob.DellJob
MessageArgs: []
CompletionTime: 2018-03-22T07:56:08
PercentComplete: 100
StartTime: TIME_NOW
MessageId: SYS043
Message: Successfully exported Server Configuration Profile
EndTime: None
Id: JID_217233648672
JobType: ExportConfiguration
Name: Export Configuration

Exported attributes also saved in file: 2018-3-22_95612_export.xml

C:\Python27>ImportSystemConfigurationLocalFilenameREDFISH.py -ip 192.168.0.120 -u root -p calvin -t RAID -f 2018-3-22_95612_export.xml -s Forced

  • JID_217252600182 successfully created for ImportSystemConfiguration method

  • Job not marked completed, current status is: Running

  • Message: Importing Server Configuration Profile.

  • Job not marked completed, current status is: Running

  • Message: Updating component configuration.

  • Job not marked completed, current status is: Running

  • Message: Updating component configuration.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job not marked completed, current status is: Running

  • Message: Staged component configuration is complete.

  • Job ID = JID_217252600182

  • Name = Import Configuration

  • Message = Successfully imported and applied Server Configuration Profile.

  • JID_217252600182 completed in: 0:06:51

C:\Python27>racadm -r 192.168.0.120 -u root -p calvin storage get vdisks -o
Security Alert: Certificate is invalid - Certificate is not signed by Trusted Third Party
Continuing execution. Use -S option for racadm to stop execution on certificate-related errors.
Disk.Virtual.0:RAID.Slot.6-1
Status = Ok
DeviceDescription = Virtual Disk 0 on RAID Controller in Slot 6
Name = Virtual Disk 0
RollupStatus = Ok
State = Online
OperationalState = Not applicable
Layout = Raid-0
Size = 1116.750 GB
SpanDepth = 1
AvailableProtocols = SAS
MediaType = HDD
ReadPolicy = Read Ahead
WritePolicy = Write Back
StripeSize = 256K
DiskCachePolicy = Disabled
BadBlocksFound = NO
Secured = NO
RemainingRedundancy = 0
EnhancedCache = Not Applicable
T10PIStatus = Disabled
BlockSizeInBytes = 512

C:\Python27\master_scripts_modified>

from idrac-redfish-scripting.

kgrvamsi avatar kgrvamsi commented on September 27, 2024

@texroemer what is the redfish api to view the current raid devices?

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

@kgrvamsi

For iDRAC 9 3.21 and iDRAC 7/8 3.21, GET on URI "redfish/v1/Systems/System.Embedded.1/Storage" will report all your storage controllers in the server. Append any controller instance ID to this URI (example: redfish/v1/Systems/System.Embedded.1/Storage/RAID.Slot.6-1" and it will return URIs for all drives behind that storage controller. You can take each drive URI (example: /redfish/v1/Systems/System.Embedded.1/Storage/Drives/Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.6-1), run a GET on it to see detailed information for that drive. You should also see Volumes URI stated (example: /redfish/v1/Systems/System.Embedded.1/Storage/RAID.Slot.6-1/Volumes) which running a GET will return all RAID volumes for that controller.

from idrac-redfish-scripting.

 avatar commented on September 27, 2024

Do you know if the ImportSystemConfigurationLocalFilenameREDFISH.py will reset the VD configuration like the command "wsman -invoke ResetConfig" did?

I'm upgrading our server maintenance/build scripts to leverage Redfish, and our server build currenlty does this

wsman invoke -a ResetConfig ... #to erase current vdisk configuration
wsman invoke -a CreateVirtualDisk ... #on each disk, including boot, using an xml to supply parameters
wsman invoke -a CreateTargetedConfigJob ... #to apply the new configuration

I'm trying to do these 3 steps using redfish as wsman is pretty old and throws error with the iDrac 9/R740xd servers.

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

Hi @jgoochcmcast,

Yes you can reset the controller along with create virtual disk using ImportSystemConfigurationLocalFilenameREDFISH.py script with Redfish. This scripts uses a feature called Server Configuration Profile (SCP) which is a DELL OEM supported feature. In the SCP file, you modify all the changes you need and only need to execute one POST command to apply it. In the SCP file under the RAID FQDD node, you will see attribute "ResetConfig", set this value to "True" to reset the controller. To create a virtual disk, there will be RAIDaction attribute under the nested VD FQDD node. Set this to "Create" along with other VD attributes listed to create the desired VD you want.

Example below is modified SCP file which will reset the controller and create a one disk RAID 0 using the full disk size.

<SystemConfiguration>
<Component FQDD="RAID.Integrated.1-1">
    <Attribute Name="RAIDresetConfig">True</Attribute>
    <Attribute Name="RAIDforeignConfig">Clear</Attribute>
    <Attribute Name="CurrentControllerMode">RAID</Attribute>
    <!-- <Attribute Name="KeyID"></Attribute>-->
    <Attribute Name="RAIDprMode">Automatic</Attribute>
    <Attribute Name="RAIDPatrolReadUnconfiguredArea">Enabled</Attribute>
    <Attribute Name="RAIDloadBalancedMode">Automatic</Attribute>
    <Attribute Name="RAIDccMode">Normal</Attribute>
    <Attribute Name="RAIDcopybackMode">Off</Attribute>
    <Attribute Name="RAIDpersistentHotspare">Disabled</Attribute>
    <Attribute Name="RAIDControllerBootMode">Continue Boot On Error</Attribute>
    <Attribute Name="RAIDEnhancedAutoImportForeignConfig">Disabled</Attribute>
    <Attribute Name="RAIDrebuildRate">80</Attribute>
    <Attribute Name="RAIDbgiRate">30</Attribute>
    <Attribute Name="RAIDccRate">30</Attribute>
    <Attribute Name="RAIDreconstructRate">70</Attribute>
    <Component FQDD="Disk.Virtual.0:RAID.Integrated.1-1">
        <Attribute Name="RAIDaction">Create</Attribute>
        <Attribute Name="RAIDinitOperation">None</Attribute>
        <Attribute Name="DiskCachePolicy">Default</Attribute>
        <Attribute Name="RAIDdefaultWritePolicy">WriteThrough</Attribute>
        <Attribute Name="RAIDdefaultReadPolicy">NoReadAhead</Attribute>
        <Attribute Name="Name">Virtual Disk 0</Attribute>
        <Attribute Name="Size">0</Attribute>
        <Attribute Name="StripeSize">128</Attribute>
        <Attribute Name="SpanDepth">1</Attribute>
        <Attribute Name="SpanLength">1</Attribute>
        <Attribute Name="RAIDTypes">RAID 0</Attribute>
        <Attribute Name="IncludedPhysicalDiskID">Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1</Attribute>
    </Component>
    <Component FQDD="Enclosure.Internal.0-1:RAID.Integrated.1-1">
        <Component FQDD="Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1">
            <Attribute Name="RAIDHotSpareStatus">No</Attribute>
            <Attribute Name="RAIDPDState">Ready</Attribute>
        </Component>
        <Component FQDD="Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1">
            <Attribute Name="RAIDHotSpareStatus">No</Attribute>
            <Attribute Name="RAIDPDState">Ready</Attribute>
        </Component>
        <Component FQDD="Disk.Bay.3:Enclosure.Internal.0-1:RAID.Integrated.1-1">
            <Attribute Name="RAIDHotSpareStatus">No</Attribute>
            <Attribute Name="RAIDPDState">Ready</Attribute>
        </Component>
    </Component>
</Component>
</SystemConfiguration>

from idrac-redfish-scripting.

 avatar commented on September 27, 2024

Trying the Export/Import method, export RAID config to file works, but the import job fails on IDrac 9. The job gets to 99% and then times out.

SYS072: Import of Server Configuration Profile timed out.

For iDrac 7 I was able to export config, delete the vdisk 0 , and recreated it using the import config script. No timeout on the job.

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

@jgoochcmcast

For the first issue you had with unauthorized error message, this was a script issue. For one of the POST calls in the script, it had iDRAC username / password hard coded which i have fixed and uploaded new script to GitHub, sorry about that.

For the import job times out issue with iDRAC 9, was the server back into an idle state, it was not stuck in POST correct when the job was marked as failed for timeout? Also when you execute SCP import operation, what's the current state of the server? Is it booted into the OS, off state, idle in F2, etc?

from idrac-redfish-scripting.

 avatar commented on September 27, 2024

For the import job times out issue with iDRAC 9, was the server back into an idle state, it was not stuck in POST correct when the job was marked as failed for timeout? Also when you execute SCP import operation, what's the current state of the server? Is it booted into the OS, off state, idle in F2, etc?

I discovered that the timeout was due to the LCC being stuck at about 90% progress while collecting inventory. I rebooted the server, no change. Then I did a soft reset on the iDRAC , which resolved the issue.

I didn't experience the issue on any of the other 3 of 4 servers that I'm working on. So far I like Redfish. Is there a centralized repository of endpoints with parameters ,responses, and perhaps examples?

I coworker located an Ansible redfish playbook repo on github which I'll check out.,

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

For supported parameters per request command, the schema is the best documentation to reference. It will go into details on what parameters are supported per request command along with supported values and what type of value you pass in (string, boolean, etc). For SCP, you would want to use "redfish/v1/Schemas/OemManager_v1.xml" schema.

For responses, refer to Dell Redfish API guide "https://topics-cdn.dell.com/pdf/idrac9-lifecycle-controller-v3.15.15.15_api-guide_en-us.pdf". This will go into details for supported request commands along with status code returns and what each status code means.

For examples, we have multiple Redfish whitepapers on Dell support site "https://www.dell.com/support/article/us/en/04/sln312830/white-papers?lang=en". Btw, Dell used to have whitepapers posted on Dell tech center but IT is currently in the process of moving them to Dell support site. If you don't see a whitepaper with example you need, let me know and i can send you one.

from idrac-redfish-scripting.

ma-husyk avatar ma-husyk commented on September 27, 2024

Just for understanding, the iDRAC8 Servers have to be done by SCP_XML Files and the new iDRAC9 Servers can be done by Scripts from here.

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

@ma-husyk

Latest versions of firmware for iDRAC 7/8 and 9 now support Redfish DMTF Storage RAID Actions. iDRAC 7/8 version is 2.60 and iDRAC 9 is 3.21. Now with the latest iDRAC firmware, you can run either single RAID DMTF Actions or still use Server Configuration Profile (SCP) feature to perform RAID workflows.

from idrac-redfish-scripting.

eligosfx avatar eligosfx commented on September 27, 2024

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

@eligosfx

Dell has a whitepaper online which walks you through use case scenarios for using Redfish API storage methods. They explain in detail walking you through workflows of performing Storage methods.

https://downloads.dell.com/manuals/all-products/esuprt_solutions_int/esuprt_solutions_int_solutions_resources/dell-management-solution-resources_white-papers10_en-us.pdf

from idrac-redfish-scripting.

ma-husyk avatar ma-husyk commented on September 27, 2024

@texroemer

  1. I also have the same Problem with missing -compress with the Invoke-CreateVirtualDiskREDFISH.
    After I add it to the code I can create VDisks.

  2. Is it planed to also set HotSpare Disks with Redfish, without it I have to use SCP Files for HotSpare wich will be a big pain.

from idrac-redfish-scripting.

texroemer avatar texroemer commented on September 27, 2024

@ma-husyk

Thanks for pointing this out. I corrected all cmdlets for Storage and Network to work with iDRAC 7/8 and iDRAC 9 now.

For assigning hotspares with Redfish, DMTF does not support this but Dell will be adding OEM support for next iDRAC releases. This support will be coming in iDRAC 9 3.30 and iDRAC 7/8 2.70 releases which are scheduled to be released next year (3.30 in March, 2.70 in June). For now if you want to use Redfish API with iDRAC to assign hotspares, you will have to use SCP. If you are ok with not using Redfish, we also support individual method assigning hotspares using either RACADM or WSMAN.

from idrac-redfish-scripting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.