Re: [OpenIndiana-discuss] Any have a ready made script to run from cron for snapshots

2010-12-05 Thread Harry Putnam
Sriram Narayanan sri...@belenix.org writes:

 On Mon, Dec 6, 2010 at 3:07 AM, Harry Putnam rea...@newsguy.com wrote:
 Before there was a time slider, people must have run snapshots from
 cron or something similar.

 Since in 3 tries at new installs, using different media each time has
 resulted in a useless crippled time slider I wondered if any of you
 still have or use some kind of cron driven scripting for snapshots.

 I don't want to waste anymore time dinking around with timeslider
 until there is a more robust package.

 If any of you have such a script,  would you mind posting it?

 I'd sooner have an example as just script it up from scratch.

 Please see if this helps:
 http://blogs.sun.com/timf/entry/zfs_automatic_snapshots_now_with

Wow... pretty interesting but seems not ready for prime time just yet.

Are you using it?... If you scroll down the page a ways you find that
the author has been yet gotten things working in the case of failure
and in his words:

  Finally, I'm trying hard to do the right thing in the face of
  failure. The service will move to maintenance should a backup fail
  for any reason, and the cron job should be removed in that case

Where as if it were just a simple cron job running a less grand scheme
it would just run again next time... so in the case of things like
momentary los of network or whatever the job wouldn't get retired
completely. 

I was thinking more of plain scripting and cron.  I can do that my
self but it will take `some' amount of time.  I just thought maybe
someone else had done something I could use and change for my usage. 

However the work you pointed too looks like it will be a very nice
tool once some of the wrinkles are ironed out.


___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] Any have a ready made script to run from cron for snapshots

2010-12-05 Thread Sriram Narayanan
On Mon, Dec 6, 2010 at 3:42 AM, Harry Putnam rea...@newsguy.com wrote:
 Sriram Narayanan sri...@belenix.org writes:

...
 However the work you pointed too looks like it will be a very nice
 tool once some of the wrinkles are ironed out.


Actually, this evolved into the auto snapshot service which you're
unable to get working :)

What does your service log stored at /var/sadm/svc/ say about startup
errors for this specific service ?

-- Sriram


Belenix: www.belenix.org

___
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


Re: [OpenIndiana-discuss] Any have a ready made script to run from cron for snapshots

2010-12-05 Thread Harry Putnam
Sriram Narayanan sri...@belenix.org writes:

 On Mon, Dec 6, 2010 at 3:42 AM, Harry Putnam rea...@newsguy.com wrote:
 Sriram Narayanan sri...@belenix.org writes:

 ...
 However the work you pointed too looks like it will be a very nice
 tool once some of the wrinkles are ironed out.


 Actually, this evolved into the auto snapshot service which you're
 unable to get working :)

 What does your service log stored at /var/sadm/svc/ say about startup
 errors for this specific service ?

Well, since that post you are quoting, I've trashed that install and
done another fresh one this time I have'nt touched the slider
since I have no gui gdm isn't running, even though in past
installes it was even when I installed from the Text ISO.

So I'm not even sure it will be a problem yet.  But for the record I
did post some identical log messages in an earlier thread I started:

  Subject: auto-snaps cannot be started is this the known bug[s]

Below is a reprint of it.  Only note that the time sequence is like
this:

New install 1 = the one refernced in reprint below
New install 2 = The one this thread arose from
New install 3 =  The one I'm currently working on.  So far no X
desktop so I haven't monkeyed with the time slider.

1 and 2 both had the same problem.  3 is on a different machine and
done with the Text iso.  So far I don't know how the time slider will
act. 

Do you know how I might enable it from the command line?
Maybe then it will just work like expected.

The logs you requested are in the reprint below
-  -  --=--  - --- -

From: Harry Putnam rea...@newsguy.com
Subject: auto-snaps cannot be started is this the known bug[s]
Newsgroups: gmane.os.openindiana.general
To: openindiana-discuss@openindiana.org
Date: Sat, 04 Dec 2010 23:55:56 -0600
Message-ID: 871v5w3gr7@newsguy.com

After a fresh install, my third in a series this last week (inside
vbox), this time on windows XP, I'm unable to turn on the
auto-snapshot services.

I enabled the time slider in the gui then proceeded to try to turn on
the services.

I got in a hurry and tried to do it with a for loop from the cmdline
like this:

  for ii in `svcs -a|grep auto-snapshot`;do
svcadm enable -r $ii
  done

Well, that was a pretty horrible thing to do since it fed lots of
garbage to svcadm.

The ouput lines were of the form:
offline23:08:58 svc:/system/filesystem/zfs/auto-snapshot:daily

So of course the shell interpreter saw `offline' as a command,
`23:08:58' as a command and finally 
  svc:/system/filesystem/zfs/auto-snapshot:daily
 
svcadm was a bit flummoxed by it all.
Then when I realized my stupidity and tried a more conservative
method:

  svcadm enable auto-snapshot:NAME

They weren't starting so I attributed it to having jimmied things up
with the dumb for loop.

So I rebooted thinking that would give svcadm time to forgive me.  But
I see from dmesg and /var/adm/messages that there is still a big
problem... I kind of doubt now that it is related to my boner command
but maybe someone here will know, or know what to check into about
this.

It doesn't appear to be the same as a couple of fairly recent bugs I
googled up about the timeslider.

So on reboot heres what I see:

-  -  --=--  - --- -
from dmesg (wrapped for mail):

Dec 4 23:11:46 voi2 svc.startd[9]: [ID 122153 daemon.warning]
svc:/application/time-slider:default: Method or service exit timed
out.  Killing contract 108.

Dec 4 23:11:46 voi2 svc.startd[9]: [ID 636263 daemon.warning]
svc:/application/time-slider:default: Method
/lib/svc/method/time-slider start failed due to signal KILL.

Dec 4 23:12:47 voi2 svc.startd[9]: [ID 122153 daemon.warning]
svc:/application/time-slider:default: Method or service exit timed
out.  Killing contract 116.

Dec 4 23:12:47 voi2 svc.startd[9]: [ID 636263 daemon.warning]
svc:/application/time-slider:default: Method
/lib/svc/method/time-slider start failed due to signal KILL.

Dec 4 23:13:48 voi2 svc.startd[9]: [ID 122153 daemon.warning]
svc:/application/time-slider:default: Method or service exit timed
out.  Killing contract 117.

Dec 4 23:13:48 voi2 svc.startd[9]: [ID 636263 daemon.warning]
svc:/application/time-slider:default: Method
/lib/svc/method/time-slider start failed due to signal KILL.

Dec 4 23:13:48 voi2 svc.startd[9]: [ID 748625 daemon.error]
application/time-slider:default failed: transitioned to maintenance
(see 'svcs -xv' for details)

Dec 4 23:13:48 voi2 fmd: [ID 377184 daemon.error] SUNW-MSG-ID:
SMF-8000-YX, TYPE: defect, VER: 1, SEVERITY: major

Dec  4 23:13:48 voi2 EVENT-TIME: Sat Dec  4 23:13:48 CST 2010

Dec  4 23:13:48 voi2 PLATFORM: VirtualBox, CSN: 0, HOSTNAME: voi2

Dec  4 23:13:48 voi2 SOURCE: software-diagnosis, REV: 0.1

Dec  4 23:13:48 voi2 EVENT-ID: 391f62ce-2b35-4756-ccca-cbf642d20671

Dec 4 23:13:48 voi2 DESC: A service failed - a method is failing in a
retryable manner but too often.

Dec 4