From nobody Wed Aug 04 19:26:29 2021 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3D1BF137BE0F for ; Wed, 4 Aug 2021 19:26:38 +0000 (UTC) (envelope-from mchouque@thi.eu.com) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gg1vL0CCdz4q30 for ; Wed, 4 Aug 2021 19:26:37 +0000 (UTC) (envelope-from mchouque@thi.eu.com) Received: (Authenticated sender: m@thi.eu.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 1BA8D60005; Wed, 4 Aug 2021 19:26:29 +0000 (UTC) Received: by weirdfishes.localdomain (Postfix, from userid 1000) id B9C907203B9D5; Wed, 4 Aug 2021 21:26:29 +0200 (CEST) Date: Wed, 4 Aug 2021 21:26:29 +0200 From: Mathieu Chouquet-Stringer To: joe mcguckin Cc: freebsd-fs Subject: Re: SATA/SAS commands Message-ID: References: <53137D89-3405-4F2D-AE6A-46AC665F52F9@via.net> List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <53137D89-3405-4F2D-AE6A-46AC665F52F9@via.net> X-Face: %JOeya=Dg!}[/#Go&*&cQ+)){p1c8}u\Fg2Q3&)kothIq|JnWoVzJtCFo~4X 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 --