Script to gather hdisk attribute
Step 1: Choose a server where you can access all your LPAR’s
Step 2: Generate a key from the chosen server and then scp same key to LPAR under /root
Step 3: Now, You can execute the below script from chosen server
Note:- In our case, We have chosen NIM server as our source server where the script to be executed
server – Should contain LPAR or server name
Name of the script: hdisk_attribute.sh
echo Server Name,Disk,algorithm,queue_depth,reserve_policy,Volume Group,Volume Group Status for hdisk_attribute_list in `cat server` do for hdsk in `ssh $hdisk_attribute_list lspv |awk '{print $1}'` do algo=`ssh $hdisk_attribute_list lsattr -El $hdsk |grep algorithm |awk '{print $2}'` quede=`ssh $hdisk_attribute_list lsattr -El $hdsk |grep queue_depth |awk '{print $2}'` respl=`ssh $hdisk_attribute_list lsattr -El $hdsk |grep reserve_policy |awk '{print $2}'` vg=`ssh $hdisk_attribute_list lspv |grep -w $hdsk |awk '{print $3}'` vg_state=`ssh $hdisk_attribute_list lspv |grep -w $hdsk |awk '{print $4}'` echo $hdisk_attribute_list,$hdsk,$algo,$quede,$respl,$vg,$vg_state done done
Script to gather fscsi attribute
Step 1: Choose a server where you can access all your LPAR’s
Step 2: Generate a key from the chosen server and then scp same key to LPAR under /root
Step 3: Now, You can execute the below script from chosen server
Note:- In our case, We have chosen NIM server as our source server where the script to be executed
server – Should contain LPAR or server name
Name of the script: fscsi_attribute.sh
echo Server Name,fscsi,fc_err_recov,dyntrk for fscsi_attribute_list in `cat server` do for fcs in `ssh $fscsi_attribute_list lsdev -C |grep fscsi |grep Available |awk '{print $1}'` do fc_err_recov=`ssh $fscsi_attribute_list lsattr -El $fcs |grep fc_err_recov |awk '{print $2}'` dyntrk=`ssh $fscsi_attribute_list lsattr -El $fcs |grep dyntrk |awk '{print $2}'` echo $fscsi_attribute_list,$fcs,$fc_err_recov,$dyntrk done done
Script to gather vscsi attribute
Step 1: Choose a server where you can access all your LPAR’s
Step 2: Generate a key from the chosen server and then scp same key to LPAR under /root
Step 3: Now, You can execute the below script from chosen server
Note:- In our case, We have chosen NIM server as our source server where the script to be executed
server – Should contain LPAR or server name
Name of the script: vscsi_attribute.sh
echo Server Name,vscsi,vscsi_err_recov,vscsi_path_to for vscsi_attribute_list in `cat server` do for vcs in `ssh $vscsi_attribute_list lsdev -C |grep vscsi |awk '{print $1}'` do vscsi_err_recov=`ssh $vscsi_attribute_list lsattr -El $vcs |grep vscsi_err_recov |awk '{print $2}'` vscsi_path_to=`ssh $vscsi_attribute_list lsattr -El $vcs |grep vscsi_path_to |awk '{print $2}'` echo $vscsi_attribute_list,$vcs,$vscsi_err_recov,$vscsi_path_to done done