2 ################################################################################
5 # Description: This script will mount a project's logical volumes
6 # Author: Andrew DeFaria (defaria@cup.hp.com)
10 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
12 ################################################################################
14 if [ $(id -u) -ne 0 ]; then
15 print -u2 "$me: Error: You must be root to execute this command!"
20 print -u2 "Usage: $me projectID fileserver"
27 function create_dir_and_mount {
30 mount_over_directory=/tmp_mnt/net/$machine$2
31 if [ ! -d $mount_over_directory ]; then
32 print Making $mount_over_directory
33 mkdir -p $mount_over_directory
36 if [ ! -d $mount_over_directory/lost+found ]; then
37 print Mounting $machine:$mount_directory to $mount_over_directory
38 /usr/sbin/mount $machine:$mount_directory $mount_over_directory
40 } # create_dir_and_mount
42 function kick_automounter {
43 automount_pid=$(/app/sj automount | awk '{print $2}')
45 print Kicking automounter \($automount_pid\)
46 kill -HUP $automount_pid
49 create_dir_and_mount cllvu01 /CLO/Storage/Views/$projectID
50 create_dir_and_mount cllvu02 /CLO/Storage/Views/$projectID
51 create_dir_and_mount cllvu03 /CLO/Storage/Views/$projectID
52 create_dir_and_mount $fileserver /data/proj/$projectID