Need help in scripting to do repair in format tool of Solaris
Hi,
I posted my problem in Solaris forum, but I think, I am expecting a script, which should solve my purpose. I am not a scripting person, so need help here.
I am on Solaris 10, in failsafe mode. Manually I run format command and it takes me to options, I pick "repair" and enter, it waits for my input at "Enter absolute block number of defect:", here I need to give block number, which is 39594646. It asks for confirmation, I say Y and enter. It will take some time to repair and came back on "repair" prompt. I need to repeat same for block 39594646 to 585912500 so manual repairing is not possible. I need to say n also, if block is not defective.
If I understand you correctly, you want to automate the input to the format tool.
You could try to use expect, which is made for this purpose. There should be a man-page for this, and you also find many examples for expect on the Net.
Note that expect is basically Tcl, which was extended with a special library, so you are then effectively doing Tcl-programming, not shell programming. Keep this in mind, when you get in trouble with the syntax of the commands: In this case, search the Net not only for "expect", but also for "Tcl".
I also recommend taking 15 minutes or so to get familiar with the Tcl language. It is simple, but not always obvious if you come from other languages.
I am not knowledgeable on scripting, but will try to check, if I can figure out TCL.
I understand that disk is bad, though there are no errors in iostat. But we don't have backup for this server, so want to retain as much as data before replacing disk. I already got new disk from Oracle. Here is actual issue, which I mentioned in this post - Can I run repair on lot of blocks with single command ?
Somehow when one disk gone bad (c0t1d0), other disk (c0t0d0) also got lot of bad block.
This would make me see red. This shouldn't happen. I'd be checking whether the disks are over-heating, are the fans running, etc.
AFAIK a disk read test will not correct anything, only verify readability. That's what read means.
The system will boot into safe mode but not into multi-user.
I'm assuming the filesystem is ufs (??) and there is an (often little documented) option on fsck which will check literally everything on a filesystem:
Note the -n will ensure no modifications are attempted but the -o full will check everything and list files with errors. Make sure you capture the output as it may be long and take many hours to run. You should then know which files are affected and which to restore.
I appreciate that my comments above do not give you a coherent strategy for a fix but you might find them helpful. Hopefully you will get other input from other members.
You can feed format from stdin.
For example
Now, if your disk is the first one (0), make a script "repair_sector"
And you can run this with your absolute sectors as arguments.
Untested! of course.
This User Gave Thanks to MadeInGermany For This Post:
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)
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)
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)
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)
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)
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)
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)
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)
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)