Barry Spindler on Thu, 9 Nov 2000 23:19:10 -0500 (EST) |
After formatting and mounting the new partition do cp -a /usr/* /mnt/new_part This will copy all files (and directories) under /usr, preserving permissions, ownership, and symlinks. Then umount the new partition. Change fstab to point the new partition to /usr, move /usr out of the way, and mount the new partition to /usr. That should be it.. you shouldn't have reboot for this :) --Barry On Fri, Nov 10, 2000 at 08:51:57AM +0500, Mike Leone wrote: > OK, so I'm still wanting to do this properly. > > Currently, everything lives on 1 physical partition (obviously, let's > leave the swap stuff out of this). Now that I've resized the partition, > I have free space. So I figured I would create a new ext2-formatted > partition -say 1G out of the 12 free; mount that new partition > temporarily as /mnt/new_part. > > What i want to do is clone my /usr filesystem over to /mnt/new_part - > with all the proper permissions; file ownership; etc. > THEN edit fstab. to load that newly populated partition as /usr (and > rename the old /usr to something else, obviously - I wanna keep it > around until I've verified that everything is working properly, and be > able to re-mount the old /usr if necessary). > > Creating and mounting the new partition, I know how to do. So what would > be the BEST or PROPER way to copy everything to this new partition? > > cd /usr > tar --preserve-permissions --same-owner --verify -z -c > /mnt/new_part/usr_stuff *.* > > (Is that right - to preserve permissions,keeping the same owner of the > files, gzipped, into a new archive named "usr_stuff", all files in this > directory? How do I get it to dive down into sub-directories?) > > Then: > > cd /mnt/new_part > tar zxvf usr_stuff > > ? > > Change the fstab; rename the old /usr; reboot; and pray? > > -- > ------------------------------------------------------------------ > Michael J. Leone <mailto:turgon@mike-leone.com> > PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF > > > > ______________________________________________________________________ > Philadelphia Linux Users Group - http://www.phillylinux.org > Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce > General Discussion - http://lists.phillylinux.org/mail/listinfo/plug > -- There was a young fellow named Morgan Who possessed an unusual organ: The end of his dong, Which was nine inches long, Was tipped with the head of a gorgon. ------------------------------------------------------------------------ GPG Fingerprint: 5475 C984 D870 4ACD 9799 1B69 DFCE 17CB 8257 38C3 ------------------------------------------------------------------------ ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|