Skip to content

Instantly share code, notes, and snippets.

@JohnPreston
Last active March 18, 2016 10:34
Show Gist options
  • Select an option

  • Save JohnPreston/6a77de7f7f03eebb2ed3 to your computer and use it in GitHub Desktop.

Select an option

Save JohnPreston/6a77de7f7f03eebb2ed3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
PHY_DRIVES=`hpssacli ctrl slot=0 show config | grep physicaldrive | awk '{print $2}'`
for phy_drive in $PHY_DRIVES ; do
echo $phy_drive
if [ "$#" -eq 1 ] && [ "$1" == "--apply" ]; then
hpssacli ctrl slot=0 create type=ld raid=0 drives=$phy_drive size=max ss=256 aa=disable
fi
done
# Very quick and dirty script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment