on Mon, Aug 27, 2001 at 08:33:04PM -0700, Eric G. Miller (egm2@jps.net) wrote:
> On Mon, Aug 27, 2001 at 08:09:15PM -0700, Jason Majors wrote:
> > I currently have /var on hdc, but want to move it to sda. I've tried mounting
> > the new partition as var2, copying the files, changing fstab, then rebooting,
> > but lots of programs complain. I'd guess it has something to do with the state
> > of var at the time of the copy, vs at the time of shutdown/boot. That method
> > works well for home, usr, etc.
> > Is there a good way to do this for var? other than reinstalling?
> > Thanks.
> > Jason
>
> Definitely go into single user mode first (telint 1). You don't want
> processes writing to log files, spool files, etc... while you do the
> migration. When you're finished, your new partition should be mounted
> as "/var /dev/sda?" or programs will certainly complain.
>
> 1. Go Single User
> 2. mount -t <ext2> /mnt /dev/sdaX
I would add at this point:
mount -o remount,ro /var
...which ensures that your existing /var is readonly. If anything's
actively trying to write at that point, you'll know about it.
> 3. Copy files via your favorite method ("cp -a /var /mnt" should work).
> 4. umount /mnt
> 5. umount /var
> 6. Edit fstab to point /var at /dev/sdaX
> 7. mount /var (now on the new disk)
> 8. exit (go back to multi-user mode)
--
Karsten M. Self <kmself@ix.netcom.com> http://kmself.home.netcom.com/
What part of "Gestalt" don't you understand? There is no K5 cabal
http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org
Free Dmitry! Boycott Adobe! Repeal the DMCA! http://www.freesklyarov.org
Geek for Hire http://kmself.home.netcom.com/resume.html
Attachment:
pgpf_9ZvYA53p.pgp
Description: PGP signature