Skip to contentSkip to conversation

RAID 1 metadata - keep separate from mirror disks ?

DISCUSSION Suresh Babu Kandukuru 2 participants 5 messages Feb 11, 2015 – Feb 16, 2015 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi There,

On the RAID 1 metadata: is there any way to keep the metadata separate from the mirror disks? Could you guide us on this ?, please. In general, we need to keep all metadata off the device itself, leaving all the device available for user data. This is particularly important in the migration case, where we want to take an existing LUN and add a second leg to it to create the mirror device without changing any of the data or metadata on the LUN.

Thanks
/Suresh

#1 lore raw

Good morning Suresh,

Quoted 9 lines · Suresh Babu Kandukuru

Hi There,

On the RAID 1 metadata: is there any way to keep the metadata separate from the mirror disks? Could you guide us on this ?, please. In general, we need to keep all metadata off the device itself, leaving all the device available for user data. This is particularly important in the migration case, where we want to take an existing LUN and add a second leg to it to create the mirror device without changing any of the data or metadata on the LUN.

If you look at "man 4 md" you'll see some options. If a legacy array type meets your needs, you can operate without metadata at all. Use "mdadm --build" to assemble your raid at each boot.

Or, if your storage server can insert a leg ahead of you current LUN, you can then create the array with an explicit data offset matching the size of the inserted leg. Create it degraded with the existing LUN, then add (a) LUN(s) to start mirroring. This process will leave you the option to resize with more legs later.

Or you can add a leg to the end and create your array with version 1.0 metadata, which is placed at the end of the device.

Finally, you could write your own metadata container service for use with mdmon. (That's a bit beyond my ability, sorry.)

Phil

#2 lore raw

Thanks Phil . This helps.

/Suresh

-----Original Message-----
From: Phil Turmel [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 8:19 PM
To: Suresh Babu Kandukuru; [email protected]
Subject: Re: RAID 1 metadata - keep separate from mirror disks ?

Good morning Suresh,

Quoted 9 lines · Suresh Babu Kandukuru

Hi There,

On the RAID 1 metadata: is there any way to keep the metadata separate from the mirror disks? Could you guide us on this ?, please. In general, we need to keep all metadata off the device itself, leaving all the device available for user data. This is particularly important in the migration case, where we want to take an existing LUN and add a second leg to it to create the mirror device without changing any of the data or metadata on the LUN.

If you look at "man 4 md" you'll see some options. If a legacy array type meets your needs, you can operate without metadata at all. Use "mdadm --build" to assemble your raid at each boot.

Or, if your storage server can insert a leg ahead of you current LUN, you can then create the array with an explicit data offset matching the size of the inserted leg. Create it degraded with the existing LUN, then add (a) LUN(s) to start mirroring. This process will leave you the option to resize with more legs later.

Or you can add a leg to the end and create your array with version 1.0 metadata, which is placed at the end of the device.

Finally, you could write your own metadata container service for use with mdmon. (That's a bit beyond my ability, sorry.)

Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to Phil Turmel

Yeh . Thank Phil . it is quite useful . Now we see there are two options . 1) without metadata 2) externally managed metadata . But we would like to keep the metadata external to mirror leg ( like on host local drive ) for the reasons mentioned below , not the externally managed metadata , just by keeping metadata on mirror legs
. Do we have any option with md driver ?

/Suresh
Principal developer | Hyderabad Team Lead
Phone: +914067246370 | Mobile: +919701451727 Oracle Maxrep development

ORACLE India Hyderabad
Oracle is committed to developing practices and products that help protect the environment

-----Original Message-----
From: Phil Turmel [mailto:[email protected]]
Sent: Wednesday, February 11, 2015 8:19 PM
To: Suresh Babu Kandukuru; [email protected]
Subject: Re: RAID 1 metadata - keep separate from mirror disks ?

Good morning Suresh,

Quoted 9 lines · Suresh Babu Kandukuru

Hi There,

On the RAID 1 metadata: is there any way to keep the metadata separate from the mirror disks? Could you guide us on this ?, please. In general, we need to keep all metadata off the device itself, leaving all the device available for user data. This is particularly important in the migration case, where we want to take an existing LUN and add a second leg to it to create the mirror device without changing any of the data or metadata on the LUN.

If you look at "man 4 md" you'll see some options. If a legacy array type meets your needs, you can operate without metadata at all. Use "mdadm --build" to assemble your raid at each boot.

Or, if your storage server can insert a leg ahead of you current LUN, you can then create the array with an explicit data offset matching the size of the inserted leg. Create it degraded with the existing LUN, then add (a) LUN(s) to start mirroring. This process will leave you the option to resize with more legs later.

Or you can add a leg to the end and create your array with version 1.0 metadata, which is placed at the end of the device.

Finally, you could write your own metadata container service for use with mdmon. (That's a bit beyond my ability, sorry.)

Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Hi Suresh,

Quoted 6 lines · Suresh Babu Kandukuru

Yeh . Thank Phil . it is quite useful . Now we see there are two options . 1) without metadata 2) externally managed metadata . But we would like to keep the metadata external to mirror leg ( like on host local drive ) for the reasons mentioned below , not the externally managed metadata , just by keeping metadata on mirror legs . Do we have any option with md driver ?

I'm not sure I understand your follow-up question. You've restated my answer, and re-iterated your preference to not have metadata on the member devices.

So you need to write a service to handle metadata the way you want. Or write scripts that will do --build operations at appropriate times without metadata.

I'm not entirely clear why the on-member metadata is unacceptable, but as such, either remaining option needs some code of your own.

Phil