Change Chunk Size on Array?
Hello All,
I wanted to know if it were possible to change the chunk size on an array after it has been created. I have a software raid 5 comprised of 7 drives with a chunk size of 64k. I wanted to up that to 1024k, would this be possible without losing any data? This isn't mission critical so it is ok if i need to stop the array first, however I'd rather not lose any data.
Signature · 2 lines
View this message in context: http://www.nabble.com/Change-Chunk-Size-on-Array--tp16137381p16137381.html Sent from the linux-raid mailing list archive at Nabble.com.
Quoted 12 lines · crshman
Hello All,
I wanted to know if it were possible to change the chunk size on an array
after it has been created. I have a software raid 5 comprised of 7 drives
with a chunk size of 64k. I wanted to up that to 1024k, would this be
possible without losing any data? This isn't mission critical so it is ok if
i need to stop the array first, however I'd rather not lose any data.
--
View this message in context: http://www.nabble.com/Change-Chunk-Size-on-Array--tp16137381p16137381.html
Sent from the linux-raid mailing list archive at Nabble.com.
Quoted 5 lines
--
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
You need to re-create the array.
Justin.
Quoted 9 lines · crshman
Hello All,
I wanted to know if it were possible to change the chunk size on an array after it has been created. I have a software raid 5 comprised of 7 drives with a chunk size of 64k. I wanted to up that to 1024k, would this be possible without losing any data? This isn't mission critical so it is ok if i need to stop the array first, however I'd rather not lose any data.
It is possible to change the chunksize but for the same you would need to offline your array.
Signature · 2 lines
View this message in context: http://www.nabble.com/Change-Chunk-Size-on-Array--tp16137381p23514897.html Sent from the linux-raid mailing list archive at Nabble.com.
Quoted 7 lines · On Tuesday May 12, [email protected] wrote:
Quoted 3 lines · crshman
Hello All,
Quoted 8 lines
Quoted 6 lines
I wanted to know if it were possible to change the chunk size on an array after it has been created. I have a software raid 5 comprised of 7 drives with a chunk size of 64k. I wanted to up that to 1024k, would this be possible without losing any data? This isn't mission critical so it is ok if i need to stop the array first, however I'd rather not lose any data.
It is possible to change the chunksize but for the same you would need to offline your array.
Is it? How?
Online changing of chunk size for raid5 is very close to being implemented.
All the kernel side support will be in 2.6.30.
I just need to spend some time getting mdadm to make it work. Because data is being rearranged in-place, and because you don't want to lose everything if your systems crashes, mdadm will have to work in tandem with the kernel making a backup copy of a section of the array, allowing the kernel to reshape that section, and then moving on to the next section. It will be slow, but it will be reliable.
NeilBrown
Quoted 14 lines · Neil Brown
Quoted 13 lines · On Tuesday May 12, [email protected] wrote:
Quoted 9 lines · crshman
Hello All,
I wanted to know if it were possible to change the chunk size on an array after it has been created. I have a software raid 5 comprised of 7 drives with a chunk size of 64k. I wanted to up that to 1024k, would this be possible without losing any data? This isn't mission critical so it is ok if i need to stop the array first, however I'd rather not lose any data.
Quoted 5 lines
Quoted 2 lines
It is possible to change the chunksize but for the same you would need to offline your array.
Is it? How?
That was all that I could read from" RAID on Linux" by Derek Vadala, Page 118.
It mentions that this could be achieved by offlining the array and using "raidreconf".
He also mention chances of data loss and also the caveats of "raidreconf".
Quoted 12 lines
Online changing of chunk size for raid5 is very close to being implemented.
All the kernel side support will be in 2.6.30.
I just need to spend some time getting mdadm to make it work. Because data is being rearranged in-place, and because you don't want to lose everything if your systems crashes, mdadm will have to work in tandem with the kernel making a backup copy of a section of the array, allowing the kernel to reshape that section, and then moving on to the next section. It will be slow, but it will be reliable.NeilBrown
Signature · 13 lines
Regards, Sandeep. “To learn is to change. Education is a process that changes the learner.” -- 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
Quoted 11 lines · Neil Brown
Online changing of chunk size for raid5 is very close to being implemented.
All the kernel side support will be in 2.6.30.
I just need to spend some time getting mdadm to make it work. Because data is being rearranged in-place, and because you don't want to lose everything if your systems crashes, mdadm will have to work in tandem with the kernel making a backup copy of a section of the array, allowing the kernel to reshape that section, and then moving on to the next section. It will be slow, but it will be reliable.NeilBrown
Shouldn't mdadm create a file and pass the FD to the kernel or a loopback device and pass the major/minor and the kernel then moves data there itself? Seems like a bad idea to pass all the data of the raid to userspace just so it can be passed back to the kernel again.
MfG
Goswin
Quoted 12 lines · On Wednesday May 13, [email protected] wrote:
Quoted 10 lines · Neil Brown
Online changing of chunk size for raid5 is very close to being implemented.
All the kernel side support will be in 2.6.30.
I just need to spend some time getting mdadm to make it work. Because data is being rearranged in-place, and because you don't want to lose everything if your systems crashes, mdadm will have to work in tandem with the kernel making a backup copy of a section of the array, allowing the kernel to reshape that section, and then moving on to the next section. It will be slow, but it will be reliable.
Quoted 6 lines
Quoted 1 line
NeilBrown
Shouldn't mdadm create a file and pass the FD to the kernel or a loopback device and pass the major/minor and the kernel then moves data there itself? Seems like a bad idea to pass all the data of the raid to userspace just so it can be passed back to the kernel again.
The data doesn't really have to go to user-space.
If we use mmap instead of read, and pass the mmapped buffer to write, then the data just lives in kernel buffers (I think) - it never gets faulted in to the address space.
I want to keep the functionality in the kernel to a minimum and do any fiddly bits in user-space. I think keeping that back - and restoring from it in the event of a crash - is definitely a fiddly bit that does not belong in the kernel.
NeilBrown