02-12-2007
shell script to mount filesystem
Hi, Gurus:
I need your help to finish a script that will mount two file systems automatically when saver is reboot or start.
I am working on a new Sun Sparc machine with Solaris 9 on it. This box got two disk. disk one has been partitioned to hold Solaris OS. disk two has been partitioned as two file systems for Oracle. When I reboot the machine, the mount point on disk two will lose. I have to manually mount them up. I would like to create a script in /etc/init.d or insert a piece of code in .profile file . The script should su - from oracle user to root user with passwd first, then mount /dev/dsk/c0t0d0s2 /u02, mount/dev/dsk/c0t0d0s3 /u03. After this, su - oracle user. In this process, the file system on disk two will be automatically mounted. Please advise me the basic code. Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I try to share a directory from a wortstation to a server.
the share command was no problem.
Solaris 8
on mars
share -F nfs -o rw /dir/dir2
on the server
mount mars:/dir/dir2 /mount_point
RPC: Program not registered <--- What is the meaning of this ?
Thanks for you help ! (2 Replies)
Discussion started by: joerg
2 Replies
2. UNIX for Dummies Questions & Answers
I want help about mount a filesystem to use a cdrom to install a software that be in the cd cdrom..
you can send a mail ::removed emails:: (5 Replies)
Discussion started by: amauryrgrullon
5 Replies
3. Linux
:) Hi frds ..i hope i can get some help for this.. I am unable to mount ntfs/hpfs file system which contain my XP o/s. As per the information collected on net i found tht my kernel i.e 2.4.xx does not support ntfs ..?
Now I dont knwo where to get upgraded kernel and how to deploy it ..can anyone... (0 Replies)
Discussion started by: nicknihal
0 Replies
4. Linux
Hi,
I have a software in one of the pcs connected in the network and I need to mount that file system in my PC. Both the pcs have Linux installed. Please let me know how can we achieve this.
Any pointers would be of great help.
Thanks & Regards,
Venkatesh. (3 Replies)
Discussion started by: venkatesh_sasi
3 Replies
5. Solaris
Hi All,
I have mount /usr directory as a seperate filesystem.The /usr directory includedd in / root file system.I have to mount it as seperate.
Please Help me,
Thanks and Regards, (7 Replies)
Discussion started by: lbreddy
7 Replies
6. Solaris
Hey all,
I have a machine with 16 drive slots. Two of the drives have a ZFS mirror of the operating system, the other 14 contain the storage raidz.
So, after installing Opensolaris on the OS drives, how can I remount the storage raid?
TIA (11 Replies)
Discussion started by: PatrickBaer
11 Replies
7. Shell Programming and Scripting
Hi All,
My below shell script is not capturing %used value in the filesystem alert in the subject of the mail alert:
#!/bin/bash
export DBALIST="abc@xyz.com"
df -k /oradata/xyz/archive > dfk.result
archive_capacity=`awk -F" " '{ print $5 }' dfk.result|grep -i %| cut -c 1-4`
if ]
then... (5 Replies)
Discussion started by: a1_win
5 Replies
8. AIX
Dear all,
We are facing prolem when we are going to mount AIX filesystem, the system returned the following error
0506-307The AFopen call failed
: A file or directory in the path name does not exist.
But when we ls filesystems in the /etc/ directory it show
-rw-r--r-- 0 root ... (2 Replies)
Discussion started by: m_raheelahmed
2 Replies
9. UNIX for Dummies Questions & Answers
I have 2 Linux servers.
rcwlo-ods10g and rcwlo-10gdev
I can mount one filesystem from rcwlo-ods10g onto rcwlo-10gdev fine:
RCWLO-10gDev:/ # mount -F rcwlo-ods10g:/SAN /backup
but when I try another one I get:
RCWLO-10gDev:/ # mount -F rcwlo-ods10g:/backup /backup
mount:... (0 Replies)
Discussion started by: jamie_collins
0 Replies
10. Solaris
I have oi_151a7 and installed from sfe fuse-ext, libfuse and e2fsprogs. Mount e.g.
# mount -F ext2fs /dev/dsk/c4t0d0p1 /mnt
returns
"mount: Operation not applicable to FSType ext2fs"
and
$ fuse-ext2 /dev/dsk/c4t0d0p1 ~/tmp/a/
does not output anything but the filesystem seems not to be... (3 Replies)
Discussion started by: bsdx
3 Replies
FSTAB(5) File Formats Manual FSTAB(5)
NAME
fstab, mtab - list of file systems to mount, mounted file system table.
SYNOPSIS
/etc/fstab
/etc/mtab
DESCRIPTION
/etc/fstab is a table of file system to mount at boot time, /etc/mtab is a table of currently mounted file systems as maintained by mount
and umount.
/etc/fstab is not read by mount as it should be. It is instead a simple shell script listing the three devices that Minix needs to oper-
ate: The device names of the root file system, the temporary (scratch) file system, and the file system for /usr. Of these only the /usr
file system is mounted in /etc/rc, the scratch file system is there for the system administrator to test new kernels, or as a temporary
file system.
/etc/mtab contains lines of four fields. The layout is:
device directory type options
These fields may be explained as follows:
device
A block special device.
directory
Mount point.
type
Either 1, or 2, indicating a V1 or V2 file system.
options
Either ro, or rw, indicating a read-only or read-write mounted file system.
FILES
/etc/fstab Shell script naming three important file systems.
/etc/mtab List of mounted file systems.
SEE ALSO
printroot(8), mount(1), fsck(1), mkfs(1).
BUGS
/etc/fstab is a joke.
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
FSTAB(5)