Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ZONECTL(8)		    System Manager's Manual		    ZONECTL(8)

NAME
       zonectl -- Shingled Magnetic Recording Zone Control utility

SYNOPSIS
       zonectl <-d dev>	<-c cmd> [-a] [-l LBA] [-o rep_opts] [-P print_opts]

DESCRIPTION
       Manage  SCSI and	ATA Zoned Block	devices.  This allows managing devices
       that conform to the SCSI	Zoned Block Commands (ZBC) and ATA  Zoned  ATA
       Command Set (ZAC) specifications.  Devices using	these command sets are
       usually hard drives using Shingled Magnetic Recording (SMR).  There are
       three types of SMR drives:

       Drive Managed  Drive  Managed  drives look and act just like a standard
		      random access block device, but  underneath,  the	 drive
		      reads  and  writes  the  bulk  of	its capacity using SMR
		      zones.  Sequential writes	will yield better performance,
		      but writing sequentially is not required.

       Host Aware     Host Aware drives	expose the underlying zone layout  via
		      SCSI  or	ATA  commands and allow	the host to manage the
		      zone conditions.	The host is not	required to manage the
		      zones on the  drive,  though.   Sequential  writes  will
		      yield  better  performance in Sequential Write Preferred
		      zones, but the host can write randomly in	those zones.

       Host Managed   Host Managed drives expose the  underlying  zone	layout
		      via  SCSI	 or ATA	commands.  The host is required	to ac-
		      cess the zones according to the rules described  by  the
		      zone  layout.   Any commands that	violate	the rules will
		      be returned with an error.

       SMR drives are divided into zones (typically  in	 the  range  of	 256MB
       each) that fall into three general categories:

       Conventional	     These  are	also known as Non Write	Pointer	zones.
			     These zones can be	randomly  written  without  an
			     unexpected	performance penalty.

       Sequential Preferred  These zones should	be written sequentially	start-
			     ing  at the write pointer for the zone.  They may
			     be	written	randomly.  Writes that do not  conform
			     to	 the  zone  layout may be significantly	slower
			     than expected.

       Sequential Required   These zones must  be  written  sequentially.   If
			     they  are	not  written sequentially, starting at
			     the write pointer,	the command will fail.

       -c cmd	     Specify the zone subcommand:

		     params  Display device parameters,	including the type  of
			     device  (Drive Managed, Host Aware, Host Managed,
			     Not Zoned), the zone commands supported, and  how
			     many open zones it	supports.

		     rz	     Issue  the	 Report	 Zones command.	 All zones are
			     returned by default.  Specify report options with
			     -o	and printing options  with  -P.	  Specify  the
			     starting LBA with -l.  Note that "reportzones" is
			     also accepted as a	command	argument.

		     open    Explicitly	 open the zone specified by the	start-
			     ing LBA.

		     close   Close the zone specified by starting LBA.

		     finish  Finish the	zone specified by the starting LBA.

		     rwp     Reset the write pointer for the zone specified by
			     the starting LBA.

       -a	     For the Open, Close, Finish, and Reset Write Pointer  op-
		     erations, apply the operation to all zones	on the drive.

       -l lba	     Specify  the starting LBA.	 For the Report	Zones command,
		     this tells	the drive to report  starting  with  the  zone
		     that  starts  at  the given LBA.  For the other commands,
		     this allows the user to identify the  zone	 requested  by
		     its  starting  LBA.  The LBA may be specified in decimal,
		     hexadecimal or octal notation.

       -o rep_opt    For the Report Zones command, specify a subset  of	 zones
		     to	report.

		     all       Report all zones.  This is the default.

		     empty     Report only empty zones.

		     imp_open  Report  zones  that  are	implicitly open.  This
			       means that the host has sent  a	write  to  the
			       zone without explicitly opening the zone.

		     exp_open  Report zones that are explicitly	open.

		     closed    Report zones that have been closed by the host.

		     full      Report zones that are full.

		     ro	       Report  zones  that are in the read only	state.
			       Note that "readonly" is also accepted as	an ar-
			       gument.

		     offline   Report zones that are in	the offline state.

		     reset     Report zones that the device recommends	should
			       have their write	pointers reset.

		     nonseq    Report  zones  that have	the Non	Sequential Re-
			       sources Active flag set.	 These are zones  that
			       are  Sequential	Write Preferred, but have been
			       written non-sequentially.

		     nonwp     Report Non Write	Pointer	zones, also  known  as
			       Conventional zones.

       -P print_opt  Specify a printing	option for Report Zones:

		     normal   Normal  Report  Zones  output.   This is the de-
			      fault.  The  summary  and	 column	 headings  are
			      printed,	fields are separated by	spaces and the
			      fields themselves	may contain spaces.

		     summary  Just print the summary:  the  number  of	zones,
			      the  maximum  LBA	(LBA of	the last logical block
			      on the drive),  and  the	value  of  the	"same"
			      field.   The  "same" field describes whether the
			      zones on the drive are all identical,  all  dif-
			      ferent,  or whether they are the same except for
			      the last zone, etc.

		     script   Print the	zones in  a  script  friendly  format.
			      The summary and column headings are omitted, the
			      fields  are  separated by	commas,	and the	fields
			      do not contain spaces.  The fields  contain  un-
			      derscores	where spaces would normally be used.

EXAMPLES
	     zonectl -d	/dev/da5 -c params

       Display basic zoning information	for disk da5.

	     zonectl -d	/dev/da5 -c rz

       Issue  the Report Zones command to disk da5, and	print out all zones on
       the drive in the	default	format.

	     zonectl -d	/dev/da5 -c rz -o reset	-P script

       Issue the Report	Zones command to disk da5, and print out  all  of  the
       zones  that  have  the Reset Write Pointer Recommended bit set to true.
       Print the zones in a script friendly form.

	     zonectl -d	/dev/da5 -c rwp	-l 0x2c80000

       Issue the Reset Write Pointer command to	disk da5  for  the  zone  that
       starts at LBA 0x2c80000.

SEE ALSO
       camcontrol(8)

AUTHORS
       Kenneth Merry <ken@FreeBSD.org>

FreeBSD	15.0			 May 18, 2016			    ZONECTL(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=zonectl&sektion=8&manpath=FreeBSD+15.0-RELEASE+and+Ports>

home | help