[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New Hard Disk



> > 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
> jcostom@sjis.com                 | "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
> debian-user-request@lists.debian.org . 
> Trouble?  e-mail to templin@bucknell.edu .


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: