Hi,
I am new to perl and trying to write script which will verify first if veritas volume manager is running. if it is running then stop it and print the output veritas volume manager has stopped.
i wrote below code but not able to print it like " volume <volume name> has stopped.
#verify volume is in running state #!/usr/local/bin/perl @list = ("vxinfo -g <diskgroup name> <volumename>","vxinfo -g <diskgr +oup name> <volumename>" "); # foreach loop execution foreach $a (@list){ $result = `$a`; print "output of command $a is $result\n"; }
i need to check here if volume is running then stop it else print error. but i am not able to write code. also in above section it is printing output of commnad is. i need output "status of volume is :"
print "stopping the volume\n"; $vol1 = `vxvol -g <diskgroup name> stop <volumename>`; $vol2 = `vxvol -g <diskgroup name> stop <volumename>`;
need code for verify voulume is stopped and print it like "volume <volume name > has stopped"
In reply to script to stop veritas volume manager by dnyan_linux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |