1sndradm(1M) System Administration Commands sndradm(1M)
2
3
4
6 sndradm - control Sun StorageTek Availability Suite Remote Mirror oper‐
7 ations
8
10 sndradm -I a master shadow bitmap
11
12
13 sndradm -I d master shadow bitmap
14
15
16 sndradm -h usage message
17
18
19 sndradm -v version information
20
21
22 sndradm [options] -e [sndr_set]
23
24
25 sndradm [options] -E [sndr_set]
26
27
28 sndradm [options] -d [sndr_set]
29
30
31 sndradm [options] -D block [sndr_set]
32
33
34 sndradm [options] -D noblock [sndr_set]
35
36
37 sndradm [options] -l [sndr_set]
38
39
40 sndradm [options] -m [sndr_set]
41
42
43 sndradm [options] -m -r [sndr_set]
44
45
46 sndradm [options] -u [sndr_set]
47
48
49 sndradm [options] -u -r [sndr_set]
50
51
52 sndradm [options] -w [sndr_set]
53
54
55 sndradm [options] -H [sndr_set]
56
57
58 sndradm [options] -p [sndr_set]
59
60
61 sndradm [options] -P [sndr_set]
62
63
64 sndradm [options] -q a volume [sndr_set]
65
66
67 sndradm [options] -q d [sndr_set]
68
69
70 sndradm [options] -q r volume [sndr_set]
71
72
73 sndradm [options] -i [sndr_set]
74
75
76 sndradm [options] -a value [sndr_set]
77
78
79 sndradm [options] -A value [sndr_set]
80
81
82 sndradm [options] -F value [sndr_set]
83
84
85 sndradm [options] -W value [sndr_set]
86
87
88 sndradm [options] -R
89
90
91 sndradm [options] -R b p bitmap [sndr_set]
92
93
94 sndradm [options] -R b s bitmap [sndr_set]
95
96
97 sndradm [options] -R C tag [sndr_set]
98
99
100 sndradm [options] -R g io_groupname [sndr_set]
101
102
103 sndradm [options] -R m sync [sndr_set]
104
105
106 sndradm [options] -R m async [sndr_set]
107
108
109 sndradm [options] -R -f volset-file
110
111
112 sndradm [options] -R r [sndr_set] *
113
114
116 The /usr/sbin/sndradm command is the administrative command line inter‐
117 face for the Sun StorageTek Availability Suite Remote Mirror software.
118 Remote Mirror enables you to replicate disks between different physi‐
119 cally-separate Sun servers in real time. Remote Mirror is conceptually
120 similar to the local disk mirroring scheme of RAID 1 but it performs
121 its replication operations over longer distances.
122
123
124 If you do not specify a Remote Mirror set (sndr_set) on the command
125 line, sndradm operates on all configured Remote Mirror sets.
126
127
128 The sndradm command generates an entry in the Availability Suite log
129 file, /var/adm/ds.log (see ds.log(4)), for all operations except print
130 (-p, -P and -i), help (-h), and version (-v).
131
133 The sndradm utility supports the following options:
134
135 -f volset-file
136
137 Specifies a file containing the sndr_set information for one or
138 more Remote Mirror sets in the same format as the fully specified
139 command line sndr_set documented below.
140
141
142 -g io_groupname
143
144 Limits operations to only those Remote Mirror sets belonging to
145 io_groupname.
146
147 The io_groupname for a given set must be consistent across both the
148 primary and the secondary hosts.
149
150
151 -C tag
152
153 On a clustered node, limits operations to only those Remote Mirror
154 sets belonging to the cluster resource group or disk group name
155 specified by tag. This option is not valid on a system that is not
156 clustered.
157
158
159 -n
160
161 Does not prompt the user after starting a Remote Mirror operation
162 using sndradm. For all but the printing, help, and version options,
163 the default behavior is to prompt for a response. For example,
164 after starting a full synchronization from the primary to the sec‐
165 ondary volume, Remote Mirror prompts: "Overwrite secondary with
166 primary? (Y/N) [N]".
167
168
169 sndr_set
170
171 Specifies the Remote Mirror set. For a set that has already been
172 enabled, this can be a set_name in the format shost:sdev. You can
173 supply a fully specified Remote Mirror set in the same format as a
174 configuration file:
175
176 phost pdev pbitmap shost sdev sbitmap ip {sync | async} \
177 [g io_groupname] [C tag]
178
179 These parameters are described as follows:
180
181 phost
182
183 Specifies the server on which the primary volume resides.
184
185
186 pdev
187
188 Specifies the primary volume partition to be replicated. Spec‐
189 ify full pathnames only (for example, /dev/rdsk/c0t1d0s2).
190
191
192 pbitmap
193
194 Specifies the volume partition on which the bitmap (scoreboard
195 log) of the primary partition is stored. Specify full pathnames
196 only (for example, /dev/rdsk/c0t1d0s3).
197
198
199 shost
200
201 Specifies the server on which the secondary volume resides.
202
203
204 sdev
205
206 Specifies the secondary volume partition. Specify full path
207 names only (for example, /dev/rdsk/c0t1d0s4).
208
209
210 sbitmap
211
212 Specifies the volume partition on which the bitmap (scoreboard
213 log) of the secondary partition is stored. Specify full path
214 names only (for example, /dev/rdsk/c0t1d0s5).
215
216
217 ip
218
219 Specifies the network transfer protocol.
220
221
222 sync | async
223
224 Specifies the Remote Mirror operating mode. sync is the Remote
225 Mirror mode where the I/O operation is not confirmed as com‐
226 plete until the remote volume has been updated. async is the
227 Remote Mirror mode where the primary host I/O operation is con‐
228 firmed as complete before updating the remote volume.
229
230
231 io_groupname
232
233 Specifies the name of the Remote Mirror consistency group to
234 which the Remote Mirror set belongs. In asynchronous mode,
235 write ordering must be preserved across all replicating volumes
236 in a Remote Mirror consistency group. This ensures that the
237 secondary volumes belonging to the group contains a valid
238 point-in-time copy of the corresponding primary volumes.
239
240 When adding an existing set to a consistency group or when
241 enabling a set to be in a group, the set must be configured
242 with the same group name on both the primary and the secondary
243 hosts.
244
245
246 tag
247
248 For operation within a cluster, this specifies the disk group
249 name or resource tag of the local data and bitmap volumes in
250 cases where this is not implied by the name of the volume (for
251 example, /dev/rdsk/md/dg/vol and /dev/vx/rdsk/dg/vol both indi‐
252 cate a disk group name of dg). It is the responsibility of the
253 user to ensure that the cluster tag specified to the Remote
254 Mirror matches the appropriate cluster resource group tag, and
255 to keep all the Availability Suite services up to date in the
256 event of cluster resource group reconfigurations. It is illegal
257 to specify the cluster resource tag on a system that is not
258 clustered.
259
260
261
263 A valid sndradm command must specify one of the parameters listed
264 below.
265
266 -I a master shadow bitmap
267
268 Add an ndr_ii entry with the specified master, shadow, and bitmap
269 to the Availability Suite configuration file. See sndrsyncd(1M). If
270 the corresponding Point-in-Time Copy set does not exist, it is
271 enabled when the next sync command is issued on the related vol‐
272 ume(s). When no longer required, this Point-in-Time Copy set can be
273 disabled by iiadm -d. See iiadm(1M)
274
275
276 -I d master shadow bitmap
277
278 Delete the ndr_ii entry with the specified master, shadow, and bit‐
279 map from the Availability Suite configuration file. Use the dscfg
280 command to list ndr_ii configuration entries.
281
282
283 -a value
284
285 Specifies the value, on or off, of the automatic sync variable for
286 the set. Once autosync has been requested for a set, the function‐
287 ality is active from the time a sync operation is requested until
288 the set is manually put into logging mode. Once the set is manually
289 put into logging mode, the autosync functionality is not active and
290 remains inactive until the next time a sync request is made. To
291 check whether autosync is active, use sndradm -P. To check whether
292 autosync has been requested for a set, look for the"auto=on;" tag
293 for the set in the output of dscfg -l. See sndrsyncd(1M).
294
295
296 -A value
297
298 Specifies the maximum number of threads that can be created to
299 process the asynchronous queue when a set is replicating in asyn‐
300 chronous mode. The default is 2.
301
302
303 -W value
304
305 Specifies the maximum number of writes that can be queued to a set
306 replicating in asynchronous mode. The default is 4096. For example,
307 set this value to 1 to ensure that the secondary volume is never
308 more than one write operation behind the primary volume.
309
310 Tuning the maximum number of writes is only valid for sets using
311 memory-based async I/O queues. This value is ignored when disk
312 based I/O queues are used.
313
314
315 -D {block | noblock}
316
317 Toggles the block|noblock attribute of a disk-based queue. The
318 default setting is block. If the I/O fill rate is larger than the
319 drain rate for enough time for the queue to fill, incoming I/O is
320 blocked until there is adequate space on the queue for it. This is
321 to preserve write ordering whether it is one volume or across many
322 volumes in the same consistency group. If noblock is set, and
323 incoming I/O fills the queue, the I/O is not blocked. Instead, the
324 set is put into logging and the disk queue contents are disre‐
325 garded. An ensuing update sync synchronizes the latest data to the
326 secondary site.
327
328
329 -F value
330
331 Specifies the maximum number of 512-byte FBAs that can be queued in
332 kernel memory to a set replicating in asynchronous mode. The
333 default is 16384.
334
335 Tuning the maximum number of FBAs is valid only for sets using mem‐
336 ory-based async I/O queues. This value isignored when disk-based
337 I/O queues are used.
338
339
340 -h
341
342 Prints the sndradm usage summary.
343
344
345 -v
346
347 Prints the Remote Mirror version number.
348
349
350 -e
351
352 Enables Remote Mirror for the set and enables scoreboard logging.
353 The scoreboard is set to indicate that a full synchronization is
354 required. Details of the set are saved in the current configura‐
355 tion. See dscfg(1M). The local volume and the bitmap volume are
356 enabled for the Storage Volume driver (see sv(7D)).
357
358
359 -E
360
361 Enables Remote Mirror for the set and enables scoreboard logging.
362 The scoreboard is cleared to indicate that the primary and sec‐
363 ondary volumes are already guaranteed to be fully synchronized.
364 Details of the set are saved in the current configuration. See
365 dscfg(1M). The local volume and the bitmap volume are enabled for
366 the Storage Volume driver (see sv(7D)).
367
368
369 -d
370
371 Disables Remote Mirror for the set and halts any current synchro‐
372 nization operations. sndradm -d also discards any active score‐
373 boards that track temporary differences between primary and sec‐
374 ondary volumes.
375
376
377 -l
378
379 Stops Remote Mirror replication and copy operations between primary
380 and secondary volumes and starts independent Remote Mirror score‐
381 board logging on these volumes. When all the sets in a consistency
382 group are replicating, it means that the secondary volumes contain
383 a valid point-in-time copy of the corresponding primary volumes.
384 Under this condition, as soon as one Remote Mirror set drops into
385 logging mode, the rdc kernel module drops all the other sets in the
386 group into logging mode automatically. This ensures that the sec‐
387 ondary volumes still contains a valid point-in-time copy. To resume
388 the Remote Mirror after using the -l parameter, use the -m parame‐
389 ter to perform a full resynchronization or the -u parameter to per‐
390 form an update resynchronization (based on the scoreboard).
391
392 This option does not work on the secondary for any volumes that are
393 currently synchronizing.
394
395
396 -w
397
398 Waits for a synchronization copy to complete or abort, or returns
399 immediately if invoked on the secondary system.
400
401
402 -H
403
404 Reports on the health of the network link used by the specified
405 volume set. The health of the link is reported as active or inac‐
406 tive. Active means that the network link is actively being used for
407 replicating or resynchronizing data, and is therefore in good
408 health. Inactive means that the network link is not actively being
409 used for replicating or resynchronizing data, which might indicate
410 a problem with the link.
411
412
413 -p
414
415 Displays a list of configured Remote Mirror volumes or sets.
416
417
418 -P
419
420 Displays a list of configured Remote Mirror volumes or sets with
421 extra details. (See state descriptions, below.)
422
423
424 -q a volume
425
426 Add a disk queue to a set or group. This operation is valid when
427 the set or group is in logging mode.
428
429
430 -q d
431
432 Remove a disk queue from a set or group. This operation is valid
433 when the set or group is in logging mode.
434
435
436 -q r volume
437
438 Replace a disk queue for a group or set. The queue is removed from
439 the set or group as in the queue-disable operation and the new disk
440 queue is added as in the queue-add operation. This operation is
441 valid when the set or group is in logging mode.
442
443
444 -i
445
446 Displays a list of configured Remote Mirror volumes or sets in the
447 same format as the volset-file.
448
449
450 -R
451
452 Attempt to reset a Remote Mirror set's error condition such as
453 failed bitmaps.
454
455
456 -R b p bitmap
457
458 Reconfigure a Remote Mirror set's primary bitmap. This command
459 should be entered on both primary and secondary servers. It is only
460 possible to reconfigure the primary bitmap for one set at a time.
461
462
463 -R b s bitmap
464
465 Reconfigure a Remote Mirror set's secondary bitmap. This command
466 should be entered on both primary and secondary servers. It is only
467 possible to reconfigure the secondary bitmap for one set at a time.
468
469
470 -R C tag
471
472 Reconfigure the cluster tag, or disk group name, of a Remote Mirror
473 set's local volumes, in those cases where this is not indicated by
474 the pathname. This does not affect the remote volumes. This parame‐
475 ter cannot be used on a system that is not clustered.
476
477
478 -R m {sync | async}
479
480 Reconfigure the replication mode of a Remote Mirror set. The sets
481 belonging to a consistency group must be either all synchronous or
482 all asynchronous. It is not possible to mix modes within a group.
483
484
485 -R g group
486
487 Reconfigure the consistency group of a Remote Mirror set. This com‐
488 mand should be entered with the same group name on both primary and
489 secondary servers.
490
491 To remove a set from a consistency group, specify the null string
492 (" ") when reconfiguring the consistency group.
493
494
495
496 The following parameters can be issued only from the primary server:
497
498 -m
499
500 Starts a full volume copy from the primary volume to the secondary
501 volume, and concurrently enables Remote Mirror replication of new
502 updates from the primary volume to the secondary volume. Use this
503 parameter when the primary and secondary volumes might be different
504 and no logging information exists to incrementally resynchronize
505 the volumes. See EXIT STATUS.
506
507
508 -r
509
510 Reverses the direction of the synchronization so the primary volume
511 is synchronized from the secondary volume. Use this parameter with
512 the -m or -u parameter. -m -r starts a full volume copy from the
513 secondary (source) volume to the primary (target) volume but con‐
514 currently enables Remote Mirror replication of new updates from the
515 primary (source) volume to the secondary (target) volume, ensuring
516 the volume sets remain synchronized. Use -m -r when the primary and
517 secondary volume content might differ and the secondary has the
518 desired contents, yet no logging information exists to incremen‐
519 tally resynchronize the volumes (using -u). -u -r resynchronizes
520 the primary (target) volume from the secondary (source) volume,
521 using the Remote Mirror scoreboard logs maintained while replica‐
522 tion was suspended. It then resumes Remote Mirror replication of
523 new updates from the primary volume to the secondary volume so that
524 the volume sets remain synchronized. Quiesce the workload to the
525 volume sets during the restore/refresh operation. This action
526 ensures that the primary and secondary volumes match before repli‐
527 cation of new updates resumes.
528
529
530 -u
531
532 Updates a Remote Mirror volume set. This parameter resynchronizes a
533 Remote Mirror volume set. Only the blocks logged as changed in the
534 Remote Mirror scoreboards are updated. Enables Remote Mirror repli‐
535 cation for the primary volume and also uses the Remote Mirror
536 scoreboard logs to start the resynchronization process so that the
537 corresponding secondary volume matches the primary volume.
538
539
540 States Returned from sndradm -P
541 The following are the states that can be returned from sndradm -P.
542
543 volume failed
544
545 An I/O operation to the local data volume has failed
546
547
548 bitmap failed
549
550 An I/O operation to the local bitmap volume has failed
551
552
553 disk queue failed
554
555 An I/O operation to disk queue volume has failed
556
557
558 need sync
559
560 A sync to this volume has been interrupted. It needs to be com‐
561 pleted (or restored via Point-in-Time Copy). The direction of the
562 data flow must not be changed until one or the other is done.
563
564
565 need reverse sync
566
567 A reverse sync to this volume has been interrupted. It needs to be
568 completed (or restored via Point-in-Time Copy). The direction of
569 the data flow must not be changed until one or the other is done.
570
571
572 logging
573
574 Incoming writes are logged in the bitmap only. Data is not repli‐
575 cated to the remote site. need sync, need reverse sync, and queuing
576 are all substates of logging such that writes are logged in the
577 bitmap, but not replicated. Queuing mode (described below) logs the
578 writes to the bitmap, and queues the request for later replication
579 by the async flushers.
580
581
582 reverse syncing
583
584 A secondary to primary copy is in progress.
585
586
587 syncing
588
589 A primary to secondary copy is in progress.
590
591
592 queuing
593
594 During normal async replication using disk queues, i/o is placed on
595 the disk queue to be replicated by the async flusher threads. In
596 the event of a temporary link failure, the set transitions to queu‐
597 ing mode. The queue is not discarded, as it would be with memory
598 based queues. Instead, data is logged in the bitmap and placed on
599 the queue. When the link comes up, and sndradm -u is issued, (auto‐
600 mated by turning autosync on for the set) the flushers restarts.
601 This preserves write ordering through a temporary link outage. If
602 write ordering is not necessary, and only the latest data is
603 needed, the set can be put into logging manually (sndradm -l) and
604 an update sync issued (sndradm -u). This action discards the data
605 on the queue, and fast resyncs using the bitmap. If the queue fills
606 before the link comes back and the update sync is issued, the queue
607 is discarded and the set put into logging mode to avoid application
608 hangs.
609
610
612 Example 1 Enabling a Remote Mirror Set
613
614
615 The following command enables a Remote Mirror asynchronous set on host
616 example, where example is the primary host and example-remote is the
617 secondary host.
618
619
620 example% sndradm -e example /dev/rdsk/c1t0d0s1 /dev/rdsk/c1t1d0s3 \
621 example-remote /dev/rdsk/c2t3d0s5 /dev/rdsk/c2t4d0s5 ip async
622
623
624
625 Example 2 Adding a Disk Queue to an Asynchronous Set
626
627
628 The following command adds a disk queue volume to an asynchronous set.
629
630
631 example% sndradm -q a /dev/rdsk/c1t2d0s3 \
632 example-remote:/dev/rdsk/c2t3d0s5
633
634
635
636 Example 3 Removing a Disk Queue from an Asynchronous Set
637
638
639 The following command removes the disk queue volume from a set with a
640 disk queue volume attatched to it.
641
642
643 example% sndradm -q d example-remote:/dev/rdsk/c2t3d0s5
644
645
646
647 Example 4 Disabling a Remote Mirror Set
648
649
650 The following command disables a Remote Mirror set enabled on host
651 example.
652
653
654 example% sndradm -d example-remote:/dev/rdsk/c2t3d0s5
655
656
657
659 0 Command completed successfully.
660
661
662 >0 An error occurred.
663
664
665
666 When the -m or -u option is executed in a script, the exit status fol‐
667 lowing one of these options always returns success, regardless of the
668 current status of the Remote Mirror set.
669
671 See attributes(5) for descriptions of the following attributes:
672
673
674
675
676 ┌─────────────────────────────┬─────────────────────────────┐
677 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
678 ├─────────────────────────────┼─────────────────────────────┤
679 │Availability │SUNWrdcr, SUNWrdcu │
680 ├─────────────────────────────┼─────────────────────────────┤
681 │Interface Stability │Evolving │
682 └─────────────────────────────┴─────────────────────────────┘
683
685 dscfg(1M), sndrd(1M), sndrsyncd(1M), ds.log(4), rdc.cf(4),
686 attributes(5), sv(7D)
687
688
689
690SunOS 5.11 2 Oct 2007 sndradm(1M)