We were going to first dismount the database, but decided to see what
happens if you just delete the cache.dat file at the unix level (after
saving it off) and it let us do that. We could then put our other one
(from 2009.1, with no conversions run) in it's place, changing
ownership and permissions accordingly. We are able to ZN to that, but
we cannot LOGTO it from another namespace. This is a DATA database in
the 2010.2.1 system, while it was the whole kit and caboodle for the
namespace in 2009.1.
If we type MV at the cos prompt we get a security error.
[846] You do not have the required database access privileges to logon
to ZIPPEE.
We are able to ZN to the namespace, but then when we type MV, we get
that same error before it goes to the colon prompt
ZIPPEE>MV
[846] You do not have the required database access privileges to logon
to ZIPPEE.
* MultiValue Shell *
* Cache for UNIX (Red Hat Enterprise Linux 5 for x86-32) 2010.2.1
(Build 503_0_9983U) Wed Dec 8 2010 01:16:59 EST*
Also, if we attempt to dismount this database now (after copying it
over or even if we copy the original back) we get an error. I ran an
integrity check on the original cache.dat file after we put it back
and we get things like this in the integ.txt file:
Cache error: <PROTECT>CheckIntegrity+37^%SYS.DATABASE
I've been searching the doc trying to figure out where it will tell me
more about copying overtop of or replacing a cache.dat file with
another, but I'm coming up short. I'm guessing I'm not searching for
the right terms. Any clues? Thanks. --dawn
--
Dawn M. Wolthuis
Take and give some delight today
On an OS level, when Unix "locks" a file and then you replace it, the OS
essentially makes a couple of symlinks. Any programs with locks on the
old file get a link to the old file and anything else gets pointed to
the new file.
As I understand it, for performance reasons, Cache batches up writes in
the WIJ and then makes copies of all these writes to the journal. When
you restarted your namespace, it then replayed the journal corrupting
the new file. However, when you copied the old file back in place, it
was a copy probably missing some writes from the WIJ. This makes it
essentially a corrupt file also (since the journal was replayed already
on your other file).
This is my guess with knowledge of Unix style OSes and my newbie
knowledge of Cache. I think you would want to always unmount a database
before copying or replacing it. This forces the WIJ to write out so your
copy won't be corrupt. It also removes the OS level locks so when you
replace the database it isn't working on a file other than the one you
intended.
Jason
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
So, after removing this cache.dat file, we could not delete the
database and recreate it with the same names and all, even though we
pointed the namespace to another database.
Because it appeared that the errors we received were mv errors when
trying to recover, I am sending the question here.
Other things we will be testing -- copying a cache.dat file over
another one. I do not know if we need to dismount the source database
before copying the cache.dat file, whether we need to dismount the
destination before copying over it, etc.
One Goal: To go from using version control for deploying new builds of
software to test environments to using some other means (copying
cache.dat files?) for deploying new builds to live environments
without disrupting users unnecessarily when a new build is deployed. I
think I'm just missing the doc on the right way to do this, but
figured I would go through options.
Another Goal: to copy data from one namespace to another. In this
case, the data came from a prior version. We will need to get it moved
to a new box, new version of the OS, of Cache, etc. We are beginning
to test out how to do that too.
So, yeah, figure I'm clueless but motivated to understand just how
these cache.dat files can be handled. Everything we have done to date
with them has been working through version control and utilities. I
could find no utilities for deploying an existing cache.dat data file
or code file to another namespace, but there might well be some. In
the absence of that, we need to develop our own, which means getting
more understanding of what works and what doesn't. We can definitely
cross off the "delete a cache.dat file and put another in it's place"
approach and I'm guessing there are a bunch more that will not work.
cheers! --dawn
I do have a few follow-ups, feel free to ignore, and anyone else
should feel free to jump in.
Does the source cache.dat file need to be dismounted before copying it
as well as the destination?
When you say that obviously you would lose the data if upgrading live
sites, is that the case if you are copying the 'CODE' cache.dat file,
given that your namespace has separate DATA and CODE databases?
I also received some follow-up information offlist suggesting there
are new features in Cache' for minimal downtime when deploying a new
build (this is one of our two goals in fiddling with this now), which
might be why I thought I would be finding information I was not
finding.
We will also definitely be checking with George James, but because the
target namespace in our eventual setup will be on a production box
that would not have vc/m installed in the cache instance (at least
that was our intent), we are trying to learn what we can about these
underlying databases. To a pickie, the cache.dat file is mystery meat.
[I understand that very few humans would enjoy that last sentence, but
here's to those who would. cheers!] --dawn
> For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
With our upgrade to 2010.2.1 we asked about how to get rid of the
downtime we have each time we deploy a new build of the software. We
currently move it using version control software which compiles it in
our live-lite alpha namespace, but so that we do not have to move each
item in order, we then compile them in order thereafter. This did not
work well for 24-7 access for a web site. We have a small subset of
our planned software written and what we have already keeps users off
the system for 1/2 hour, in part because the compile of our Zen page
template holds up all pages when it compiles, not just the one it is
compiling. So, to deploy a new build I would get up in the dead of
night or stay up late and hope that none of our alpha customers had
end-customers doing their web stuff at that time.
Yes, if and when we do this in the future, we will dismount the source
and target databases. It seems like it would be good to take down
apache for that too, so that our site is not accessible during that
time. So, this doesn't seem like a good deployment strategy, but it
might be good for moving data (although there might be better
approaches to that too), we shall see. Plenty to learn. Thanks!
--dawn