Unix administration - Tape rewind on Solaris startup

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > Tape rewind on Solaris startup





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Tape rewind on Solaris startup
Sam

2004-01-23, 4:53 pm

Hello to everyone,

I am using Solaris 9 OS, and ufsdump command to write backups to tape.
I keep appending to the tape for a whole week, and then change the
tape when the week is over. Our sysadmin wants to start rebooting the
server nightly, but this causes to rewind the tape drive to the start,
and when my backup runs again, it doesn't append the data, but rather
starts writing from the start of the tape. I watched the reboot
process, and noticed that sometime in the middle of the reboot, the
tape rewinds. Is there a way to tell Solaris to not rewind the tape at
startup. As a workaround I use the ufsrestore command to que it up
again, but would rather not have to do that, and just have the tape
remain in the same spot, after a reboot. Any ideas, would be greatly
appreciated.

Thanks,
Sam
Michael Vilain

2004-01-23, 4:53 pm

In article <a16a77b5.0311060835.35d69f41@posting.google.com>,
UncleCemka@hotmail.com (Sam) wrote:
quote:

> I am using Solaris 9 OS, and ufsdump command to write backups to tape.
> I keep appending to the tape for a whole week, and then change the
> tape when the week is over. Our sysadmin wants to start rebooting the
> server nightly, but this causes to rewind the tape drive to the start,
> and when my backup runs again, it doesn't append the data, but rather
> starts writing from the start of the tape. I watched the reboot
> process, and noticed that sometime in the middle of the reboot, the
> tape rewinds. Is there a way to tell Solaris to not rewind the tape at
> startup. As a workaround I use the ufsrestore command to que it up
> again, but would rather not have to do that, and just have the tape
> remain in the same spot, after a reboot. Any ideas, would be greatly
> appreciated.



I think that your drive is responding to a SCSI INQ or maybe a RESET
that's sent as part of the Solaris boot process. I don't think you can
change this.

As a workaround, I'd put mt commands to position the tape at the end of
file before you do your ufsdump. If you fix the scripts, you won't have
to worry about your admin's doings.

As an aside, I'd severly question the admin's decision to reboot the
server nightly. Solaris doesn't need this to run and others will brag
on how long their servers have been running. If the server is running
some misbehaving software that can't be fixed any other way, I'd start
complaining to the developers or vendor to get it fixed ASAP. Rebooting
to 'fix' something that's broken doesn't get it _really_ fixed. If the
admin is doing this 'just to be safe', I'd start looking for a more
competent admin, one that's more comfortable with Solaris than
MicroSloth.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Doug Freyburger

2004-01-23, 4:53 pm

Sam wrote:
quote:

>
> Our sysadmin wants to start rebooting the server nightly



That's your only real problem right there. It's lunacy. Why on
earth would he want to do something that incompetant? Solaris
doesn't even need quarterly reboots, so what lame excuse could
possibly be used to justify a nightly one? And yes I am using
those words on purpose.

I once encountered a system that was scheduled to reboot daily.
I asked why and it turned out it crashed after a day and a half.
A glance at the system showed that "df" and "swap -l" listed the
same device. A partition was added as swap and was also a
mounted filesystem. As soon as swap usage got to using that
device it corrupted the filessytem and crashed the box. I
commented out one line in the mount tables, turned off swapping
on that device, and all was well.

If there's a reason the machine needs to be booted daily, that
reason should stand out pretty clearly like this. If there's no
reason then suggest the SA start interviewing with the competition.
quote:

> but this causes to rewind the tape drive to the start



Of course. When the system boots it does a bus reset on each
attached device. Since the tape drive is SCSI connected, that
SCSI gets a SCSI bus reset. It's part of the scan for devices.
All tape drives rewind in response to a SCSI bus reset. It's
a reset after all.
quote:

> Is there a way to tell Solaris to not rewind the tape at
> startup.



No.

Your REAL solution is to repiar the incompetance of daily reboots.

