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

Re: moving /var



On Wed, 2006-12-20 at 14:36 +0000, richard@the-place.net wrote:
> I recently tried to move /var to a new partition.  Booted from some
> live cd, moved it and edited /etc/fstab to suit.  Broke the machine
> as it wouldn't boot afterwards (in fact I recollect it booted but with
> no keyboard.  Anyway it was unusable.) I thought it might be an initrd
> problem, and had a half-baked memory that chrooting into the root
> partition and running makeinitrd or somesuch would solve it. But as
> usual I got errors from nonexistant /dev and /proc filesystems in the
> chroot and so could not build a new initrd.  So I copied /dev back
> where it came from and reverted fstab and all was well.
> 
> I might have been more persistent but had a slow (and expensive) i'net
> connection so it was easier to give up.
> 
> What should I have done?

I have done it many times from LiveCD, also from Single user mode. I had
to turn off some logging and other things even in single user mode.

Effectively you have to make sure you get everything. If you are running
Ubuntu there are additional items you need to make sure are taken care
of. (Make sure /var/run and /var/lock are on the root partition for
tmpfs filesystems)

But like I said, I have done it multiple times... heck even once
accidentally reformatted the /var filesystem AND deleted all backups
before the retore, having to recreate it from scratch on the new
filesystem.

So, what did you do to move it? (list of commands used, would be good)
-- 
greg, greg@gregfolkert.net

The technology that is
Stronger, better, faster:  Linux

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: