From owner-freebsd-questions@freebsd.org Sat Feb 16 10:06:05 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 285F214DE116 for ; Sat, 16 Feb 2019 10:06:05 +0000 (UTC) (envelope-from ipluta@wp.pl) Received: from mx3.wp.pl (mx3.wp.pl [212.77.101.10]) (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 C953983CD6 for ; Sat, 16 Feb 2019 10:06:03 +0000 (UTC) (envelope-from ipluta@wp.pl) Received: (wp-smtpd smtp.wp.pl 3822 invoked from network); 16 Feb 2019 10:39:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1550309961; bh=Xj3Cj3WdxokRLBRODGtvu/tHwv//3brDrqkN3b1KUxw=; h=From:To:Subject; b=h4kYUUlG2gMWUJin7mnVfxn19tweXrb/h/1vI20i92m1d5EXCcKUE8iNpLLedDZ0p G/PxpZp2MkmM5nrNA3WoYIpTL/niMLLSf1JnmR67N3Ww7K532iXwBoaI+rOX1O32T4 6Gq5EM+tHcp4NCppnI2sK5wuoEB7JYhLwR4IgOnQ= Received: from 79.184.91.14.ipv4.supernova.orange.pl (HELO [192.168.1.24]) (ipluta@wp.pl@[79.184.91.14]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 16 Feb 2019 10:39:21 +0100 From: Ireneusz Pluta To: "freebsd-questions@freebsd.org" Subject: Sector size change with camcontrol Message-ID: Date: Sat, 16 Feb 2019 10:39:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: pl X-WP-MailID: d34ecad6aae284ec9fed8a1dfb1de23b X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000A [scMU] X-Rspamd-Queue-Id: C953983CD6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=wp.pl header.s=1024a header.b=h4kYUUlG; spf=pass (mx1.freebsd.org: domain of ipluta@wp.pl designates 212.77.101.10 as permitted sender) smtp.mailfrom=ipluta@wp.pl X-Spamd-Result: default: False [-4.01 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:212.77.96.0/19]; FREEMAIL_FROM(0.00)[wp.pl]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[wp.pl:+]; MX_GOOD(-0.01)[mx.wp.pl,mx5.wp.pl]; NEURAL_HAM_SHORT(-0.74)[-0.743,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[wp.pl]; ASN(0.00)[asn:12827, ipnet:212.77.101.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[wp.pl.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[wp.pl:s=1024a]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[wp.pl]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.75)[ipnet: 212.77.101.0/24(-2.11), asn: 12827(-1.69), country: PL(0.03)]; RCVD_IN_DNSWL_NONE(0.00)[10.101.77.212.list.dnswl.org : 127.0.5.0]; TO_DN_EQ_ADDR_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Feb 2019 10:06:05 -0000 Hello, In my new SEAGATE ST900MP0146 drives I want to change sector size from factory default 512E to 4kN. The drive manual (i.e. https://www.seagate.com/www-content/product-content/enterprise-performance-savvio-fam/enterprise-performance-15k-hdd/ent-perf-15k-6/en-us/docs/100827313b.pdf) says how to do it: Mode Select - Parameter list header • Set Write buffer: // Set Block Descriptor Length = 0x08, Number of LBA's = 0xFFFFFFFF • 00 00 00 00 00 00 00 08 FF FF FF FF 00 00 02 00 // Set block size to 0512 (0x0200) • 10 00 // Set block size to 4096 (0x1000) • Then Send Mode Select Command • cdb: 55 01 00 00 00 00 00 00 10 00 // (SP bit = 1, Parameter list = 0x10) Format Unit - Parameter list header • Set Write buffer: // Set IMMED = 1 • 00 02 00 00 • Then Send Format Unit Command • cdb: 04 14 00 00 01 00 // (FMTDAT = 1, DEFECT LIST FORMAT = 010b, FFMT = 01b) Does the above convert to the following two camcontrol cmds? $ camcontrol cmd /dev/da0 -v \      -c '55 01 00 00 00 00 00 00 10 00' \      -o 16 '00 00 00 00 00 00 00 08 FF FF FF FF 00 00 10 00' $ camcontrol cmd /dev/da0 -v \      -c '04 14 00 00 01 00' \      -o 4 '00 02 00 00' Thanks, Irek.