Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: "R. Schwartz" <schwrtz@protonmail.ch>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Should nossd mount option be used for an HDD detected as non-rotational?
Date: Sat, 13 Jul 2019 14:06:47 +0300
Message-ID: <9c872fcc-18a2-0936-f950-f1a74806da73@gmail.com> (raw)
In-Reply-To: <htetrjLP1jLMK9WTasfT2e5ZdkY1yV0iY3PHjVEDqCKIZ8d2VwdRTBRezsUAxzKawi_lsxBi5HYfOlvyByGPBwswTCKXSt_lbhRCAmQZ2Qg=@protonmail.ch>

13.07.2019 12:22, R. Schwartz пишет:
> My HDD (one partition, BTRFS) reports itself as non-rational:
> 
>     $ cat /sys/class/block/sda/queue/rotational
>     0
> 
> According to btrfs(5), by default, BTRFS detects this value and turns on
> SSD optimizations for the HDD. Naturally, I'm puzzled...
> 
> My question is: should I use the nossd mount option for the HDD?
> 
> Following is more details about this HDD.
> 
> It's a recent Western Digital Blue 2TB HDD, model WD20EZAZ. Given its
> cache size is a rather large 256MB, some people say it's likely an SMR
> (shingled magnetic record) HDD.
> 
> Since Host-Managed and Host-Aware SMR HDDs support the `REPORT_ZONES`
> ATA/SCSI command, I ran this test using `sg3_utils`:
> 
>     # sg_rep_zones -R /dev/sda
>     Report zones command not supported
>     sg_rep_zones failed: Illegal request, Invalid opcode
> 
> Therefore, _if_ it's SMR, it must be Drive-Managed SMR.
> 
> So is there a good reason why the HDD reports itself as non-rotational?

kernel sets non-rotational flag according to Medium Rotation Rate field
in Block Device Characteristics VPD page (0xb1). What

sg_vpd -p bdc /dev/xxx

says?

> Does it have to do with SMR?
> 
> Additioanlly, the HDD is connected through a SATA to USB connector. I
> original suspected it was an issue with the connector, but I tested with
> other HDDs with the same connector and they all report as rotational.
> 


  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13  9:22 R. Schwartz
2019-07-13 11:06 ` Andrei Borzenkov [this message]
2019-07-13 11:18   ` R. Schwartz

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c872fcc-18a2-0936-f950-f1a74806da73@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=schwrtz@protonmail.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org linux-btrfs@archiver.kernel.org
	public-inbox-index linux-btrfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox