linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Should nossd mount option be used for an HDD detected as non-rotational?
@ 2019-07-13  9:22 R. Schwartz
  2019-07-13 11:06 ` Andrei Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: R. Schwartz @ 2019-07-13  9:22 UTC (permalink / raw)
  To: linux-btrfs

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?
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Should nossd mount option be used for an HDD detected as non-rotational?
  2019-07-13  9:22 Should nossd mount option be used for an HDD detected as non-rotational? R. Schwartz
@ 2019-07-13 11:06 ` Andrei Borzenkov
  2019-07-13 11:18   ` R. Schwartz
  0 siblings, 1 reply; 3+ messages in thread
From: Andrei Borzenkov @ 2019-07-13 11:06 UTC (permalink / raw)
  To: R. Schwartz, linux-btrfs

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.
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Should nossd mount option be used for an HDD detected as non-rotational?
  2019-07-13 11:06 ` Andrei Borzenkov
@ 2019-07-13 11:18   ` R. Schwartz
  0 siblings, 0 replies; 3+ messages in thread
From: R. Schwartz @ 2019-07-13 11:18 UTC (permalink / raw)
  To: Andrei Borzenkov; +Cc: linux-btrfs

On Saturday, July 13, 2019 11:06 AM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>
> 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?

Block device characteristics VPD page (SBC):
  Non-rotating medium (e.g. solid state)
  Product type: Not specified
  WABEREQ=0
  WACEREQ=0
  Nominal form factor: 2.5 inch
  ZONED=0
  RBWZ=0
  BOCS=0
  FUAB=0
  VBULS=0
  DEPOPULATION_TIME=0 (seconds)

Hmm, it also says 2.5 inch while it's a 3.5 inch drive.
Could be the connector though, methinks.

(Sorry, resent adding CC: ML)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-13 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-13  9:22 Should nossd mount option be used for an HDD detected as non-rotational? R. Schwartz
2019-07-13 11:06 ` Andrei Borzenkov
2019-07-13 11:18   ` R. Schwartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).