Skip to main content
Pure1 Support Portal

purepgroup-setattr

Name

purepgroup-allow, purepgroup-disable, purepgroup-disallow, purepgroup-enable, purepgroup-schedule, purepgroup-setattr — manage the attributes of the Purity protection group (pgroup).

Synopsis

purepgroup allow PGROUP...

purepgroup disable [ --replicate | --snap ] PGROUP...

purepgroup disallow PGROUP...

purepgroup enable [ --replicate | --snap ] PGROUP...

purepgroup retain [--all-for PERIOD] [--per-day SNAPS-PER-DAY] [--days COUNT] [--target-all-for PERIOD] [--target-per-day SNAPS-PER-DAY] [--target-days COUNT] PGROUP...

purepgroup schedule [--snap-frequency FREQUENCY] [--snap-at TIME] [--replicate-frequency FREQUENCY] [--replicate-at TIME] [--replicate-blackout WINDOW] PGROUP...

purepgroup setattr [--addhgrouplist HGROUPS] [--hgrouplist HGROUPS] [--remhgrouplist HGROUPS] [--addhostlist HOSTS] [--hostlist HOSTS] [--remhostlist HOSTS] [--addtargetlist TARGETS] [--targetlist TARGETS] [--remtargetlist TARGETS] [--addvollist VOLS] [--vollist VOLS] [--remvollist VOLS] PGROUP...

Arguments

PGROUP

Protection group name. For purepgroup allow and purepgroup disallow, array name and protection group name of the source array and protection group from which to allow or disallow replication.

Options

-h | --help

Can be used with any command or subcommand to display a brief syntax description.

--addhgrouplist

Comma-separated list of one or more additional host groups to be included in the specified protection groups. Has no effect on host groups already associated with the group.

--addhostlist

Comma-separated list of one or more additional hosts to be included in the specified protection groups. Has no effect on hosts already associated with the group.

--addtargetlist

Comma-separated list of one or more additional target arrays to be included in the specified protection groups. Has no effect on target arrays already associated with the group.

--addvollist

Comma-separated list of one or more additional volumes to be included in the specified protection groups. Has no effect on volumes already associated with the group.

--all-for

Length of time to keep the snapshots on the source array before they are eradicated.

--days

Number of days to keep the --per-day snapshots beyond the --all-for period before they are eradicated.

--hgrouplist

Comma-separated list of one or more host groups to be included in the specified protection groups, replacing any host groups that currently belong to the protection group.

--hostlist

Comma-separated list of one or more hosts to be included in the specified protection groups, replacing any hosts that currently belong to the protection group.

--per-day

Number of per-day snapshots to keep beyond the --all-for period.

--remhgrouplist

Comma-separated list of one or more host groups to be removed from the specified protection group.

--remhostlist

Comma-separated list of one or more hosts to be removed from the specified protection group.

--remtargetlist

Comma-separated list of one or more target arrays whose associations with the specified protection group are to be broken.

--remvollist

Comma-separated list of one or more volumes to be removed from the specified protection group.

--replicate

Enables or disables replication.

--replicate-at

Preferred time, on the hour, at which to replicate the snapshots. To clear the preferred time, set to an empty string ("").

--replicate-blackout

Range of time at which to suspend replication. To clear the blackout period, set to an empty string ("").

--replicate-frequency

Replication frequency.

--snap

Enables or disables snapshot creation on the source array.

--snap-at

Preferred time, on the hour, at which to generate the snapshot. To clear the preferred time, set to an empty string ("").

--snap-frequency

Snapshot frequency.

--target-all-for

Length of time to keep the replicated snapshots on the target arrays.

--target-days

Number of days to keep the --target-per-day snapshots beyond the --target-all-for period before they are eradicated.

--target-per-day

Number of per-day snapshots to keep beyond the --target-all-for period.

--targetlist

Comma-separated list of one or more target arrays to be associated with the protection group. When specified in the purepgroup setattr command, replaces the existing target arrays of the protection group.

--vollist

Comma-separated list of one or more volumes to be included in the specified protection groups, replacing any volumes that currently belong to the protection group.

Conventions

