Michael Leone on Fri, 10 Nov 2000 16:17:24 -0500 (EST) |
----- Original Message ----- From: "gabriel rosenkoetter" <gr@eclipsed.net> To: <plug@lists.phillylinux.org> Sent: Friday, November 10, 2000 1:33 PM Subject: Re: [PLUG] Moving /usr to a new partition properly > On Thu, Nov 09, 2000 at 11:08:56PM -0500, Barry Spindler wrote: > > After formatting and mounting the new partition do > > > > cp -a /usr/* /mnt/new_part > > Ack! No! Don't do that! > > cp can *not* be trusted to get permissions right, even with the -a > flag specified, and that wild card will miss dot-files (yes, there > could be some in /usr; don't make presumptions just because you > don't do that). > > The *right* way to do this is this: > > # cd /usr > # tar cfp - . | ( cd /mnt/new_part ; tar xpf - ) If I want to save a copy (as you suggest later on), why do the tar this way, instead of tarring to a file? And then untarring the file? I realize this saves a step, but at the expense of security, doesn't it? > cp's man page may claim it'll do this right, but it's wrong, wrong, > wrong on every system I've stress tested it (Slowlaris, BSD, and > yes, god forbid, Linux). > > tar'ing up an extra copy of your old /usr and stashing it on / > somewhere till you're sure everything's there wouldn't be a bad > idea. Well, that's why I was just going to rename /usr to /old_usr - to keep a copy around. > > 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 :) > > A mount -a should suffice for mounting the new partition at /usr, > and you *definitely* don't need to reboot (why would you ever do > that except on a laptop? ;^>). > > ~ g r @ eclipsed.net > > > ______________________________________________________________________ > 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 > > ______________________________________________________________________ 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
|
|