Skip to contentSkip to conversation

mdadm options, and man page

DISCUSSION JaniD++ 2 participants 2 messages Jan 23, 2006 – Jan 24, 2006 MD RAID

lore
Share & tools
lore

JaniD++

author
#0 lore raw

----- Original Message -----
From: "Neil Brown" <[email protected]>
To: "JaniD++" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, January 19, 2006 3:09 AM
Subject: Re: mdadm options, and man page

Quoted 12 lines · On Tuesday January 17, [email protected] wrote:
Quoted 3 lines

Hello, Neil,

Some days before, i read the entire mdadm man page.

Excellent...

Quoted 5 lines

I have some ideas, and questions:

Ideas:
1. i think, it is neccessary, to make another one mode to mdadm like

"nop"

Quoted 5 lines
Quoted 2 lines

or similar, just for bitmaps, and another options, that only works with assemble, and create (or grow) modes.

This sounds like the 'misc' mode. What exactly would you want to do with it?

Example:
I have one raid5 array, without bitmap, on already replaced bigger drives. (for planned growing)
The array is online, dont want to stop, and need to create the bitmap without to do the resizing of array.

Quoted 3 lines
Quoted 3 lines

2. i think the raid5 creation virtual spare drive technique necessary to

be

Quoted 1 line
Quoted 1 line

standalone option, to avoid more people to data lost, with re-creating

the

Quoted 3 lines
Quoted 1 line

raid5 arrays, and who did'nt read carefully the entire man.

I don't see why this could cause loss of data. Can you explain?

One time i almost do that:
One big (2TB) raid5 array, the system crashed. (no bitmap at this time in the array)
After the reboot, the system starts to resync, and don't want to wait until its done, but with high workload and resync is too much work to the system. (Yes, i know it is possible to set the minimum and maximum kb/s in proc...) This time i plan to do that:
Stop the resync, with recreating the array, with --assume-clean, to stop the resyncing.
After the weekend load is gone, recreate the array, with normal parameters, to resync the entire parity infos, and this time if i dont know this exception, i will loose some data!
The raid will overwrite the last disk, from half-clean parity information.

Today, i know it is already exists better options to do that, but some (and possible a lot of) people did not read the entire man page!!!

Quoted 4 lines
Quoted 4 lines

3. i think it will be an usefull thing, set the recovery, resyncing order(eg. from the end of the drive to the beginning) of array, or set

the

Quoted 1 line
Quoted 1 line

"from" and "to" limits for it, or stop, restart(retry) this function, if

it

Quoted 4 lines
Quoted 4 lines

is possible again.
(only experimental, it will be allow very easy to loose data.) This is useful in very big arrays, wich takes some days to resync. Yes, i know this caused to write the bitmap code, but i think the linux

is

Quoted 8 lines
Quoted 2 lines

beautiful because it is very configurable. :-)
... i did not like the automated things, what i cannot controll....

Why would you want to resync from the end to the beginning?

I am looking into make raid1 be usable on a cluster and that would require better control of resyncing, but I'm not sure what exactly it is that you want, or how it would be useful.

Again big arrays...
I guess, you know this feeling, if the N TB array is synced about 95%, and the system crashes again. :-)

1 pass sync the array from 0-95%, than crash, reboot.
2 pass sync the array from 100% to 90%, and marked to be clean by hand. :-)

Additional info:
I use currently 4x 2TB disk nodes, and if i need to repair, change, or sg the nodes, the only way is to riad1 resync with the spare node. On the online system, the 2TB resync between the nodes, takes some days. I am really happy, if the raid1 starts to resync from the beginning, after crash. :-)

Another issue:
The man pages did not contains info about the the spare drive in raid1 and parity on raid4!
I mean wich drive will be the source, and wich the copy on raid1, and wich the parity on raid4.
This is neccessary to avoid data lost on create (build) arrays, on pre existent devices...

Quoted 12 lines
Quoted 7 lines

Questions:
1. it will be possible to set/unset the --write-mostly, --write-behind options online?
(i know, currently not.)

Hmmm... I'll look into that.

Quoted 2 lines

2. it will be possible to create a bitmap in raid5 when it is resyncing,

or

Quoted 4 lines
Quoted 1 line

recovering?

No. You new to either wait for the resync/recovery to complete, or abort it.

Anyway, i have other questions about bitmap and resync, but on another mail.... (if i have time to write...)

Quoted 3 lines
Quoted 3 lines

3. it is possible to set unset the clean state of the array online?

(useful

Quoted 5 lines
Quoted 1 line

for idea #3)

There are some new attributes in /sys/block/mdX/md/ which might be of interest.
Read through Documentation/md.txt in 2.5.16-rc1.

Thanks, i will read it.

Quoted 5 lines
Quoted 5 lines

4. why the md did not support raid4,5 with non-persistent superblock? I think the non-persistent superblock raid4 is very useful thing to easy upgrade (protect) from one big legacy raid0 array to raid4 with an

existing

Quoted 8 lines
Quoted 2 lines

data! :-)
At this time i need it too. :-)

You need metadata (superblock) to be able to track failure and rebuilds and such. Even raid1 with non-persistent superblock is something you have to be careful with. You wouldn't use it for a long-lived array, only to copy data from one place to another but still have the data live.

