Solved

Solaris fsck script

Posted on 2003-12-08
7
3,013 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

867 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

16 Experts available now in Live!

Get 1:1 Help Now