All of lore.kernel.org
 help / color / mirror / Atom feed
* Change Chunk Size on Array?
@ 2008-03-19  5:29 crshman
  2008-03-20  8:16 ` Justin Piszcz
  2009-05-13  3:44 ` SandeepKsinha
  0 siblings, 2 replies; 7+ messages in thread
From: crshman @ 2008-03-19  5:29 UTC (permalink / raw)
  To: linux-raid


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Change Chunk Size on Array?
  2008-03-19  5:29 Change Chunk Size on Array? crshman
@ 2008-03-20  8:16 ` Justin Piszcz
  2009-05-13  3:44 ` SandeepKsinha
  1 sibling, 0 replies; 7+ messages in thread
From: Justin Piszcz @ 2008-03-20  8:16 UTC (permalink / raw)
  To: crshman; +Cc: linux-raid



On Wed, 19 Mar 2008, crshman wrote:

>
> 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.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

You need to re-create the array.

Justin.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Change Chunk Size on Array?
  2008-03-19  5:29 Change Chunk Size on Array? crshman
  2008-03-20  8:16 ` Justin Piszcz
@ 2009-05-13  3:44 ` SandeepKsinha
  2009-05-13  4:45   ` Neil Brown
  1 sibling, 1 reply; 7+ messages in thread
From: SandeepKsinha @ 2009-05-13  3:44 UTC (permalink / raw)
  To: linux-raid




crshman wrote:
> 
> 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.
-- 
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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Change Chunk Size on Array?
  2009-05-13  3:44 ` SandeepKsinha
@ 2009-05-13  4:45   ` Neil Brown
  2009-05-13  4:53     ` SandeepKsinha
  2009-05-13  7:33     ` Goswin von Brederlow
  0 siblings, 2 replies; 7+ messages in thread
From: Neil Brown @ 2009-05-13  4:45 UTC (permalink / raw)
  To: SandeepKsinha; +Cc: linux-raid

On Tuesday May 12, sandeepksinha@gmail.com wrote:
> 
> 
> 
> crshman wrote:
> > 
> > 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.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Change Chunk Size on Array?
  2009-05-13  4:45   ` Neil Brown
@ 2009-05-13  4:53     ` SandeepKsinha
  2009-05-13  7:33     ` Goswin von Brederlow
  1 sibling, 0 replies; 7+ messages in thread
From: SandeepKsinha @ 2009-05-13  4:53 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

On Wed, May 13, 2009 at 10:15 AM, Neil Brown <neilb@suse.de> wrote:
> On Tuesday May 12, sandeepksinha@gmail.com wrote:
>>
>>
>>
>> crshman wrote:
>> >
>> > 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.
>
> 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".


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



-- 
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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Change Chunk Size on Array?
  2009-05-13  4:45   ` Neil Brown
  2009-05-13  4:53     ` SandeepKsinha
@ 2009-05-13  7:33     ` Goswin von Brederlow
  2009-05-13 10:49       ` Neil Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Goswin von Brederlow @ 2009-05-13  7:33 UTC (permalink / raw)
  To: Neil Brown; +Cc: SandeepKsinha, linux-raid

Neil Brown <neilb@suse.de> writes:

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Change Chunk Size on Array?
  2009-05-13  7:33     ` Goswin von Brederlow
@ 2009-05-13 10:49       ` Neil Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Brown @ 2009-05-13 10:49 UTC (permalink / raw)
  To: Goswin von Brederlow; +Cc: SandeepKsinha, linux-raid

On Wednesday May 13, goswin-v-b@web.de wrote:
> Neil Brown <neilb@suse.de> writes:
> 
> > 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.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-05-13 10:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-19  5:29 Change Chunk Size on Array? crshman
2008-03-20  8:16 ` Justin Piszcz
2009-05-13  3:44 ` SandeepKsinha
2009-05-13  4:45   ` Neil Brown
2009-05-13  4:53     ` SandeepKsinha
2009-05-13  7:33     ` Goswin von Brederlow
2009-05-13 10:49       ` Neil Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.