weirdbigmoveproblem

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: Moving /home from sda5 to sdb1
From: "Steve \"Stevers!\" Coile" <scoile@redhat.com>
Date: Mon, 7 Jun 1999 17:23:16 -0400 (EDT)


On Mon, 7 Jun 1999, Steve Borho wrote:
> mke2fs /dev/sdb1    # you did this already
> mount /dev/sdb1 /mnt
> cd /home
> find . -depth -print | cpio -pamd /mnt
> # go get a cup of coffee
> du /home ; du /mnt  # these two numbers should be similar
> umount /mnt
> mv /home /home.old
> mkdir /home
> echo "/dev/sdb1 /home ext2 defaults 1 0" >> /etc/fstab
> mount /home         # verify everything is ok now
> rm -rf /home.old

Preface the entire procedure with:

	exec telinit 1

to change to run-level one (single-user mode).

Also make sure to remove the original entry for /home in /etc/fstab
after everything is done.

Don't "rm -rf /home/old" until you're *sure* everything went okay.
I generally leave it around for at least several days.

===

Subject: Re: Moving /home from sda5 to sdb1
From: Steve Borho <sborho@ststech.com>
Date: Mon, 7 Jun 1999 16:09:03 -0500


On Mon, Jun 07, 1999 at 01:59:15PM -0700, Ron Farrer wrote:
> Hello,
> 
> I have a 2GB drive that is about 70% full and decided to add another
> one. So I now have two 2GB drives (SCSI-2, BTW). The second drive is
> installed and working fine (created one primary partition using the
> whole drive starting at 32 and ending at 4196351 and formatted it ext2).
> I would now like to move /home (and all sub dirs) from the primary
> partition on the first drive - sda5 to sdb1. Can anyone provide me with
> a step by step guide on how to do this?

mke2fs /dev/sdb1    # you did this already

mount /dev/sdb1 /mnt
cd /home
find . -depth -print | cpio -pamd /mnt
# go get a cup of coffee
du /home ; du /mnt  # these two numbers should be similar
umount /mnt
mv /home /home.old
mkdir /home
echo "/dev/sdb1 /home ext2 defaults 1 0" >> /etc/fstab
mount /home         # verify everything is ok now
rm -rf /home.old

===

Subject: Re: Re: need a way to readjust my partitions...
From: markus@infoscape.com
Date: Fri, 11 Jun 1999 20:29:18 -0700


--pgp-sign-Multipart_Fri_Jun_11_20:28:56_1999-1
Content-Type: text/plain; charset=US-ASCII

Henricus Holtman writes:
 >     I am still a little bit confused, to wit:
 > 
 > 1: If you tar the file as below as root, what do you do while restoring
 >     the file?  For example do you do 'tar cvf archive.tar', and everything
 >     will be fine?

For extracting the archive, you should use the options

  tar fxvpS archive.tar

That should take care of everything.

 > 2: I have 'tomsrtbt' (a small linux system that fits on a floppy).  It has
 >     its own version of tar, with not so many command line options.  Can
 >     this tar be used for tarring directories?  If I tar with gtar using the
 >     options delineated below can I restore the files with tomsrtbt tar?

Theoretically, yes. In reality, I wouldn't trust anything other than
GNU tar to touch my files. There are way too many horribly broken
versions of tar out there. Most commercial UNIX vendors (last time I
checked this included AIX, Solaris, HP/UX) still ship versions of tar
that do very funny things with your pathnames if they get too long
(about 100 characters). Also, I wouldn't be surprised if whatever
non-GNU tar you use, didn't know how to handle all the special types
of files and their permissions; let alone deal with sparse files.

Also, are you sure that tomsrtbt can access your ZIP drive? I don't
have any experience with these devices, so I wouldn't know if you need
special drivers.

If you spend a little effort, you can create a floppy disk that you
format with 1.68MB (using "fdformat /dev/fd0u1680") or even bigger and
then tweak your root disk to take advantage of that extra space. This
does require some fiddling around though and even an experienced Linux
user will probably take quite a while to build this new disk and make
GNU tar work with whatever stripped down libraries are included with
tomsrtbt.

Bootstrapping a system from an archive is not completely trivial. You
are better off, if you can somehow mount both the old source and the
new destination device at the same time. And even then, you could run
into problems with device id's being shuffled around because you
added/removed devices/partitions. None of this is insurmountable, but
expect to spend a little time until everything works again.

===
Subject: Re: copying directories
From: Steve Borho <sborho@ststech.com>
Date: Thu, 17 Jun 1999 09:59:04 -0500


On Wed, Jun 16, 1999 at 11:15:54PM -0500, Benjamin Sher wrote:
> Dear friends:
> 
> Here is my problem:
> 
> I would like to copy ALL of the 5,000 clip art images from my WP8 CD to
> my WP8 program (/opt/wp80/wpgraphics).

my preferred method is to use cpio:

cd /mnt/cdrom/clipart
find . -depth -print | cpio -pmd /opt/wp80/wgraphics

The find command generates a list of the files that need to be copied
which get's piped as input to cpio which copies each one to
/opt/wp80/wgraphics.

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu