Sponsored Content
Top Forums Shell Programming and Scripting shell script to mount filesystem Post 302106826 by duke0001 on Monday 12th of February 2007 10:43:12 PM
Old 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

Mount nfs filesystem

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

Mount a Filesystem

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

how to mount ntfs filesystem

:) 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

How to mount a filesystem of one pc in another pc that are connected in a network?

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

Mount /usr as a separate filesystem

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

Mount old zfs filesystem

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

Filesystem alert shell script not working!!

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

Mount Filesystem in AIX Unable to read /etc/filesystem

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

Can't mount filesystem

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

OpenIndiana: Can't mount ext2 filesystem

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
mount_pcfs(1M)						  System Administration Commands					    mount_pcfs(1M)

NAME
mount_pcfs - mount pcfs file systems SYNOPSIS
mount -F pcfs [generic_options] [-o FSType-specific_options] special | mount_point mount -F pcfs [generic_options] [-o FSType-specific_options] special mount_point DESCRIPTION
mount attaches an MS-DOS file system (pcfs) to the file system hierarchy at the mount_point, which is the pathname of a directory. If mount_point has any contents prior to the mount operation, these are hidden until the file system is unmounted. If mount is invoked with special or mount_point as the only arguments, mount will search /etc/vfstab to fill in the missing arguments, including the FSType-specific_options; see mount(1M) for more details. The special argument can be one of two special device file types: o A floppy disk, such as /dev/diskette0 or /dev/diskette1. o A DOS logical drive on a hard disk expressed as device-name:logical-drive , where device-name specifies the special block device-file for the whole disk and logical-drive is either a drive letter (c through z) or a drive number (1 through 24). Examples are /dev/dsk/c0t0d0p0:c and /dev/dsk/c0t0d0p0:1. The special device file type must have a formatted MS-DOS file system with either a 12-bit, 16-bit, or 32-bit File Allocation Table. OPTIONS
generic_options See mount(1M) for the list of supported options. -o Specify pcfs file system specific options. The following options are supported: foldcase|nofoldcase Force uppercase characters in filenames to lowercase when reading them from the filesystem. This is for compatibility with the pre- vious behavior of pcfs. The default is nofoldcase. FILES
/etc/mnttab table of mounted file systems /etc/vfstab list of default parameters for each file system ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
mount(1M), mountall(1M), mount(2), mnttab(4), vfstab(4), attributes(5), pcfs(7FS) NOTES
If the directory on which a file system is to be mounted is a symbolic link, the file system is mounted on the directory to which the sym- bolic link refers, rather than on top of the symbolic link itself. SunOS 5.10 24 Nov 2003 mount_pcfs(1M)
All times are GMT -4. The time now is 10:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy