Re: New Hard Disk

1997-04-30 Thread Kevin Traas
> > I'm trying to add space to my system and all i have is a 170meg HD what
I
> > want to do is move everything from /usr/lib to the new HD and have the
new
> > drive mount at that point. I would like to have the move done in one
> > command. is that posible or will i have to move the whole tree by hand?
> 
> Sure..  Mount the new partition under /mnt, then:
> 
> (get into single user mode)
> cd /usr/lib
> tar -cvO . | (cd /mnt ; tar -xpf - )
> (Now check the files and perms under /mnt, and make sure it's ok)
> cd /usr/lib (in case you left there...)
> rm -rf *

I'd suggest that, before removing the files, update fstab (as below) to
mount the new drive to /usr/lib and then reboot and see if everthing works.
 i.e. check files/permissions under /usr/lib. 

In this situation, the new drive (and files) are mounted right over top of
the existing directory structure.  (BTW, as a tip, this is a great way to
"hide" a directory structure on your system from prying eyes  Drop some
files into a directory and then mount something over top of it.  Poof!  The
files are "gone" until you need them and access them.)

Once you know things are working, then unmount the new fs from /usr/lib,
remove the existing structure, and then remount the fs.

Later,

Kevin Traas
Systems Analyst
Edmondson Roper CA
http://www.eroper.bc.ca


> cd ..
> mount -t ext2 /dev/newpartition /usr/lib
> (Now change your /etc/fstab accordingly)
> 
> Be careful!  Backup your data first!
> 
> Jason Costomiris | Finger for PGP 2.6.2 Public Key
> [EMAIL PROTECTED] | "There is a fine line between idiocy
> My employers like me, but not  | and genius.  We aim to erase that line"
> enough to let me speak for them. |--Unknown
> 
>   http://www.jasons.org/~jcostom
> 
> 
> 
> --
> TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> [EMAIL PROTECTED] . 
> Trouble?  e-mail to [EMAIL PROTECTED] .


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: New Hard Disk

1997-04-29 Thread Harmon Sequoya Nine
Syd --

Looks like you can use the "cp" command with the "--archive" option (see "cp" 
man page).

What you need to do is, after you place a linux filesystem on the partition 
with "mke2fs",
mount that partition under the generic mount-point directory "/mnt":

mount /dev/hd?? /mnt

Then, copy everything from /usr/lib onto the partition:

cp --archive /usr/lib /mnt

Once you're sure everything has been copied and is intact, erase everything 
under /usr/lib:

rm -r /usr/lib/*

Then umount the partition, and remount it under /usr/lib

umount /mnt
mount /dev/hd?? /usr/lib

Be sure to place the necessary data in your /etc/fstab file so that the 
partition gets
mounted at boot time from now on (/etc/fstab format is self-explanatory).

Drop me a line if you have problems, or this procedure doesn't work out (be 
sure to
back up your files before doing this!).

Hope it works! :-)

-- Harmon


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: New Hard Disk

1997-04-29 Thread Jason Costomiris
On Tue, 29 Apr 1997, Syd Alsobrook wrote:

> I'm trying to add space to my system and all i have is a 170meg HD what I
> want to do is move everything from /usr/lib to the new HD and have the new
> drive mount at that point. I would like to have the move done in one
> command. is that posible or will i have to move the whole tree by hand?

Sure..  Mount the new partition under /mnt, then:

(get into single user mode)
cd /usr/lib
tar -cvO . | (cd /mnt ; tar -xpf - )
(Now check the files and perms under /mnt, and make sure it's ok)
cd /usr/lib (in case you left there...)
rm -rf *
cd ..
mount -t ext2 /dev/newpartition /usr/lib
(Now change your /etc/fstab accordingly)

Be careful!  Backup your data first!

Jason Costomiris | Finger for PGP 2.6.2 Public Key
[EMAIL PROTECTED] | "There is a fine line between idiocy
My employers like me, but not| and genius.  We aim to erase that line"
enough to let me speak for them. |  --Unknown

http://www.jasons.org/~jcostom



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: New Hard Disk

1997-04-29 Thread Eric Delaunay
Syd Alsobrook wrote:
> I'm trying to add space to my system and all i have is a 170meg HD what I
> want to do is move everything from /usr/lib to the new HD and have the new
> drive mount at that point. I would like to have the move done in one
> command. is that posible or will i have to move the whole tree by hand?
> Syd

Try
 cd /usr ; find lib -print | cpio -pd /mnt
or
 cp -a /usr/lib /mnt/lib
or
 ( cd /usr ; tar czf - lib ) | ( cd /mnt ; tar xvzf - )

Bye.

-- 
 Eric Delaunay | "La guerre justifie l'existence des militaires.
 [EMAIL PROTECTED] | En les supprimant." Henri Jeanson (1900-1970)


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .