Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Solaris fsck script

Posted on 2003-12-08
7
Medium Priority
?
3,023 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Accepted Solution

by:
sagar24 earned 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

705 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