The protection group snapshot naming convention is PGROUP.NNN, where:

  • PGROUP is the name of the protection group.

  • NNN is a unique monotonically increasing number or a manually-assigned protection group snapshot suffix name.

The protection group volume snapshot naming convention is PGROUP.NNN.VOL, where:

  • PGROUP is the name of the protection group.

  • NNN is a unique monotonically increasing number or a manually-assigned protection group snapshot suffix name.

  • VOL is name of the volume member.

If you are viewing replicated snapshots on a target array, the snapshot name begins with the name of the source array from where the snapshot was taken.

Description

After a protection group has been created, configure the schedules to generate and replicate snapshots. For more information about creating protection groups, refer to purepgroup(1).

To configure the protection group snapshot schedule:

  1. Define the snapshot schedule.

  2. Define the retention schedule.

  3. Enable protection group snapshots.

To configure the protection group replication schedule:

  1. Connect the source and target arrays.

  2. Allow replication on the target arrays.

  3. Define the replication schedule.

  4. Define the retention schedule.

  5. Enable protection group replication.

The snapshot and replication schedules can be enabled and disabled at any time.

Note that protection group snapshots can also be generated and replicated on demand. For more information about generating on-demand snapshots, refer to purepgroup(1).

Establishing a Connection Between the Source and Target Arrays

Replication between a source and target array can only occur if the arrays are connected and the target array has allowed replication.

To connect a source array to a target array, log in to the target array and run purearray connect --connection-key to obtain a connection key, and then log in to the source array and run purearray connect to connect the target array to the source array. A source array can connect to multiple target arrays. For more information about connecting arrays, refer to purearray(1).

Once two arrays are connected, log in to the target array and run purepgroup allow to allow data to be replicated to it. The purepgroup disallow command stops replication to the target array. Allowing and disallowing replication on a target array will not impact the replication process between the source array and other target arrays. If you disallow replication while a replication session is in progress, Purity will wait until the session is complete and then stop any new replication sessions from being created.

When specifying the purepgroup allow and purepgroup disallow commands, include the source array name and protection group name in the argument, separating the two names with a colon (:).

In the following example, the array is allowing data to be replicated from protection group PGROUP1 on array ARRAY1.

purepgroup allow ARRAY1:PGROUP1
        

Defining the Protection Group Snapshot and Replication Schedules

Once a protection group has been created, and connections between the source and target arrays have been established (for replication only), define the protection group snapshot and replication schedules.

Each protection group includes two schedules:

  • Snapshot Schedule. Defines when and how frequently snapshots are taken and saved on the local (source) array. Run purepgroup schedule --snap-frequency to configure the snapshot schedule.

  • Replication Schedule. Defines when and how frequently snapshots are taken and immediately replicated to its target arrays. Run purepgroup schedule --replicate-frequency to configure the replication schedule.

The snapshot schedule is independent of the replication schedule, meaning you can enable one schedule without enabling the other. You can also enable or disable both schedules at any time. The schedules are by default disabled.

The purepgroup schedule command configures the snapshot and replication schedules for the protection group. By default, the protection group schedules are configured to generate snapshots every hour and replicate snapshots to the target arrays every 4 hours.

Snapshot Schedule

The purepgroup schedule --snap-frequency command specifies how frequently Purity generates snapshots on the source array.

The frequency is specified as an integer, optionally followed by one of the suffix letters m (minutes), h (hours), and d (days). If you do not specify a suffix, the frequency is expressed in minutes.

For example, run the following command to generate snapshots every 2 hours for protection group pgroup1.

          purepgroup schedule --snap-frequency 2h pgroup1
        

If the --snap-frequency option is set to one or more days, optionally set the --snap-at option to specify the preferred time, on the hour, at which to generate the snapshot on the source array. If the preferred time is set and you want to cancel it, meaning that you no longer want to specify a preferred time, set the --snap-at option to an empty string ("").

The time can be specified in 12-hour or 24-hour format. To specify the time in 12-hour format, enter the time integer followed by the suffix am or pm.

For example, run the following command to set the preferred snapshot time for protection group pgroup3 to 6:00pm. A snapshot will be generated every 2 days at or soon after 6pm.

          purepgroup schedule --snap-frequency 2d --snap-at 18 pgroup3
        

Replication Schedule

