cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting number of drives in a storage unit depending on day/date/time of day

jim_dalton
Level 6
Hello All
 
Im sure someone can clarify how I achieve the following: thanks in advance for any responses.
 
My aim is to  switch netbackup configs on the fly such that I re-arrange
the storage units : the true aim is so I can morph my backup infrastructure
from a weekend mode to weekday mode: weekend is all drives up for DR backups
, weekday is to use a reduced subset of drives for DR backups , leaving say
3 drives for adhoc backups, online oracle backups, restores etc that run
through the working day.

Having read the doc, Im supposed to use  bpsturep -cj to reduce the number
of concurrent jobs associated with my storage unit. Ive done this and then
used the storage unit and netbackup ignores my limit. That is, Ive set -cj=4,
checked its changed, then I kick of a cron job which runs 18 backups: and
all my tape drives in the storage unit get used. Ive not restarted any daemons.
I was expecting 4 drives to get used, the remainder of the jobs queueing.

The situation is quite complex: Ive got one robot, 9 drives, SSO across 5
media servers. All media servers have the same set of 9 drives in their storage units.
The job in question is initiated on the master server, but
the jobs themselves run on floating addresses that exist on one of two (clustered)
servers. Im not entirely sure the job is of any real significance, its the storage units and drives that ought to be dictating the desired outcome: the job just happens to request the storage unit.

Netbackup 5.1mp5, L180, LTO2, all solaris. 

1 ACCEPTED SOLUTION

Accepted Solutions

sdo
Moderator
Moderator
Partner    VIP    Certified
Changes to storage units and storage unit groups are not picked up on the fly by the Netbackup "services" or "daemons".  Whilst the changes may be reflected in the GUI or in command line tools, NetBackup itself doesn't know about the changed configuration.  You have to stop and restart NetBackup services/daemons.  I don't know which ones or whether you have to stop/restart on only the master or on all media servers too.  If you are willing to do some testing and identify just which service(s)/daemon(s) need to be stopped/restarted and on which server(s) (i.e. master only or master and medias), then this information would very useful to all of us.
 
Alternatively, I have seen previous posts (by Patrick) in other forums (for older versions of NBU?) where the solution was to execute these commands fifty times in quick succession in a loop in a script:
$ bprdreq -rereadconfig
$ bpschedreq -reread_stunits
$ bpschedreq -read_stu_config
 

View solution in original post

7 REPLIES 7

sdo
Moderator
Moderator
Partner    VIP    Certified
Changes to storage units and storage unit groups are not picked up on the fly by the Netbackup "services" or "daemons".  Whilst the changes may be reflected in the GUI or in command line tools, NetBackup itself doesn't know about the changed configuration.  You have to stop and restart NetBackup services/daemons.  I don't know which ones or whether you have to stop/restart on only the master or on all media servers too.  If you are willing to do some testing and identify just which service(s)/daemon(s) need to be stopped/restarted and on which server(s) (i.e. master only or master and medias), then this information would very useful to all of us.
 
Alternatively, I have seen previous posts (by Patrick) in other forums (for older versions of NBU?) where the solution was to execute these commands fifty times in quick succession in a loop in a script:
$ bprdreq -rereadconfig
$ bpschedreq -reread_stunits
$ bpschedreq -read_stu_config
 

Brad_Rodgers
Level 3
Tim:
I'm not sure this is exactly what you are trying to do, but I think I have a similar situation on a smaller scale.  I am running NBU 6.0 MP5, so I don't recall if you can do this in 5.1.  I have a single library with 6 LTO-2 drives.  On the weekend I want to use all available drives, but during the week I do duplications during the day and want to have drives available for restores and other backups.  I created separate storage units.  I have one set to use all of the available drives (LTO_All).  In this case the maximum current drives are set to 6.  I have two others (LTO_4 & LTO_2) with the maximum concurrent drives set to 4 and 2 respectively.  This way I can control the maximum number of drives used from the schedule by selecting the appropriate storage unit.

jim_dalton
Level 6
Thats about the size of it Brad, but something else needs a kick as hinted in the previous post since it doesnt obey changes I make to my storage unit. I'll try it the other way around as you have ie create a new stunit and add that to my policy: that may be the cleaner route. Thanks.

Stumpr2
Level 6
Create additional storage unit definitions and change your policy to use whatever storage unit you want at a particular time.
 
USAGE: bpplinfo policy_name -L|-l|-U [-v] [-M master_server,...]
       bpplinfo policy_name -set|-modify [-v] [-M master_server,...]
           [-active | -inactive] [-pt policy_type]
           [-ut] [-ef effective_time]
           [-residence label]
           [-pool label]
           [-priority priority]
           [-rfile flag] [-blkincr flag]
           [-multiple_streams flag] [-keyword "keyword phrase"]
           [-encrypt flag]
           [-collect_tir_info value] [-compress flag]
           [-crossmp flag] [-disaster flag] [-follownfs flag]
           [-policyjobs max_jobs(0=unlimited)]
           [-chkpt flag] [-chkpt_intrvl minutes]
       Valid values for policy_type:
           Standard  Apollo-wbak  Oracle  Informix-On-BAR
           Sybase  MS-SharePoint  NetWare  DataTools-SQL-BackTrack
           MS-Windows-NT  OS/2  MS-SQL-Server  MS-Exchange-Server
           SAP  DB2  NDMP  FlashBackup  Split-Mirror
           AFS  DataStore  Lotus-Notes  NCR-Teradata
           FlashBackup-Windows  Vault
     -residence label
               Specifies the label of the storage unit for  stor-
               ing   the   backups   created  according  to  this
               schedule.  The  default  is  Any_available.   This
               allows  the  policy  to use any storage unit which
               has the attribute On Demand Only? set to  No.   If
               the policy needs to use a specific storage unit or
               the storage unit  desired  has  the  attribute  On
               Demand  Only? set to Yes, then specify the storage
               unit.  If "*NULL*" is specified, the residence for
               the  schedule  is set (or reset) to Any_available.
               The policy residence determines the residence  for
               the  policy  schedules, unless the Override Policy
               Storage Unit setting  on  an  individual  schedule
               specifies  a  residence.  Run bpstulist to display
               the set of defined storage units.

jim_dalton
Level 6
To conclude: stumpr: your suggestion would work , but the overhead in maintaining it is I feel excessive. A script to identify all current and future users of a given storage unit and then modify them : whilst not beyond my skills is just too convoluted, so I tried some tests...ok I tried one test and its worked a treat, so far.  
 
 /opt/openv/netbackup/bin/admincmd/bpsturep   -label   wunnetb-L180 -cj 7 ; /opt/openv/netbackup/bin/admincmd/bprdreq -rereadconfig
 
to switch to 7 and -cj 9 to switch back to 9 ( of course ). 

zippy
Level 6
You have SSO on the other server right?
 
If you do you could make two diff policies, one for the week and one for the weekend.  Youll have to make additional storage units for the weekend Mod too.
 
Jim D
 
 

Stumpr2
Level 6


James Dunn wrote:
If you do you could make two diff policies, one for the week and one for the weekend.  Youll have to make additional storage units for the weekend Mod too.


Doh! James has supplied the best answer. Why didn't I think of that?
 
James, I'm glad your back!