Solved

Solaris fsck script

Posted on 2003-12-08
7
3,009 Views
Last Modified: 2013-12-21
I need to have a solution to run fsck and perform a ufsdump on a Solaris 8 Sparc server that includes Oracle 8i 8.1.7.  I will use this solution on a monthly basis, or whenever the need arises.  I perform this function manually now and would like to automate this process.
0
Comment
Question by:jande2
7 Comments
 
LVL 6

Expert Comment

by:durindil
ID: 9901319
How about enabling journaling and doing away with the fsck?
0
 
LVL 1

Expert Comment

by:edvinkv
ID: 9902145
Write down the fsck command you want to run into a shell script file.
Execute this file and verify if this works fine.
Add a cron job to make sure that the sytem will execute this file every 1st day of the month.

read
man fsck.
man cron.
thx.
0
 
LVL 18

Expert Comment

by:liddler
ID: 9905581
make sure you have the path/to/shell in the first line of your script

#!/usr/bin/ksh
/bin/fsck whatever
/bin/ufsdate whatever

make sure you make the script executeable (chmod +x /path/to/script)
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Accepted Solution

by:
sagar24 earned 125 total points
ID: 9911383
Hi
As suggested by edvinkv and liddler
you shud write shell script

#!/bin/sh
fsck -y device-name 1> /dev/null
/usr/sbin/ufs/dump -0uf /dev/rmt/0 device-name 1> /dev/null
make executable chmod +x filename
then write a crotab as follows
#crontab -e
to execute ypur script at 17.30 on 30th of every month
enter the following lines
30 17 30 * *  path/script-name
save it

hope this works

Sagar
0
 
LVL 18

Expert Comment

by:liddler
ID: 9911659
sagar24
slight typo
 /usr/sbin/ufs/dump -0uf /dev/rmt/0 device-name 1> /dev/null
---------------^--------------------------------------------------------
should be
/usr/sbin/ufsdump -0uf /dev/rmt/0 device-name 1> /dev/null
--------------^--------------------------------------------------------
0
 

Expert Comment

by:sagar24
ID: 9918140
Hi jande2
Thanks  for accepting my answer
Regards
Sagar
0
 

Expert Comment

by:sagar24
ID: 9918145
liddler thanks for your correction
Regards'
Sagar
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now