Subject: Re: can a partition be expanded?
To: John Valdes <j-valdes@uchicago.edu>
From: Frederick Bruckman <fb@enteract.com>
List: port-mac68k
Date: 06/28/1999 13:29:19
On Sun, 27 Jun 1999, John Valdes wrote:

> Frederick Bruckman writes:
> > 	dump -0uB 4096000 / /usr /var /home
> > 
> > does the same thing.
> 
> Does that create a single dump image containing all four filesystems,
> or four individual dump images (ie, are there filemarks on tape
> between the dumps for each fs)?

It does make the filemarks. You can usr 'restore -i -s N' after
rewinding and see that there's only one partition per "file".

> Hmm... it depends on your tape drive, but most tape drives (the
> Exabyte 8200 being an exception, I believe) can space forward (and
> backward) between file marks quickly.  So to restore /home, one can
> quickly fast forward to the 4 file (from the beginning of tape,
> 'restore -s 4 -r' or 'mt fsf 3 ; restore -r') w/o having to read the
> previous dump images.

Ah. I'd only noticed that restoring a few files takes nearly as long
as backup up a whole volume. Since I only put a small partition or two
near the beginning, I wouldn't notice any savings from skipping ahead
to the filemarks, whether it did that or not.

> > Um... No. "disklabel -r ..." writes a disklabel, but the kernel never
> > reads it.
> 
> If one has a disk used only by NetBSD, does this mean that it still
> has to be partitioned w/ a MacOS disk utility?

Yeah, basically. The partition map actually has a reasonably simple
format, but I don't know that anyone's created a tool to construct one
from within NetBSD, yet. (Well, except for "dd" on an identical disk.)
One "Gotcha" is that if you increase the count field in the first
sector-sized "metamap" entry to a number greater than the actual
number of valid sector-sized entries, MacOS will never boot with that
drive attached! Another is that I'm not sure what happens if you
create a partition map without any MacOS driver. Of course you can
boot with no map and no driver, otherwise you couldn't very well
format disks, but a map with no driver? Don't know. Of course, there
are no open source Mac disk drivers.

Just for fun, you can look at your partition map with "dd" and
"strings" or "hexdump". It's in the first few sectors of the raw
partiton (rsdNc). Sector 1 has the metamap, the following sectors are
the actual partition maps, one per sector. Any BSD label you write
goes in Sector 0, after the mode pages.