Pretty sure these drives have DIF turned on by default.. aka drive protection, write protection etc..
For these specific 4k SAS drives I'd run the following:
Code:
sudo sg_format -v -F -f 0 /dev/sdX
* This will NOT change the sector sizes . I recommend keeping 4k size although I see others have success changing
* You can run these in parallel.. e.g. start one in shell then another, format drives in parallel
* Just an FYI - an 8TB drive takes about 12 hrs to format completely
* If you close shell you lose progress.. Easy to see per drive by running:
Code:
sudo sg_format -d -v /dev/sdX
(dry run fake - but will dispaly progress per drive)
* Once complete, power down drive & system - reboot and check:
Code:
sudo fdisk -l /dev/sdX
sudo smartctl -i /dev/sdX
sudo sg_readcap /dev/sdX
Some expansion on the variables:
-v, --verbose
increase the level of verbosity, (i.e. debug output). "-vvv" gives a lot more debug output.
-f, --fmtpinfo=FPI
sets the FMTPINFO field in the FORMAT UNIT cdb to a value between 0 and 3. The default value is 0. The FMTPINFO field from SBC-3 revision 16 is a 2 bit field (bits 7 and 6 of byte 1 in the cdb). Prior to that revision it was a single bit field (bit 7 of byte 1 in the cdb) and there was an accompanying bit called RTO_REQ (bit 6 of byte 1 in the cdb). The deprecated options "--pinfo" and "--rto-req" represent the older usage. This option should be used in their place. See the PROTECTION INFORMATION section below for more information.
-F, --format
issue one of the three SCSI "format" commands. In the absence of the --preset=ID and --tape=FM options, the SCSI FORMAT UNIT command is issued. These commands will destroy all the data held on the media. This option is required to change the block size of a disk. In the absence of the --quick option, the user is given a 15 second count down to ponder the wisdom of doing this, during which time control-C (amongst other Unix commands) can be used to kill this process before it does any damage. When used three times (or more) the preliminary MODE SENSE and SELECT commands are bypassed, leaving only the initial INQUIRY and FORMAT UNIT commands. This is for emergency use (e.g. when the MODE SENSE/SELECT commands are not working) and cannot change the logical block size. See NOTES section for implementation details and EXAMPLES section for typical use.
-d, --dry-run
this option will parse the command line, do all the preparation but bypass the actual FORMAT UNIT, FORMAT WITH PRESET or FORMAT MEDIUM command. Also if the options would otherwise cause the logical block size to change, then the MODE SELECT command that would do that is also bypassed when the dry run option is given.
-e, --early
during a format operation, The default action of this utility is to poll the disk every 60 seconds (or every 10 seconds if FFMTis non-zero) to determine the progress of the format operation until it is finished. When this option is given this utility will exit "early", that is as soon as the format operation has commenced. Then the user can monitor the progress of the ongoing format operation with other utilities (e.g. sg_turs(8)or sg_requests(8)). This option and --waitare mutually exclusive.
-t, --ffmt=FFMT ( DO NOT USE!! - included as a warning for DIF removal, fast format will not work)
FFMT(fast format) is placed in a field of the same name in the FORMAT UNIT cdb. The field was introduced in SBC-4 revision 10. The default value is 0 which implies the former action which is typically to overwrite all blocks on the DEVICE. That can take a long time (e.g. with hard disks over 10 TB in size that can be days). With FFMTset that time may be reduced to minutes or less. So it is worth trying if it is available.
FFMThas values 1 and 2 for fast format with 3 being reserved currently. These two values include this description: "The device server initializes the medium ... without overwriting the medium (i.e. resources for managing medium access are initialized and the medium is not written)". The difference between 1 and 2 concerns read operations on LBAs to which no data has been written to, after the fast format. When FFMTis 1 the read operation should return "unspecified logical block data" and complete without error. When FFMTis 2 the read operation may yield check condition status with a sense key set to hardware error, medium error or command aborted. See draft SBC-4 revision 16 section 4.34 for more details.