Discussion:
How do I set 'write-behind' on existing array?
Hans Kraus
2014-10-20 12:33:31 UTC
Permalink
Hi,

I want to expand an existing root array with an SSD. For that purpose I
try to set firstly 'write-behind' on that array. Afterwards I will add
the SSD, remove the HDs and re-add them with 'write-mostly'. On that
array is the root filesystem, therefore stopping is no option. In
/home/kraush/work/mdadm/mdadm< is the latest mdadm version from git.
I tried:
-----------------------------------------------------------------------
***@elefant:/home/kraush/work/mdadm/mdadm# ./mdadm --manage
--write-behind=4096 /dev/md4
mdadm: :option --write-behind not valid in manage mode
***@elefant:/home/kraush/work/mdadm/mdadm# ./mdadm --grow
--write-behind=4096 /dev/md4
mdadm: no changes to --grow
-----------------------------------------------------------------------
What is the correct syntax?

Regards, Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
NeilBrown
2014-10-20 21:14:29 UTC
Permalink
Post by Hans Kraus
Hi,
I want to expand an existing root array with an SSD. For that purpose I
try to set firstly 'write-behind' on that array. Afterwards I will add
the SSD, remove the HDs and re-add them with 'write-mostly'. On that
array is the root filesystem, therefore stopping is no option. In
/home/kraush/work/mdadm/mdadm< is the latest mdadm version from git.
-----------------------------------------------------------------------
--write-behind=4096 /dev/md4
mdadm: :option --write-behind not valid in manage mode
--write-behind=4096 /dev/md4
mdadm: no changes to --grow
-----------------------------------------------------------------------
What is the correct syntax?
Not quite.

"write-behind" is a property of the bitmap.
To enable write-behind on an array you first need to remove the bitmap if
there is one
mdadm /dev/md4 --grow --bitmap=none
then add a new bitmap with the required property
mdadm /dev/md4 --grow --bitmap=internal --write-behind=4096

NeilBrown

Loading...