Solved

Solaris fsck script

Posted on 2003-12-08
7
3,019 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded‚Ķ
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

756 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