Automounts

From CLONWiki
Revision as of 09:22, 10 September 2013 by 129.57.76.91 (talk) (→‎RHEL5)
Jump to navigation Jump to search

Solaris

Solaris automounts on CLON cluster controls by following files:

/etc/auto_master

/-      /etc/auto_direct
/-      auto_direct.ep
/u      auto.u.ep
/w      auto.w.ep

Specific for mounting Computer Center /w areas at higher speed:

instead of line

/w      auto.w.ep

insert line

/w      /etc/auto_stage

and create /etc/auto_stage file containing following:

stage0 -rsize=1048576,wsize=1048576 sfs61:/export/stage
stage1 -rsize=1048576,wsize=1048576 sfs56:/export/stage
stage2 -rsize=1048576,wsize=1048576 sfs59:/export/stage
+auto.w.ep


/etc/auto_direct (replace SunOS_sun4u by SunOS_i86pc for Opteron/Intel-based Solaris machines)

#
# auto_direct
#
#machine-dependent system directories
/apps                 -rw,bg     clonfs1:/vol/apps/SunOS_sun4u
/usr/local            -rw,bg     clonfs1:/vol/local/SunOS_sun4u
#machine-independent system directories
/mnt/downloads        -rw,bg     clonfs1:/vol/downloads
/home                 -rw,bg     clonfs1:/vol/home
/work                 -rw,bg     clonfs1:/vol/work
/scratch              -rw,bg     clonfs1:/vol/scratch
#machine-independent clas directories
/usr/clas             -rw,bg     clonfs1:/vol/clas
/mnt/archives         -rw,bg     clonfs1:/vol/archives
/mnt/logs             -rw,bg     clonfs1:/vol/logs
#
#some machines are using following mounts from clon10
/data                 -rw,bg     clon10:/data
/raidold              -rw,bg     clon10:/raidold
#clon00/clon10 admin clonfs1/clonfs2 mounts
/mnt/admin/clonfs2	      -rw,bg  clonfs2:/
/mnt/admin/clonfs1            -rw,bg  clonfs1:/
/mnt/admin/clonfs1-apps       -rw,bg  clonfs1:/vol/apps
/mnt/admin/clonfs1-archives   -rw,bg  clonfs1:/vol/archives
/mnt/admin/clonfs1-clas       -rw,bg  clonfs1:/vol/clas
/mnt/admin/clonfs1-clonweb    -rw,bg  clonfs1:/vol/clonweb
/mnt/admin/clonfs1-clonwiki   -rw,bg  clonfs1:/vol/clonwiki
/mnt/admin/clonfs1-downloads  -rw,bg  clonfs1:/vol/downloads
/mnt/admin/clonfs1-home       -rw,bg  clonfs1:/vol/home
/mnt/admin/clonfs1-local      -rw,bg  clonfs1:/vol/local
/mnt/admin/clonfs1-logs       -rw,bg  clonfs1:/vol/logs
/mnt/admin/clonfs1-mysql      -rw,bg  clonfs1:/vol/mysql
/mnt/admin/clonfs1-scratch    -rw,bg  clonfs1:/vol/scratch
/mnt/admin/clonfs1-work       -rw,bg  clonfs1:/vol/work
#

It is important to run cronjobs on clon00 to access those directories occationally to keep them mounted, so Nagios can check their free space.

Solaris symbolic links

cd /
ln -s /u/site site

RHEL5

/etc/auto.master must looks like following (for 64bit, use -DOSNAME=Linux-RHEL5-64);

/misc   /etc/auto.misc  --timeout 60
/u      yp:auto.u.bb    -DOSNAME=Linux-RHEL5

/etc/auto.misc (replace Linux_i686 by Linux_ppc or Linux_x86_64 for corresponding machines)

