Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 2021 21:26:29 +0200
From:      Mathieu Chouquet-Stringer <me+freebsd@mathieu.digital>
To:        joe mcguckin <joe@via.net>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: SATA/SAS commands
Message-ID:  <YQrp5a0VrtPyawsF@weirdfishes>
In-Reply-To: <53137D89-3405-4F2D-AE6A-46AC665F52F9@via.net>
References:  <53137D89-3405-4F2D-AE6A-46AC665F52F9@via.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello Joe,

On Wed, Aug 04, 2021 at 12:10:00PM -0700, joe mcguckin wrote:
> Is there a tool that allows sending bare scsi commands to a drive? For
> example, if I wanted to activate the drive’s erase or format  feature
> or pull logs, etc.
> Or, is there something close enough that I could modify?

smartctl is your friend for logs and so on. Package sg3_utils is what
you'd want to erase and so on as it provides a bunch of tools.

For instance, here's what I used to reformat HDD from a Netapp appliance
to 512 bytes sector size:
sg_format --format --size=512 /dev/somedrive

-- 
Mathieu Chouquet-Stringer                        me+freebsd@mathieu.digital
            The sun itself sees not till heaven clears.
	             -- William Shakespeare --



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQrp5a0VrtPyawsF>