The purepgroup schedule --replicate-frequency command specifies how frequently Purity replicates the snapshots from the source array to the target arrays.

The frequency is specified as an integer, optionally followed by one of the suffix letters m (minutes), h (hours), and d (days). If you do not specify a suffix, the frequency is expressed in minutes.

For example, run the following command to replicate snapshots to the target arrays every 6 hours for protection group pgroup2.

          purepgroup schedule --replication-frequency 6h pgroup2
        

If the --replicate-frequency option is set to one or more days, optionally set the --replicate-at option to specify the preferred time, on the hour, at which to replicate the snapshots to the target arrays. If the preferred time is set and you want to cancel it, meaning that you no longer want to specify a preferred time, set the --replicate-at option to an empty string ("").

The time can be specified in 12-hour or 24-hour format. To specify the time in 12-hour format, enter the time integer followed by the suffix am or pm.

For example, run the following command to set the preferred replication time for protection group pgroup3 to 6:00pm. Snapshot replication will occur every 2 days at or soon after 6pm.

          purepgroup schedule --replicate-frequency 2d --replicate-at 18 pgroup3
        

The --replicate-blackout option (blackout period) specifies the range of time in which to suspend replication. Replication from the source to target arrays will not occur during the blackout period.

The start and end times for the blackout window must be set on the hour. The time can be specified in 12-hour or 24-hour format. To specify the time in 12-hour format, enter the time integer followed by the suffix am or pm.

For example, run the following command to suspend replication between 9:00am and 5:00pm for protection group pgroup4.

          purepgroup schedule --replicate-blackout 9am-5pm pgroup4
        

Blackout periods only apply to scheduled replications. On-demand replications (purepgroup snap --replicate-now) do not observe the blackout period.

If the blackout period is set and you want to cancel it, meaning that you no longer want to specify a blackout period, set the --replicate-blackout option to an empty string ("").

Defining the Protection Group Retention Schedule

The purepgroup retain command configures the snapshot retention schedule for the specified protection group.

By default, protection groups are scheduled to retain all snapshots for 1 day. After that, Purity keeps 4 snapshots for an additional 7 days and eradicates the others. Seven days later, Purity eradicates the 4 snapshots.

The following sample retention schedule output reflects the protection group schedule with the default schedule settings:

$ purepgroup list --retention
Name     Array   All For  Per Day  Days
pgroup1  source  1d       4        7
         target  1d       4        7

The --all-for option specifies the length of time to keep the snapshots on the source array before they are eradicated. The length of time is specified as an integer, optionally followed by one of the suffix letters m (minutes), h (hours), and d (days). If you do not specify a suffix, the length of time is expressed in minutes.

For example, run the following command to keep all snapshots on the source array for for 5 days.

        purepgroup retain --all-for 5d pgroup5
      

The --per-day option specifies the number of per-day snapshots to keep beyond the --all-for period, while the --days option specifies the number of days to keep the --per-day snapshots beyond the --all-for period. After the --days period, the snapshots are eradicated.

For example, run the following command to keep 8 snapshots per day for an additional 5 days on the source array after the --all-for period.

        purepgroup retain --per-day 8 --days 5 pgroup6
      

The --target-all-for option specifies the length of time to keep the replicated snapshots on the target arrays before they are eradicated.

The length of time is specified as an integer, optionally followed by one of the suffix letters m (minutes), h (hours), and d (days). If you do not specify a suffix, the length of time is expressed in minutes.

For example, run the following command to keep all replicated snapshots on the target arrays for 7 days.

        purepgroup retain --target-all-for 7d pgroup7
      

The --target-per-day option specifies the number of per-day snapshots to keep beyond the --target-all-for period, while the --target-days option specifies the number of days to keep the --target-per-day snapshots beyond the --target-all-for period. After the --target-days period, the replicated snapshots are eradicated.

For example, run the following command to keep 4 replicated snapshots per day for an additional 3 days on the target array after the --target-all-for period.

        purepgroup retain --target-per-day 4 --target-days 3 pgroup8
      

Enabling Protection Group Snapshots and Replication

