Skip to contentSkip to conversation

How do I set 'write-behind' on existing array?

DISCUSSION Hans Kraus 2 participants 2 messages Oct 20, 2014 MD RAID

lore
Share & tools
lore

Hans Kraus

author
#0 lore raw

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

Quoted 1 line

/home/kraush/work/mdadm/mdadm< is the latest mdadm version from git.

I tried:
-----------------------------------------------------------------------

root@elefant:/home/kraush/work/mdadm/mdadm# ./mdadm --manage --write-behind=4096 /dev/md4
mdadm: :option --write-behind not valid in manage mode
root@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

#1 lore raw
Quoted 9 lines · On Mon, 20 Oct 2014 14:33:31 +0200 Hans Kraus <[email protected]> wrote:

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

Quoted 1 line

/home/kraush/work/mdadm/mdadm< is the latest mdadm version from git.

I tried:
-----------------------------------------------------------------------

Quoted 9 lines
root@elefant:/home/kraush/work/mdadm/mdadm# ./mdadm --manage 
--write-behind=4096 /dev/md4
mdadm: :option --write-behind not valid in manage mode
root@elefant:/home/kraush/work/mdadm/mdadm# ./mdadm --grow 
--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