Dash of Bash
July 28th, 2010
In an effort to remember things that I’ve forgotten, here’s a little ditty to mount/umount a drive on Solaris. The drive in this case happens to be a SAN.
#!/usr/bin/bash
echo -n “Shall we play a game.. enter m or um:”
act1=”m”
act2=”um”
read myax
echo
echo -n “You selected $myax”
echo
if [ "$myax" = "$act1" ]; then
mount -F ufs /dev/dsk/c7t60060160F396110072EA3A6E4BFCD811d0s6 /dassan
echo “Mounted…”
echo
echo “Running df because I am cool like that”
echo “—————————————-”
df
echo “—————————————-”
elif [ "$myax" = "$act2" ]; then
umount /dassan
echo “Running df just to check …”
echo
df
echo
else
echo “No Soup for you”
fi