Subject: re: expanding a partition
To: None <PORT-MAC68K@NETBSD.ORG>
From: Steve Revilak <revilak@umbsky.cc.umb.edu>
List: port-mac68k
Date: 06/26/1999 13:20:47
"Fischer, Roger" <RFischer@PanAmSat.com> writes:

/I know that the easy think to do would be to create
/a new partition and mount it somewhere underneath
/the /usr tree (like /usr/pkg) or something.  I could
/also throw /var or /tmp onto the additional partition,
/but I'm hoping a little extra work would help later.

/I also have a DAT drive (DDS-1?) that I have not used
/on NetBSD yet.  I could TAR up /usr to DAT, combine
/and reformat my /usr partition, then restore the backup.

Roger,

I did something similiar a while ago.  Instead of moving a partition, I
was simply moving to a larger drive.  I tarred up the root directory
(2 copies), installed the base set on the new drive and then restored.

Colin does a good job of pointing out a big potential gotach...you need
to be able to run tar to put things back!

In terms of using tape drives with NetBSD, mine is an old WangDAT 3200
(DDS-1).  As far as testing yours out, here are a few things you might
try.

First, the drive needs to be connected and powered up when you boot in
order to have the kernel see it.  If you power it on while in NetBSD,
the only way to make it's presence known is by rebooting the machine. 
The device for the tape drive will be /dev/rst0.

Tarring to a tape drive is very similar to tarring to a file.  If you
omit the filename, /dev/rst0 is assumed by default.  For example

	tar -cvf etc.tar /etc
 
Tars /etc in a file called "etc.tar".  To tar to a tape drive:

	tar -cv /etc

Pretty easy, huh?  Now you might try this as an experiment.  Once you've
created the archive, you can verify it by changing the "-c" flag to
"-d", where "d" is for "diff".

If you're curious, this is the command I use for running archive:

	tar -cvP -X /etc/exclude / &

The "c" and "v" are obvious.  "-P" keeps absolute pathnames. (Right now,
I'm considering changing this, though). "-X" is exclude.  /etc/exclude is
a file containing the lines "/proc" and "/kern", since I don't want to
archive those....

tar -xv will extract from a tape.

As far as mt goes is titled "magnetic tape manipulation program".  You
really don't "mount" a tape drive....just read from and write to it.  
Mt does things like rewind, skip forward n blocks, etc.  I've only used
it for rewinding.

Thinking about the problem of getting to the binaries and the shared
libraries...  Rodger mention copying tar and gzip to /bin.  The problem
lies with /usr/lib.

Could Rodger get away with copying /usr/lib to, say his root partition
-- creating the new /usr/ and then copying it back.  Or creating a
symbolic link to it's temporary location, then doing the restore?  (In
which case, the restore should probably be done with the --unlink option
to tar).

Thoughts on this?

=-=-=-=-=-=-=-=-=-=-=-=
Steve Revilak
revilak@umbsky.cc.umb.edu