cleandisk | Remove storage pool, repository disk and com disk | SSP

cleandisk to remove storage pool, repository disk and com disk metadata

Clean disk command removes any storage pool or cluster data present on hard disk of Virtual Input Output Server (VIOS). After running the cluster remove command we need to clean the remaining meta data that will be present on the Physical Volumes of hard disk. cleandisk command enables VIOS admin user to clean up the repo disk, shared storage pool disk and com disk.



Below is the usage of clean disk. There is a caution on usage of this command as the VIOS may dump restart if the cluster is not removed completely and used this command to clean up the running cluster disk.

cleandisk -r hdiskX
            Cleans the repo disk data from hdiskX

cleandisk -s hdiskX
            Cleans the SSP data from the hdiskX

cleandisk -c hdiskX
            Cleans the com disks data from the hdiskX

cleandisk -r hdiskX -f
            Additional option to force clean the data from hdiskX

Script to clean multiple SSP Disks

Below is the script to clean up the SSP data from hdisk1 to hdisk50 where hdisk0 is termed as rootvg disk and it will be skipped.

#!/usr/bin/ksh

echo "Cleaning the disk starting from hdisk1"
index=1
while [[ $index -lt 50 ]]; do
    yes | cleandisk -f -s `echo hdisk${index}`
    yes | cleandisk -f -r `echo hdisk${index}`
    yes | cleandisk -f -c `echo hdisk${index}`
    index=` expr $index + 1`
done

The script will clean the SSP disk, repo disk and com disk meta data starting from hdisk1 upto hdisk50 we may also change the range and run the script to clean up the SSP Metadata.

Post a Comment

0 Comments