Once the protection group snapshot and/or replication schedules have been defined, run purepgroup enable to enable snapshots and replications on the source array for the specified protection groups. Specify the --snap option to enable snapshots only. Specify the --replicate option to enable replication only. If the command is run without either option, Purity enables both snapshots and replication.

Once you enable the snapshot schedule, Purity immediately starts the snapshot process, with the following exception:

  • If you are enabling the snapshot schedule and the --snap-at time is specified, Purity starts the snapshot process at the specified --snap-at time.

Once you enable the replication schedule, Purity immediately starts the replication process, with the following exceptions:

  • If you are enabling the replication schedule during the blackout period, Purity waits for the blackout period to end before it begins the snapshot and/or replication process.

  • and the --replicate-at time is specified, If you are enabling the replication schedule Purity starts the replication process at the specified --replicate-at time.

The purepgroup disable command disables snapshots and replication for the specified protection group. Specify the --snap option to disable snapshots only. Specify the --replicate option to disable replication only. If the command is run without either option, Purity disables both snapshots and replication.

Space Consumption Considerations

Consider space consumption when you configure the snapshot, replication, and retention schedules. The amount of space consumed on the source array depends on how many snapshots you want to generate, how frequently you want to generate the snapshots, how many snapshots you want to retain, and how long you want to retain the snapshots.

Likewise, the amount of space consumed on the target array depends how many snapshots you want to replicate, how frequently you want to replicate the snapshots, how many replicated snapshots you want to retain, and how long you want to retain them.

In the following sample snapshot, replication, and retention schedules, the settings in Scenario 1 will consume more space than the settings in Scenario 2:

SCENARIO 1

$ purepgroup list --schedule
Name        Schedule   Enabled  Frequency  At   Blackout
array1:pg1  snap       False    15m         -   -
            replicate  False    1h         6pm  -

$ purepgroup list --retention
Name     Array   All For  Per Day  Days
pgroup1  source  2w       24       30
         target  2w       24       30

SCENARIO 2

$ purepgroup list --schedule
Name        Schedule   Enabled  Frequency  At   Blackout
array1:pg1  snap       False    1h         -    -
            replicate  False    4h         6pm  -

$ purepgroup list --retention
Name     Array   All For  Per Day  Days
pgroup1  source  1d       4        7
         target  1d       4        7

Adding and Removing Protection Group Members

The purepgroup setattr command adds members to a protection group or removes members from a protection group.

Only members of the same object type can belong to a protection group. For example, hosts or host groups cannot be added to a protection group that contains volumes.

The --addhgrouplist, --addhostlist, and --addvollist options add one or more members to a protection group. Existing members in the protection group are unaffected.

The --hgrouplist, --hostlist, and --vollist options add one or more members to a protection group, replacing all members that are currently in the protection group.

The --remhgrouplist, --remhostlist, and --remvollist options remove members from a protection group.

Note that an alternate (and preferred!) method to add and remove protection group members is through the add and remove subcommands. Run the add subcommand with the respective purehgroup, purehost, or purevol command to add one or more members to one or more protection groups. For example, run purehgroup add --pgroup PGROUP HGROUP to add host groups to protection groups. Run the remove subcommand with the respective purehgroup, purehost, or purevol command to remove one or more members from one or more protection groups For example, run purevol remove --pgroup PGROUP VOL to remove volumes from protection groups.

Examples

Example 1

purepgroup enable pgroup4
      

(Run from the source array)...

Enables snapshots and replication for protection group pgroup4. Replication can only occur if the target arrays allow it.

Example 2

purepgroup allow array1:pgroup4
      

(Run from the target array)...

Allows replication from source array array1 to the target array for protection group pgroup4.

Example 3

purepgroup schedule --snap --hourly 3 pgroup2
      

Of the snapshots generated on the pgroup2 source array based on the snapshot frequency, keeps the 3 most recent hourly snapshots.

Example 4

purepgroup schedule --replicate --blackout 9:00am-5:00pm pgroup10
      

Stops replicating snapshots from the source array to all target arrays between 9:00am and 5:00pm every day for protection group pgroup10.

Example 5

purepgroup setattr --addhostlist host4,host7,host10 pgroup42
      

Adds hosts host4,host7,and host10 to protection group pgroup42. The existing hosts in pgroup42 are not affected.

Author

Pure Storage Inc.