Yes, the raid1 without superblock is the best way, to replace one (good, but slow) disk in big raid5 array "almost" online.
Ahh, another idea! :-)

To do this, i need to stop the array, create the zero superblock raid1 on slow disk, and assemble the raid5 with new md device.
I think it is neccessary to be one (or more) standalone option in mdadm, to do that online, without stop, and assemble again. :-)

Thanks, for the answers!

Cheers,
Janos

Quoted 8 lines

Hope that helps,

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

#1 lore raw
Quoted 25 lines · On Monday January 23, [email protected] wrote:

----- Original Message -----
From: "Neil Brown" <[email protected]>
To: "JaniD++" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, January 19, 2006 3:09 AM
Subject: Re: mdadm options, and man page

Quoted 12 lines · On Tuesday January 17, [email protected] wrote:
Quoted 3 lines

Hello, Neil,

Some days before, i read the entire mdadm man page.

Excellent...

Quoted 5 lines

I have some ideas, and questions:

Ideas:
1. i think, it is neccessary, to make another one mode to mdadm like

"nop"

Quoted 3 lines
Quoted 2 lines

or similar, just for bitmaps, and another options, that only works with assemble, and create (or grow) modes.

Quoted 8 lines
Quoted 2 lines

This sounds like the 'misc' mode. What exactly would you want to do with it?

Example:
I have one raid5 array, without bitmap, on already replaced bigger drives. (for planned growing)
The array is online, dont want to stop, and need to create the bitmap without to do the resizing of array.

'--grow' doesn't always change the size of an array. It can also 'grow' the amount of redundancy, or 'grow' a bitmap in an array... Possibly a confusing name choice, but it worked for me... Anyway, to add a bitmap to an active array you can e.g.:

   mdadm --grow /dev/mdX --bitmap=internal

This will not change the size of the array, just add a bitmap. The 'size' will only change if you ask it to, e.g.
mdadm --grow /dev/mdX --size=max

Quoted 11 lines
Quoted 4 lines
Quoted 4 lines

2. i think the raid5 creation virtual spare drive technique necessary to

be

Quoted 1 line
Quoted 1 line

standalone option, to avoid more people to data lost, with re-creating

the

Quoted 3 lines
Quoted 1 line

raid5 arrays, and who did'nt read carefully the entire man.

I don't see why this could cause loss of data. Can you explain?

Quoted 14 lines

One time i almost do that:
One big (2TB) raid5 array, the system crashed. (no bitmap at this time in the array)
After the reboot, the system starts to resync, and don't want to wait until its done, but with high workload and resync is too much work to the system. (Yes, i know it is possible to set the minimum and maximum kb/s in proc...) This time i plan to do that:
Stop the resync, with recreating the array, with --assume-clean, to stop the resyncing.
After the weekend load is gone, recreate the array, with normal parameters, to resync the entire parity infos, and this time if i dont know this exception, i will loose some data!
The raid will overwrite the last disk, from half-clean parity information.

Hmmm.... I see you point, but I don't find it very convincing. People who try to do something like what you did without reading "the spots off" the documentation are asking for trouble.... and you really should have just set the 'min' resync speed down to near-zero.

Quoted 21 lines
Quoted 4 lines
Quoted 4 lines

3. i think it will be an usefull thing, set the recovery, resyncing order(eg. from the end of the drive to the beginning) of array, or set

the

Quoted 1 line
Quoted 1 line

"from" and "to" limits for it, or stop, restart(retry) this function, if

it

Quoted 4 lines
Quoted 4 lines

is possible again.
(only experimental, it will be allow very easy to loose data.) This is useful in very big arrays, wich takes some days to resync. Yes, i know this caused to write the bitmap code, but i think the linux

is

Quoted 8 lines
Quoted 2 lines

beautiful because it is very configurable. :-)
... i did not like the automated things, what i cannot controll....

Why would you want to resync from the end to the beginning?

I am looking into make raid1 be usable on a cluster and that would require better control of resyncing, but I'm not sure what exactly it is that you want, or how it would be useful.

Quoted 7 lines

Again big arrays...
I guess, you know this feeling, if the N TB array is synced about 95%, and the system crashes again. :-)

1 pass sync the array from 0-95%, than crash, reboot.
2 pass sync the array from 100% to 90%, and marked to be clean by hand. :-)

This would be a very silly thing to do. I wouldn't want to encourage it.

Quoted 8 lines

Additional info:
I use currently 4x 2TB disk nodes, and if i need to repair, change, or sg the nodes, the only way is to riad1 resync with the spare node. On the online system, the 2TB resync between the nodes, takes some days. I am really happy, if the raid1 starts to resync from the beginning, after crash. :-)

Quoted 7 lines

Another issue:
The man pages did not contains info about the the spare drive in raid1 and parity on raid4!
I mean wich drive will be the source, and wich the copy on raid1, and wich the parity on raid4.
This is neccessary to avoid data lost on create (build) arrays, on pre existent devices...

raid4: The last drive is the parity drive. Yes, it isn't documented.

raid1: people keep asking this question, but it really is a non-question. You really don't need to know the answer. If you are creating a raid1 array using a drive with known-good data, you create a degraded array with just that drive and all other slots 'missing'. Then you hot-add the drives that you want data to be copied on to. If you do it this way, there is no way it could matter which device is used as the source for resync, as you never do a resync, only a recovery.

NeilBrown