2 ################################################################################
4 # File: remount_viewserver
5 # Description: This script will remount a viewservers LVMs. This is handy
6 # when a viewserver goes down and needs to be remounted to
8 # Author: Andrew DeFaria (defaria@cup.hp.com)
12 # (c) Copyright 1998, Hewlett-Packard Company, all rights reserved.
15 ################################################################################
17 if [ $(id -u) -ne 0 ]; then
18 print -u2 "$me: Error: You must be root to execute this command!"
23 print -u2 "Usage: $me viewserver"
30 cd /tmp_mnt/net/$viewserver/CLO/Storage/Views
32 print Mounting $viewserver:/CLO/Storage/Views/$dir to $PWD/$dir
33 /usr/sbin/mount $viewserver:/CLO/Storage/Views/$dir $PWD/$dir 2>&1 |
34 grep -v "already mounted"
39 function kick_automounter {
40 automount_pid=$(/app/sj automount | awk '{print $2}')
42 print Kicking automounter \($automount_pid\)
43 kill -HUP $automount_pid