During pureScale instance creation, you might run into instance creation failed condition. Under some circumstances, it is possible that db2icrt does not perform a proper clean-up for GPFS and it may fail next time complaining that the disk is already a GPFS disk. When NSDs are created, GPFS writes the
inode table at several places for recovery purposes and by simply using dd command to wipe out first few KB at starting of the disk may not be sufficient at times and GPFS signatures are still there.
What is the easiest way to clean / remove GPFS signatures from the disk?
You can use the following commands to first create a GPFS cluster, start it and then create NSD and then delete it. This will remove the disk cleanly.
#!/bin/bash DOMAIN=zinox.com NODE=db2test01 PEERDOMAIN=gpfs DISK=/dev/sdc mmcrcluster -N $NODE:manager-quorum -p $NODE \ -R /usr/bin/scp -r /usr/bin/ssh -C $PEERDOMAIN -U $DOMAIN mmchlicense server --accept -N $NODE mmstartup -a mmgetstate -a sleep 10 cat << EOF | tee disk.txt %nsd: device=$DISK nsd=nsd01 usage=dataAndMetadata EOF mmcrnsd -F disk.txt -v no mmdelnsd -F disk.txt mmshutdown mmdelnode $NODE mmlscluster
The most important commands are
mmcrnsd -F disk.txt -v no using -v switch to no and then
mmdelnsd -F disk.txt.