MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


SG3UTILS                                          SGPREVENT(1M)



NAME
     sgprevent - sends a SCSI PREVENT ALOW MEDIUM REMOVAL  com-
     mand

SYNOPSIS
     sgprevent  [--allow]  [--help]  [--prevent=PC]  [--verbose]
     [--version] DEVICE

DESCRIPTION
     Sends a SCSI PREVENT ALOW MEDIUM REMOVAL command to DEVICE.
     The  default action of this utility is to prevent the remov-
     ing or ejecting of the medium from a drive. This is done  by
     ignoring the SCSI START STOP UNIT command (see sgstart) and
     ignoring the eject button on the drive when the user presses
     it.  Drives  that  hold  removable disks, tape cartridges or
     cd/dvd media typically implement this command.  The  defini-
     tion  of the "prevent" codes for this command differ between
     disks and tapes (covered by  SBC-3  and  SC-3)  and  cd/dvd
     drives  (covered  by  MC-5).  The "prevent codes" described
     here are from MC-5.

OPTIONS
     Arguments to long options are mandatory for short options as
     well.

     -a, --allow
          allow medium removal. This is equivalent to setting  to
          '--prevent=2'.  Cannot be used with --prevent=PC option
          (i.e. either use no options  (hence  prevent  removal),
          this option or --prevent=PC).

     -h, --help
          output the usage message then exit.

     -p, --prevent=PC
          where PC is a prevent code value. Defined values are: 0
          allows  removal, 1 prevents removal (default), 2 allows
          persistent removal while 3 prevents persistent removal.
          "Persistent"  in  this context means that the initiator
          (port) that successfully uses code 3 blocks other  ini-
          tiators  (ports)  from  allowing removal. A "persistent
          prevent" state can be cleared  by  the  owner  allowing
          persistent  removal  (code 2) or a power cycle (or any-
          thing that resets the device  (lun))  or  some  special
          commands  (e.g.  various  service actions of Persistent
          Reserve Out, see SPC-3).

     -v, --verbose
          increase the level of verbosity, (i.e. debug output).

     -V, --version
          print the version string and then exit.



sg3utils-1.23      Last change: January 2007                   1






SG3UTILS                                          SGPREVENT(1M)



EXIT STATUS
     The exit status of sgprevent is 0 when  it  is  successful.
     Otherwise see the sg3utils(1M) man page.

AUTHORS
     Written by Douglas Gilbert.

REPORTING BUGS
     Report bugs to .

COPYRIGHT
     Copyright O 2004-2007 Douglas Gilbert
     This software is distributed under a FreeBSD license.  There
     is  NO warranty; not even for MERCHANTABILITY or FITNES FOR
     A PARTICULAR PURPOSE.

SEE ALSO
     sgstart(sg3utils), sgpersist(sg3utils)

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     
       ATRIBUTE TYPE     ATRIBUTE VALUE
    
     Availability         SUNWsg3utilsu  
    
     Interface Stability  Committed      
    

NOTES
     Source for sg3utils is available on http:/opensolaris.org.






















sg3utils-1.23      Last change: January 2007                   2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™