Solved

Solaris fsck script

Posted on 2003-12-08
7
3,021 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
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.

734 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