Need help in scripting to do repair in format tool of Solaris


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help in scripting to do repair in format tool of Solaris
# 8  
Old 02-23-2017
hicksd8 : fsck is not helping, I tried it with different options. It comes up clean.

rbatte1 : I can run analyze and read and I can see, what blocks are corrupted. But There are large number of blocks, which need to be fixed with repair option in format. So looking for that script.

MadeInGermany : These are two scripts or I should both one by one as it is ?
# 9  
Old 02-23-2017
The first one is just a demonstration that it works.
It does nothing than print the partition table.
You can type it at (or copy it to) the command line.
# 10  
Old 02-23-2017
Quote:
hicksd8 : fsck is not helping, I tried it with different options. It comes up clean.
Yes, it might do because it's not being told to check everything. A -o full should check every last byte is readable and report errors.
# 11  
Old 02-23-2017
hicksd8 : Tried fsck, no luck
Code:
# fsck -o f /dev/rdsk/c0t0d0s0
** /dev/rdsk/c0t0d0s0
** Last Mounted on /a
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cylinder Groups
91388 files, 4328341 used, 5989667 free (3747 frags, 748240 blocks, 0.0% fragmentation)
#

MadeInGermany : Am I mising something here ? It just came back on prompt
Code:
# cat /tmp/repair_sector
#!/bin/sh
for arg
do
  echo "
0
repair
$arg
y
" | format
done
# /tmp/repair_sector
#

# 12  
Old 02-23-2017
Code:
# fsck -o full /dev/rdsk/c0t0d0s0

# 13  
Old 02-23-2017
Quote:
Originally Posted by hicksd8
Code:
# fsck -o full /dev/rdsk/c0t0d0s0

It is not accepting "full" syntax
Code:
# fsck -o full /dev/rdsk/c0t0d0s0
ufs usage: fsck [-F ufs] [-m] [-n] [-V] [-v] [-y] [-o p,b=#,w,f] [special ....]
#

# 14  
Old 02-23-2017
You must give the sectors as arguments.
Say you want to repair absolute sectors 39594665 and 39594666
Code:
/tmp/repair_sector 39594665 39594666

fsck is useless here. It does not repair defective sectors, it repairs logical errors in the filesystem.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

BART tool on Solaris 10 - enable SHA256

Hi all, I am attempting to create a BART manifest on a Solaris 10 box; however, I need it to be hashed with SHA256. Normally, at the beginning of a "bart create" command, the version and date appear along with the type of encryption listed. When I run the command though I receive the... (3 Replies)
Discussion started by: Derk Berk
3 Replies

2. Solaris

Question with Solaris Crash Analysis Tool with Solaris 9

Hello all. I am new hear and would like to ask a question regarding to the Solaris Crash Analysis Tool. We are analyzing the results of "thread summary" but not quite sure what the asterisk represents. Following are the items that asterisk were attached. 50* threads sleeping on a semaphore (49... (1 Reply)
Discussion started by: YuW
1 Replies

3. Solaris

Is there a similar tool with authconfig of Linux on Solaris?

Hi Dears, I believe you know authconfig on most of Linux Distributions. However, on Solaris OS, I don't know the similar tool. Could you please share me the tool, if any? Note: I am using SunOS 5.10. (0 Replies)
Discussion started by: crest.boy
0 Replies

4. Shell Programming and Scripting

Need a ksh scripting tool

Hi guys, I am new in Unix/linux field. I need a >>tool which is running on windows xp and provide the >>Korn shell scripting environment. As I used cygvin, but it is bash shell and most of the command of unix is not supported by cygwin.:confused: please suggest..... :) thanks in... (9 Replies)
Discussion started by: atul9806
9 Replies

5. Solaris

Can fssnap be used as a compression tool (Solaris 10)?

Friends, I am learning the working of fssnap command. Suppose there is a directory named /datadir which is of size 500mb. I had taken the snapshot by means of the following command: #fssnap -F ufs -o bs=/snapshotdir /datadir { it shows the o/p as /dev/fssnap/0 } My question is if... (2 Replies)
Discussion started by: saagar
2 Replies

6. Infrastructure Monitoring

Network monitoring tool for Solaris 10

Hi All, I was wondering if there is any Network Monitoring Tool for Solaris 10 to monitor a network having hybrid operating systems. I just googled it without success. Hope, experts will guide me to get it. Thanks, Deepak (7 Replies)
Discussion started by: naw_deepak
7 Replies

7. Solaris

Network monitoring tool for Solaris 10

Hi All, I was wondering if there is any Network Monitoring Tool for Solaris 10 to monitor a network having hybrid operating systems. I just googled it without success. Hope, experts will guide me to get it. Thanks, Deepak (0 Replies)
Discussion started by: naw_deepak
0 Replies

8. Shell Programming and Scripting

New tool for shell scripting

Hi All, It's quite long time....m comming to my favourite forum.. Can anyone suggest me good tool like eclipse for Java....do we have anything for Shell scripting..where n i can atlease prepare script...rather than typing all mistakes in Linux box :) Thanks Sha (1 Reply)
Discussion started by: Shahul
1 Replies

9. Solaris

Solaris Performance Monitoring Graphing Tool

Hi All Anyone out there using any graphing tool for Solaris performance data taken either through SAR utility or iosatat, vmstat, nicstat etc. There are a couple on googling like statsview and rrdtool but not sure if anyone is really happy and satisfied with using any of the graphing tool. ... (1 Reply)
Discussion started by: baner_n
1 Replies
Login or Register to Ask a Question