Subject: Re: extending a ccd partition
To: None <port-i386@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 12/16/2002 11:46:51
>>> Maybe it's a silly question, but is it possible to add one or more
>>> disks to a ccd partition without damaging its existing files?
>> Yes it is.
> So, how would one do it?

If the ccd is concatenated, it's just the usual "grow a filesystem into
a larger partition" issue, which fsresize should be able to handle.

If it's striped, it's harder.  This is because you have, for example,

part	effective chunk numbers (ie, in units of the interleave size)

1	 0  3  6  9 12 15 18 21 24 27 30 ...
2	 1  4  7 10 13 16 19 22 25 28 31 ...
3	 2  5  8 11 14 17 20 23 26 29 32 ...

and you need to turn it into

1	 0  4  8 12 16 20 24 28 32 ...
2	 1  5  9 13 17 21 25 29 33 ...
3	 2  6 10 14 18 22 26 30 34 ...
4	 3  7 11 15 19 23 27 31 35 ...

This involves moving (almost) all the blocks.  Lots of data copying, no
way around it.

Once you've done that, and you have the new, larger, ccd, then it just
becomes the "grow the filesystem" issue again.

>> For a striped ccd, you'd need to work out what blocks need to go
>> where to preserve the virtual disk's contents, and move them.  I
>> don't know of any extant tool which does that, but you said
>> "possible", and it's certainly possible to build one.
> OK, I'll forget that for the time being, although I'd like to know
> how to go about writing such a program.

Well, the above outlines what you need to do.  It's just a SMOP to
actually write it.

I don't know enough about IDE to say much about the other issue.
mail-index.netbsd.org seems to be dead to the world at the moment
(traceroutes get to 192.5.4.248 and no farther), so I can't check
context for the message you cite.  Guessing based solely on the excerpt
you quoted, I would say that the (non-)concurrency referred to is per
IDE chain, or perhaps per controller, but that is just a guess by
someone who doesn't really know much about it.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B