Thanks! Both the man page, and the info pages for tar are incredibly 
hard to decipher. I did like you told me and now have /usr resting 
comfortably on sdc1. I found another gig or so of out-of-date updates 
and got rid of them too, so for now i just renamed the old /usr to (can 
you guess? that's right!) /old.usr

Afetr I'm happy that everything transferred correctly I can rm -rf 
old.usr and free up another 4.4G.

(Half my hard drive is in /usr! Ack!)

Thanks again!

On Sat, 9 Feb 2002, mike ledoux wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Sat, Feb 09, 2002 at 07:35:04PM -0500, Thomas M. Albright wrote:
> > My 9GB harddrive is finally full. So I just added 2 more 9G's to take 
> > some of the load. Since /home was a seperate partition, I didn't have a 
> > problem moving /home to a new harddrive. The problem is moving /usr.
> [...]
> > now it's set up as:
> >    /dev/sda4    7.2G    5.8G    1.0G  85% /
> >    /dev/sda1    23M     2.9M     19M  13% /boot
> >    /dev/sdb1    8.3G    952M    7.0G  12% /home
> > with /etc/fstab such as:
> >    /dev/sda1    /boot   ext2    defaults        1 2
> >    /dev/sda2    swap    swap    defaults        0 0
> >    /dev/sda4    /       ext2    defaults        1 1
> >    /dev/sdb1    /home   ext2    defaults        1 2
> [...]
> > I'd like to move /usr (or at least /usr/local) to /dev/sdc1 (another 9G
> > drive). However, since this is on the same partiotion as /, I don't
> > really know how to do it.
> 
> Ok, after you've made a filesystem on /dev/sdc1, here's what you need
> to do to copy the data to the new filesystem (with root privs, of course):
> 
>       # mkdir /mnt/tmp
>       # mount /dev/sdc1 /mnt/tmp
>       # cd /usr
>       # tar cBlf - . | (cd /mnt/tmp && tar xBspf -)
> 
> When the tar command returns, /mnt/tmp should contain a complete copy
> of /usr.  Once you're comfortable that all of the data has been preserved:
> 
>       # umount /mnt/tmp
>       # rm -rf /usr
>       # mkdir /usr
>       # chown root.root /usr
>       # chmod 755 /usr
>       # mount /dev/sdc1 /usr
> 
> If you're paranoid, you can just mount the new filesystem on /usr without
> first removing the data, but this will (obviously) not reclaim the space.
> It is probably a good idea to do this entire operation in single-user
> mode or while running off removable media, but it isn't strictly necessary.
> 
> While I've used this method many times in the past without any trouble,
> I take no responsibility for any problems or data loss you may experience.
> 
> > I'd also like to be able reclame the gig of space that was my /home
> > partition. Any tips would be appreciated. :)
> 
> You could just make a new filesystem on it and mount it as something else
> (I usually make /scratch or /data partitions with this kind of space).
> 
> If you want to integrate that space into an existing filesystem, things
> get much trickier.  I've used partition magic to resize ext2 partitions
> like this, but never / or /boot.  The safest way to do it would be to
> make the desired partitions on one of your new disks, copy the data over
> with tar (cp isn't really safe for this sort of thing), then make the
> new disk 'sda' and use the old disk for the new filesystem(s).
> 
> - -- 
> [EMAIL PROTECTED]          OpenPGP KeyID 0x57C3430B
> Holder of Past Knowledge           CS, O-
> Put your wasted CPU cycles to use: http://www.distributed.net/
> "The easiest way to get the root password is to become system admin."
>          -- Unknown source 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE8ZcoG5rgdHFfDQwsRAuW5AKCXFsBWw8K+umRkfqZ8bqFkoZE3LQCgiLlt
> FWRvFmePW0+quQ32kXnHIIc=
> =0J0I
> -----END PGP SIGNATURE-----
> 
> *****************************************************************
> To unsubscribe from this list, send mail to [EMAIL PROTECTED]
> with the text 'unsubscribe gnhlug' in the message body.
> *****************************************************************
> 

-- 
Thomas M. Albright (Linux user number 234357)
  Amendment IV
     The right of the people to be secure in their persons, houses, 
     papers, and effects, against unreasonable searches and seizures, 
     shall not be violated, and no warrants shall issue, but upon 
     probable cause, supported by oath or affirmation, and particularly
     describing the place to be searched, and the persons or things to 
     be seized.


*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to