Modify service property in Solaris

This is nothing too exciting but it is something that I seem to alvais forget. So I am hoping that by writing it down once I might have a better chance to remember. Or at least remember where to look for pointers next time.

I was fiddling with ZFS auto-snapshots on a server. They were set up so that a daily snapshot was being kept for a month and I simply wanted to reduce that time to a week. I knew that this is set up through svc properties and could see this like this

bl3:~# svcprop auto-snapshot:daily
zfs/auto-include boolean true
zfs/avoidscrub boolean false
zfs/backup astring none
zfs/backup-lock astring unlocked
zfs/backup-save-cmd astring not\ set
zfs/fs-name astring //
zfs/interval astring days
zfs/label astring daily
zfs/offset astring 0
zfs/period astring 1
zfs/sep astring _
zfs/keep astring 31
zfs/snapshot-children boolean false
zfs/verbose boolean true
general/action_authorization astring solaris.smf.manage.zfs-auto-snapshot
general/value_authorization astring solaris.smf.manage.zfs-auto-snapshot
general/enabled boolean true

I knew I had to modify the zfs/keep parameter but I just could not remember how to modify these properties through svccfg. After 5 minutes of googling I found this nice summary and was able to put the pieces and syntax together:

bl3:~# svccfg -s auto-snapshot:daily
svc:/system/filesystem/zfs/auto-snapshot:daily> setprop zfs/keep=7
svc:/system/filesystem/zfs/auto-snapshot:daily> exit
bl3:~# svcadm refresh auto-snapshot:daily

Now I can only hope I remember the ‘-s’ flag to svccfg and setprop.

One thought on “Modify service property in Solaris

  1. je suis diplômée en communication graphique et j’aimerais poursuivre mes études en Allemagne, pour cela je sollicite votre aide pour l&8et17;obt#n2ion d’une bourse d’étude si possibilité est ! Merci d’avance.

Leave a Reply

Your email address will not be published. Required fields are marked *