linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Victor Garcia <vichor@gmail.com>
To: linux-raid@vger.kernel.org
Subject: Write mostly flag
Date: Sun, 1 Jan 2017 07:37:25 +0000	[thread overview]
Message-ID: <CACUwJN1tPMv6KcL+zASxcMWs6GXVT1jdbOYNOun9ADEYC_Mh2A@mail.gmail.com> (raw)

Hello all

I am trying to set up a raid 1 array using an SSD and a standard SAT
HDD drives. As I read, it's better to set the write-mostly flag to the
HDD partition of the array to keep SSD performance times.

This is the command I'm using:

# mdadm --create /dev/md1 -n 2 -l 1 --metadata=0.90 --bitmap=internal
/dev/nvme0n1p5 -W /dev/sda8 --write-behind

I expect seeing the (W) indicator in mdstat, but this is not showing:

# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda8[1] nvme0n1p5[0]
      52400064 blocks [2/2] [UU]
      [>....................]  resync =  0.3% (175936/52400064)
finish=9.8min speed=87968K/sec

unused devices: <none>

 But if I force later on the flag by means of the sys FS handle, then
it does appear:

# cat /sys/block/md1/md/dev-sda8/state
in_sync
# echo writemostly > /sys/block/md1/md/dev-sda8/state
# cat /sys/block/md1/md/dev-sda8/state
in_sync,write_mostly
# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda8[1](W) nvme0n1p5[0]
      52400064 blocks [2/2] [UU]
      [==>..................]  resync = 11.0% (5806336/52400064)
finish=9.8min speed=78966K/sec
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>

How is it that the (W) is not showing in the first place?

BTW, this is the system being used:

# uname -a
Linux ubuntu 4.8.0-22-generic #24-Ubuntu SMP Sat Oct 8 09:15:00 UTC
2016 x86_64 x86_64 x86_64 GNU/Linu

Thanks and regards
Victor

             reply	other threads:[~2017-01-01  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-01  7:37 Victor Garcia [this message]
2017-01-03  9:38 ` Write mostly flag Guoqing Jiang

Reply instructions:

You may reply publicly 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=CACUwJN1tPMv6KcL+zASxcMWs6GXVT1jdbOYNOun9ADEYC_Mh2A@mail.gmail.com \
    --to=vichor@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).