#
# auto.misc
#
cd		-fstype=iso9660,ro,nosuid,nodev	:/dev/cdrom
#machine-dependent system directories
apps            -rw,bg     clonfs1:/vol/apps/RHEL5_i686
local           -rw,bg     clonfs1:/vol/local/RHEL5_i686
#machine-independent system directories
downloads       -rw,bg     clonfs1:/vol/downloads
home            -rw,bg     clonfs1:/vol/home
work            -rw,bg     clonfs1:/vol/work
scratch         -rw,bg     clonfs1:/vol/scratch
#machine-independent clas directories
clas            -rw,bg     clonfs1:/vol/clas
clas12          -rw,bg     clonfs1:/vol/clas12
archives        -rw,bg     clonfs1:/vol/archives
logs            -rw,bg     clonfs1:/vol/logs
# diskless
diskless        -rw,bg     clonfs1:/vol/diskless
#
#clonweb only
clonweb         -rw,bg     clonfs1:/vol/clonweb
#clondb1 only
mysql         -rw,bg     clonfs1:/vol/mysql

Linux symbolic links (because of Linux automount limitations we cannot do the same as on Solaris, must use symbolic links):

cd /
ln -s /u/site site
mv home home.orig
mv apps apps.orig
ln -s /misc/apps apps
ln -s /misc/home home
ln -s /misc/work work
mv scratch scratch.orig
ln -s /misc/scratch scratch
ln -s /usr/clas/archives/hist hist
cd /usr
mv local local.orig
ln -s /misc/local local
ln -s /misc/clas clas
ln -s /misc/clas12 clas12
cd /mnt
ln -s /misc/logs logs
ln -s /misc/archives archives 

NOTE: if some of existing directory are actual partitions mounted in /etc/fstab, you cannot remove or move them. Instead, do umount and comment out appropriate line in /etc/fstab. After that remaining directory can be moved/removed.

Run /etc/init.d/autofs restart (or reload). Make sure everything is mounted. If does not, reboot the machine.

Make links to the Computer Center stuff in /usr/local area (only once when first RHEL5 machine of particular flavor is configured):

cd /usr/local/bin
ln -s /usr/local.orig/bin/jlab-linux-config jlab-linux-config
ln -s /usr/local.orig/bin/jlab-satellite-connect jlab-satellite-connect
ln -s /usr/local.orig/bin/mkdisk mkdisk
ln -s /usr/local.orig/bin/satellite_checkin.pl satellite_checkin.pl
ln -s /usr/local.orig/bin/update_crontab update_crontab
cd /usr/local/etc
ln -s /etc/motd motd

RHEL4

Linux automounts on CLON cluster controls by following files:

/etc/auto.master

/u      auto.u.bb    --timeout 0 -DOSNAME=Linux-RHEL4
/w      auto.w.bb -v -d  -g
/misc	/etc/auto.misc

/etc/auto.misc (replace Linux_i686 by Linux_ppc or Linux_x86_64 for corresponding machines)

#
# auto.misc
#
cd		-fstype=iso9660,ro,nosuid,nodev	:/dev/cdrom
#machine-dependent system directories
apps            -rw,bg     clonfs1:/vol/apps/Linux_i686
local           -rw,bg     clonfs1:/vol/local/Linux_i686
#machine-independent system directories
downloads       -rw,bg     clonfs1:/vol/downloads
home            -rw,bg     clonfs1:/vol/home
work            -rw,bg     clonfs1:/vol/work
scratch         -rw,bg     clonfs1:/vol/scratch
#machine-independent clas directories
clas            -rw,bg     clonfs1:/vol/clas
archives        -rw,bg     clonfs1:/vol/archives
logs            -rw,bg     clonfs1:/vol/logs
#
#clonweb only
clonweb         -rw,bg     clonfs1:/vol/clonweb
#clondb1 only
mysql         -rw,bg     clonfs1:/vol/mysql

Linux symbolic links (because of Linux automount limitations we cannot do the same as on Solaris, must use symbolic links)358-3042,

cd /
ln -s /u/site site
mv home home.orig
rm -f apps
ln -s /misc/apps apps
ln -s /misc/home home
ln -s /misc/work work
ln -s /misc/scratch scratch
ln -s /usr/clas/archives/hist hist
cd /usr
mv local local.orig
ln -s /misc/local local
ln -s /misc/clas clas
cd /mnt
ln -s /misc/logs logs
ln -s /misc/archives archives