1SG_SYNC(8)                         SG3_UTILS                        SG_SYNC(8)
2
3
4

NAME

6       sg_sync - send the scsi command synchronize cache
7

SYNOPSIS

9       sg_sync  [--count=COUNT] [--group=GROUP] [--help] [--immed] [--lba=LBA]
10       [--sync-nv] [--verbose] [--version] DEVICE
11

DESCRIPTION

13       Send SYNCHRONIZE CACHE (10) command to DEVICE. This command is  defined
14       for  SCSI  block  devices (see SBC-2). If successful this command makes
15       sure that any blocks whose latest versions are held in (volatile) cache
16       are  written to (also termed as "synchronized with") the medium. If the
17       --sync-nv option is given and the device has a non-volatile cache  then
18       any blocks whose latest versions are held in volatile cache are written
19       to non-volatile cache.
20
21       If the LBA and COUNT arguments are both zero (their defaults) then  all
22       blocks in the cache are synchronized. If LBA is greater than zero while
23       COUNT is zero then blocks in the cache whose  addresses  are  from  and
24       including  LBA  to  the  highest lba on the device are synchronized. If
25       both LBA and COUNT  are  non  zero  then  blocks  in  the  cache  whose
26       addresses  lie  in  the range LBA to LBA+COUNT-1 inclusive are synchro‐
27       nized with the medium.
28

OPTIONS

30       Arguments to long options are mandatory for short options as well.
31
32       -c, --count=COUNT
33              where COUNT is the number of  blocks  to  synchronize  from  and
34              including LBA. Default value is 0. When 0 then all blocks in the
35              (volatile) cache from and including LBA argument to the  highest
36              block address are synchronized.
37
38       -g, --group=GROUP
39              where  GROUP  is  the group number which can be between 0 and 31
40              inclusive.  The default value is 0 . Group numbers are  used  to
41              segregate  data  collected within the device. This is a new fea‐
42              ture in SBC-2 and can probably be ignored for the time being.
43
44       -h, --help
45              output the usage message then exit.
46
47       -i, --immed
48              sets the IMMED  bit  in  the  SYNCHRONIZE  CACHE  command.  This
49              instructs  the  device,  if the format of the command is accept‐
50              able, to return a GOOD status immediately rather than  wait  for
51              the blocks in the (volatile) cache to be synchronized with (i.e.
52              written to) the medium (or the non-volatile cache).
53
54       -l, --lba=LBA
55              where LBA is the lowest logical block address in the  (volatile)
56              cache  to synchronize to the medium (or the non-volatile cache).
57              Default value is 0 .
58
59       -s, --sync-nv
60              synchronize the (volatile) cache with  the  non-volatile  cache.
61              Without this option (or if there is no non-volatile cache in the
62              device) the synchronization is with the medium.
63
64       -v, --verbose
65              increase the level of verbosity, (i.e. debug output).
66
67       -V, --version
68              print the version string and then exit.
69

NOTES

71       Various numeric arguments (e.g. LBA) may  include  multiplicative  suf‐
72       fixes  or  be given in hexadecimal. See the "NUMERIC ARGUMENTS" section
73       in the sg3_utils(8) man page.
74

EXIT STATUS

76       The exit status of sg_sync is 0 when it is  successful.  Otherwise  see
77       the sg3_utils(8) man page.
78

AUTHORS

80       Written by Douglas Gilbert.
81

REPORTING BUGS

83       Report bugs to <dgilbert at interlog dot com>.
84
86       Copyright © 2004-2009 Douglas Gilbert
87       This  software is distributed under a FreeBSD license. There is NO war‐
88       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
89       POSE.
90

SEE ALSO

92       sg_start(sg3_utils)
93
94
95
96sg3_utils-1.27                    March 2009                        SG_SYNC(8)
Impressum