Your workaround is to reread the man page for "mt" and look for
"eod" or "eom" to reposition the tape to the end of data.
Michael Paoli

2004-01-23, 4:53 pm

rebooting the server nightly? ... Uhm, typically one wouldn't want to
do that, ... but be that as it may ...

When the system and/or its tape controller (e.g. SCSI) card and/or the
tape drive is power cycled (or reset), most likely essential tape state
information (most notably position data) is lost. Most likely upon
power-up or reset (e.g. SCSI bus reset) the device rewinds. I suppose
one could poke around trying booting single user mode instead to see if
the rewind could be avoided. If booting single user didn't cause a
rewind, one may be able to isolate what in the normal boot sequence
causes the rewind. Note however that not rewinding after a reset or
power cycle may leave the tape drive in a state where it can't write the
tape, or where writing to it at that point may corrupt data on the tape.

If one really wants/needs to reboot the system (or wants the tape to
automagically be at the right position after most any shutdown/reboot),
one might want to look at mt(1) and perhaps set up a suitable rc script
to appropriately position the tape (e.g. rewind then position at end of
last fileset on the tape) when the system is (re)booted.

UncleCemka@hotmail.com (Sam) wrote in message news:<a16a77b5.0311060835.35d69f41@posting.google.com>...
quote:

> I am using Solaris 9 OS, and ufsdump command to write backups to tape.
> I keep appending to the tape for a whole week, and then change the
> tape when the week is over. Our sysadmin wants to start rebooting the
> server nightly, but this causes to rewind the tape drive to the start,
> and when my backup runs again, it doesn't append the data, but rather
> starts writing from the start of the tape. I watched the reboot
> process, and noticed that sometime in the middle of the reboot, the
> tape rewinds. Is there a way to tell Solaris to not rewind the tape at
> startup.


John Doherty

2004-01-23, 4:54 pm

In article <a16a77b5.0311060835.35d69f41@posting.google.com>,
UncleCemka@hotmail.com (Sam) wrote:
quote:

> I am using Solaris 9 OS, and ufsdump command to write backups to tape.
> I keep appending to the tape for a whole week, and then change the
> tape when the week is over. Our sysadmin wants to start rebooting the
> server nightly, but this causes to rewind the tape drive to the start,
> and when my backup runs again, it doesn't append the data, but rather
> starts writing from the start of the tape.



Best thing is probably to have your backup script do "mt eof" (to
position the tape at the end of the recorded media) before writing
anything to the tape drive.

--
Carl Lowenstein

2004-01-23, 4:54 pm

In article <jdoherty-1711031609460001@192.168.2.178>,
John Doherty <jdoherty@nowhere.null.not> wrote:
quote:

>In article <a16a77b5.0311060835.35d69f41@posting.google.com>,
>UncleCemka@hotmail.com (Sam) wrote:
>
>
>Best thing is probably to have your backup script do "mt eof" (to
>position the tape at the end of the recorded media) before writing
>anything to the tape drive.



You mean, I think, "mt eom" to position to the end of recorded media.
"mt eof" writes a tape mark.

A fortiori, you are now at eom, but all previously recorded data is gone.

carl
--
carl lowenstein marine physical lab u.c. san diego
clowenst@ucsd.edu
John Doherty

2004-01-23, 4:54 pm

In article <bpdvfa$bhq$1@news1.ucsd.edu>, cdl@deeptow.ucsd.edu (Carl
Lowenstein) wrote:
quote:

> In article <jdoherty-1711031609460001@192.168.2.178>,
> John Doherty <jdoherty@nowhere.null.not> wrote:
>
> You mean, I think, "mt eom" to position to the end of recorded media.
> "mt eof" writes a tape mark.



Eeek! You're right. I typed too fast and didn't read what I wrote
well enough. Thanks for the correction.
quote:

> A fortiori, you are now at eom, but all previously recorded data is
> gone.



Which would be a Bad Thing. Thanks again.

--
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com