tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Trucluster upgrade V5.1 to 5.1B
@ 2004-02-11 17:54 vikram sachdeva
  2004-02-11 18:46 ` cropping a file Rich Glazier
  0 siblings, 1 reply; 3+ messages in thread
From: vikram sachdeva @ 2004-02-11 17:54 UTC (permalink / raw)


Hello


We are planning to upgrade Tru64Unix and TruCluster from V5.1 to
V5.1B.Before doing upgrade we need to perform another activity that is
mirroring of member1 and member2 boot disk. Here is the existing setup.

1. Two ES40 Alpha Server with one MC card and one HBA.
2. MA8K with 8.6-1P Firmware rev.
3. Disks (all 18.2 GB) in MA8K are configured as follows

     a. One disk for cluster wide root,usr and var
     b. Member1 boot disk
     c. Member2 boot disk
     d. Quorum disk

4. SRM Firmware V6.0
5. OS Tru64Unix V5.1 with Trucluster s/w and patch kits
6. Application is OPS using raw partition.


Since we have don't have any spare disks ,so the only option for
mirroring member1 and memebr2 boot disk is to initialize the disk , make
a RAID 1 volume of two disk and then create two hard partitions
(create_partition at HSG80 level).But that means we will lose the
member1 and member2 boot disk.

Please help me and suggest 

1.How to restore member1 and meeber2 boot disk.Do I need V5.1 cd to boot
the member from it and then restore? How to restore cnx partition

2.How to make sure the device name ,minor IDS at OS level doesn't change
after Mirroring and restoration activity.

3.Firmware level required for OS and cluster upgrade (we have taken a
24hrs     	downtime for cluster)

4.How to perform OS and cluster upgrade from V5.1 to V5.1B.

5.Patch installation and stable patch kit for V5.1B?

6.Which CD's are required to perform all the activities?

7.Apart from the backup of al the filesystem ,what other information I
should have (like disklabel -r <dskname> output ,disk names etc) before
performing the activities.

8.Any other suggestion or precaution I need to take.



Regards
Vikram 





^ permalink raw reply	[flat|nested] 3+ messages in thread

* cropping a file
  2004-02-11 17:54 Trucluster upgrade V5.1 to 5.1B vikram sachdeva
@ 2004-02-11 18:46 ` Rich Glazier
  2004-02-13 19:43   ` SUMMARY: " Rich Glazier
  0 siblings, 1 reply; 3+ messages in thread
From: Rich Glazier @ 2004-02-11 18:46 UTC (permalink / raw)


Does anyone have a suggestion about how to crop a file
such that it always remain a certain size (in one
step- i.e. not creating and deling files and not an
editor)?  I have a log file where I want to dump the
fist 100 lines once a week.  I've tried ways of using
head and redirecting dev/null to the file, but can't
quite get what I want.

Thanks.

T645.1A PK6

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

* SUMMARY: cropping a file
  2004-02-11 18:46 ` cropping a file Rich Glazier
@ 2004-02-13 19:43   ` Rich Glazier
  0 siblings, 0 replies; 3+ messages in thread
From: Rich Glazier @ 2004-02-13 19:43 UTC (permalink / raw)


I thought there was a way using /dev/null, but I think
I was mistaken.  Here are some of the suggestions. 
Thanks to everyone.

(Chris Ruhnke, Bob Marcan, Alan Rollow, Steve Feehan,
Elin Vaeth, Jim Fitzmaurice, Paul A. Sand, James
Sainbury, Phillip Brown, John Farmer)

I ended up creating a cropped temp file, and then
copying it over the original:

tail -49 /usr/scripts/prod_on_mars.out > /tmp/newfile
rm /usr/scripts/prod_on_mars.out
mv /tmp/newfile /usr/scripts/prod_on_mars.out


----------

Hi,

Here is a solution.  Let me know if you find a more
elegant way to do 
this:

Put the following into a file:

ed filename.ext << _HERE_
1,100d
w 
_HERE_ 

The above translates as use the 'ed' editor to edit
filename.ext.  
Accept input to 'ed' until the string _HERE_ is
encountered.
1,100d Starting at line 1 delete 100 lines
w Write buffer contents
_HERE_ exit

Although this will execute very quickly (assuming
logfile isn't very 
huge) there is a small window of opportunity for the
application that owns the file to experience a
synchronization problem.

Consider:  The logfile is being modified by two
sources.  The owner of 
The file and your program.  When the 'ed' command is
executed file contents  are read into a buffer but the
file is not locked.  There is potential for  the
source file contents to change while ed is deleting
the first 100  lines.  At the end of 100 line deletion
ed writes his copy of the contents back to  the
logfile which will not include the updates that took
place between the  time ed read the file and the time
he executes the 'w' command.

Let me know if this works for you.

John Farmer

-----------------------

Try this:

  # sed -n 1,100p filename 

Regards,

Phillip S. Brown

-----------------------

I'm not sure what you mean by "dump", but I think this
truncates the
file at 100 lines:

    perl -pi -e 'exit if ($. > 100)' file

I think this creates a temporary file, but the details
are at least hidden from you.

 
 Paul A. Sand   

----------------------

Just off the top of my head, I'd use wc -l to get a
line count, subract
100 from that number then use tail -<number> and
replace the file with
that result. Something like:



LINECOUNT=`cat $LOGFILE | wc -l`
NEWCOUNT=`expr $LINECOUNT - 100`

tail -$NEWCOUNT $LOGFILE > $NEWFILE

rm $LOGFILE

mv $NEWFILE $LOGFILE

exit 0



Jim Fitzmaurice

-----------------------


Perhaps the 'split' command will give you what you
want.

Regards,

Elin Vaeth





--- Rich Glazier <rglazier2002@yahoo.com> wrote:
> Does anyone have a suggestion about how to crop a
> file
> such that it always remain a certain size (in one
> step- i.e. not creating and deling files and not an
> editor)?  I have a log file where I want to dump the
> fist 100 lines once a week.  I've tried ways of
> using
> head and redirecting dev/null to the file, but can't
> quite get what I want.
> 
> Thanks.
> 
> T645.1A PK6
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing
> online.
> http://taxes.yahoo.com/filing.html


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-13 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-11 17:54 Trucluster upgrade V5.1 to 5.1B vikram sachdeva
2004-02-11 18:46 ` cropping a file Rich Glazier
2004-02-13 19:43   ` SUMMARY: " Rich Glazier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox