Disable background scan on SAS drive

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
Hi All,

I have some seagate sas drive that I want to disable the disk's "background scan" as ZFS does what I want. In one host I see 24 drives with this feature on and 24 with it off. I would rather have it off.

In Linux:
# view the current values for the background media settings
sdparm /dev/sdb -p bc

# enable Background Media scans - set to 0 to disable
sdparm /dev/sdb -p bc -s EN_BMS=1

# number of hours between media scans - here, run a scan every 24 hours
sdparm /dev/sdb -p bc -s BMS_I=24

# how many milliseconds the drive must be idle before a scan can begin
# here, the drive must be idle for two second at time of scan start,
# or else the scan will wait until the drive is idle for 2000ms.
# the same applies if scan is interrupted for user activity - scan resumes when
# this period of time has elapsed with no activity.
sdparm /dev/sdb -p bc -s MIN_IDLE=2000

# how many milliseconds the drive is permitted to take to return to regular service
# if a command is received during a background media scan - here, the drive must
# stop the BMS within 500ms of receiving a read/write command from the host
sdparm /dev/sdb -p bc -s MAX_SUSP=500

Thanks,
Joe
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
On FreeBSD see `camcontrol mode da0 -ll`, `camcontrol mode da0 -m 0x1c,0x01`, etc.
 

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
Hi Mav,

Is there a place that has more documentation for storage guys using camcontrol?

is 0x1c always the location for the option to disable background scanning or could it be different for different vendors drives or firmware versions?

Thanks,
Joe
 

mav@

iXsystems
iXsystems
Joined
Sep 29, 2011
Messages
1,428
SCSI mode pages are standardized in respective specs (SPC, SBC, etc). Sure there can be some vendor specific, but the above are standard.
 
Top