- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Remote Server Management
- >
- Re: Query: New-HPESALogicalDrive multiple logical...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 12:29 PM - last edited on 07-19-2022 09:13 AM by support_s
07-12-2022 12:29 PM - last edited on 07-19-2022 09:13 AM by support_s
New-HPESALogicalDrive multiple logical drives within single RAID5 set
Hi all,
I'm trying to create multiple logical drives within one RAID5 set using the PowerShell HPE SmartArray cmdlets. Doing this in the GUI is easy, but I'm struggling with the automation. It will create the first logical drive and then overwrite it with the second logical drive. Is there any way to create multiple logical drives in one RAID5 set? See code below.
Code:
$Servers= "Server1.domain.local"
$Credential=Get-Credential
ForEach ($Server in $Servers)
{
$SAConnection= Connect-HPESA -IP $Server -Credential $Credential -DisableCertificateAuthentication
$iLOConnection= Connect-HPEiLO -IP $Server -Credential $Credential -DisableCertificateAuthentication
Start-Sleep -s 60
$HostPower= Get-HPEiLoServerPower -Connection $iLOConnection
If ($HostPower.Power -eq "Off")
{
Set-HPEiLoServerPower -Connection $iLOConnection -Power on
}
Else
{
Reset-HPEiLO -Connection $iLOConnection -Device Server -Confirm:$false
}
Start-Sleep -s 60
$ControllerConfiguration= Get-HPESAConfigurationStatus -Connection $SAConnection
$SlotNumber= $ControllerConfiguration.ConfigurationStatus.ControllerLocation
$LogicalDrive= Get-HPESALogicalDrive -Connection $SAConnection
$RemoveLogicalDrives= $LogicalDrive.LogicalDrive.VolumeUniqueIdentifier
ForEach ($RemoveLogicalDrive in $RemoveLogicalDrives)
{
Remove-HPESALogicalDrive -Connection $SAConnection -ControllerLocation $SlotNumber -VolumeUniqueIdentifier $RemoveLogicalDrive
}
Start-Sleep -s 60
$HostPower= Get-HPEiLoServerPower -Connection $iLOConnection
If ($HostPower.Power -eq "Off")
{
Set-HPEiLoServerPower -Connection $iLOConnection -Power on
}
Else
{
Reset-HPEiLO -Connection $iLOConnection -Device Server -Confirm:$false
}
Start-Sleep -s 30
$PhysicalDrives= Get-HPESAPhysicalDrive -Connection $SAConnection -ControllerLocation $SlotNumber
$PhysicalDrivesSorted= $PhysicalDrives.PhysicalDrive.Location | Sort-Object
$Drive0= $PhysicalDrivesSorted[0]
$Drive1= $PhysicalDrivesSorted[1]
$Drive2= $PhysicalDrivesSorted[2]
$Drive3= $PhysicalDrivesSorted[3]
New-HPESALogicalDrive -Connection $SAConnection -ControllerLocation $SlotNumber -LogicalDriveName LogicalDrive1 -Raid Raid5 -DataDrive @(,@("$Drive0","$Drive1","$Drive2","$Drive3")) -CapacityGiB 150
Start-Sleep -s 30
Set-HPEiLoServerPower -Connection $iLOConnection -Power Off
Start-Sleep -s 30
Set-HPEiLoServerPower -Connection $iLOConnection -Power On
Start-Sleep -s 120
New-HPESALogicalDrive -Connection $SAConnection -ControllerLocation $SlotNumber -LogicalDriveName LogicalDrive2 -Raid Raid5 -DataDrive @(,@("$Drive0","$Drive1","$Drive2","$Drive3")) -CapacityGiB -1
Start-Sleep -s 30
Set-HPEiLoServerPower -Connection $iLOConnection -Power Off
Start-Sleep -s 60
$HostPower= Get-HPEiLoServerPower -Connection $iLOConnection
If ($HostPower.Power -eq "Off")
{
Set-HPEiLoServerPower -Connection $iLOConnection -Power on
}
Else
{
Reset-HPEiLO -Connection $iLOConnection -Device Server -Confirm:$false
}
Disconnect-HPEiLO -Connection $iLOConnection
Disconnect-HPESA -Connection $SAConnection
}
Thanks,
Todd
- Tags:
- drive
- Prolaint server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 01:30 PM
07-12-2022 01:30 PM
Query: New-HPESALogicalDrive multiple logical drives within single RAID5 set
System recommended content:
1. HPE XP Storage RAID Manager Reference Guide (01.67.01)
2. HPE XP Storage RAID Manager Installation and Configuration User Guide (1.67.00)
Please click on "Thumbs Up/Kudo" icon to give a "Kudo".
Thank you for being a HPE valuable community member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 01:33 PM
07-12-2022 01:33 PM
Re: Query: New-HPESALogicalDrive multiple logical drives within single RAID5 set
Hello - thank you for your response, but is on a Gen10 server, not XP storage device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2022 07:21 PM
07-17-2022 07:21 PM
Re: Query: New-HPESALogicalDrive multiple logical drives within single RAID5 set
Greetings!
It looks like New-HPESALogicalDrive is designed to create the initial OS logical drive. It will accept multiple objects to enable multiple Logical drives to be created on multiple iLO destinations, but not multiple drives to a single iLO destination. The limitation is iLO REST will only accept a single Logical Drive creation operation at a time and purely for the purpose of creating the initial OS drive.
Having said that, I would advise you to log a support ticket so that this scenario of creating multiple logical drives can be tested further in the lab.
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
