码迷,mamicode.com
首页 > 其他好文 > 详细

Dell服务器相关操作

时间:2015-05-03 17:35:12      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:服务器   dell   管理   网络   raid   

1. Raid相关:


# 删除已有的Raid配置

MegaCli64 -CfgLdDel -LALL -aALL   


# 获取设备ID和槽号

MegaCli64 -PDList -aALL|egrep ‘Enclosure Device ID|Slot Number‘|awk ‘NR%2==0{print $3};NR%2!=0{print $4;}‘


# 创建Raid5,$sdaslots为构造的符合参数要求的用来创建Raid的磁盘ID和槽号,大小为500G

MegaCli64 -CfgLdAdd -r5 "$sdaslots" WB RA Direct CachedBadBBU -sz500GB -a0


2. 远程管理卡操作,使用sshpass则不需要手动输入密码, $user和$ip分别为iDRAC设备用户名和密码:


# 打开系统电源

sshpass -p $password ssh -o ConnectTimeout=90 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet $user@$ip racadm serveraction powerup


# 打开系统电源从PXE启动,主要是为了通过网络安装系统

sshpass -p $password ssh -o ConnectTimeout=90 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet $user@$ip racadm config -g cfgServerInfo -o cfgServerBootOnce 

sshpass -p $password ssh -o ConnectTimeout=90 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet $user@$ip racadm config -g cfgServerInfo -o cfgServerFirstBootDevice PXE 

sshpass -p $password ssh -o ConnectTimeout=90 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet $user@$ip racadm serveraction powercycle


# 获取系统电源状态

sshpass -p $password ssh -o ConnectTimeout=90 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet $user@$ip racadm serveraction powerstatus 2>/dev/null|awk ‘{print $4}‘


# 关闭系统电源

sshpass -p $password ssh -o ConnectTimeout=90 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet $user@$ip racadm serveraction powerdown


Dell服务器相关操作

标签:服务器   dell   管理   网络   raid   

原文地址:http://blog.csdn.net/flyforfreedom2008/article/details/45459215

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!