@@ -219,7 +219,7 @@ device_name=fsxontap
219219# multipaths {
220220# multipath {
221221# wwid 3600a0980${serialHex}
222- # alias ${device_name }
222+ # alias ${VOLUME_NAME }
223223# }
224224# }
225225# Assign name to block device, this should be function that will get serial hex and device name
@@ -228,7 +228,6 @@ logMessage "${commandDescription}"
228228cp /etc/multipath.conf /etc/multipath.conf_backup
229229
230230SERIAL_HEX=$serialHex
231- # ALIAS=$device_name
232231ALIAS=$VOLUME_NAME
233232CONF=/etc/multipath.conf
234233chmod o+rw $CONF
240239 printf " multipaths {\n\tmultipath {\n\t\twwid 3600a0980$SERIAL_HEX \n\t\talias $ALIAS \n\t}\n}" >> $CONF
241240fi
242241
243- fileContent=$( cat $CONF )
242+ fileContent=" $( cat $CONF ) "
244243logMessage " Updated /etc/multipath.conf file content: $fileContent "
245244
246245commandDescription=" Restart the multipathd service for the changes at: /etc/multipathd.conf will take effect."
@@ -283,7 +282,7 @@ checkCommand "${commandDescription}"
283282addUndoCommand " rm -rf /$directory_path /$mount_point "
284283
285284# check this command
286- # volume_name=the frindly device name as we set it in the multipath.conf file
285+ # volume_name=the friendly device name as we set it in the multipath.conf file
287286commandDescription=" Creating the file system for the new partition: /dev/mapper/${ALIAS} "
288287logMessage " ${commandDescription} "
289288mkfs.ext4 /dev/mapper/$ALIAS
@@ -295,13 +294,13 @@ mount -t ext4 /dev/mapper/$ALIAS /$directory_path/$mount_point
295294checkCommand " ${commandDescription} "
296295addUndoCommand " umount /$directory_path /$mount_point "
297296
298- username=$( whoami)
299- chown $username :$username /$directory_path /$mount_point
300-
301297# verify read write
302298# example: echo "test mount iscsci" > /mnt/myIscsi/testIscsi.txt
299+ commandDescription=" Verify read write on the mounted file system"
300+ logMessage " ${commandDescription} "
303301echo " test mount iscsci" > /$directory_path /$mount_point /testIscsi.txt
304302cat /$directory_path /$mount_point /testIscsi.txt
303+ checkCommand " ${commandDescription} "
305304rm /$directory_path /$mount_point /testIscsi.txt
306305
307306logMessage " Mounting the FSXn iSCSI volume was successful."
0 commit comments