More var woes: MySQL won't start; audits logged
Matthew Gillen
me-5yx05kfkO/aqeI1yJSURBw at public.gmane.org
Fri Jun 12 13:11:59 EDT 2009
david-8uUts6sDVDvs2Lz0fTdYFQ at public.gmane.org wrote:
> So last night I shrunk my ext4 / by 20GB and set up an ext3 partition for
> /var. gparted took many hours to do it, so I had to try to finish it up
> before I left for work this morning. I tried to mount the new partition
> under /var, and that didn't work, and I had no time to research it.
What do you mean 'it didn't work'? You couldn't mount the new partition, or
your system mounted it but didn't work right?
> I had moved /var to /oldvar so I could use /var as a mount point, so to
> recover, I "ln -s /oldvar /var" while booted on the LiveCD. I then "ln -s
> /var/mail /newvar/mail" (where newvar is where I mounted the new partition
> that was supposed to be /var).
I'm confused as to what you're trying to do, but here's what I think you want
to do:
Boot the live cd, and mount the original / and the new /var partitions.
mv /oldroot/var/* /newvar/
edit /oldroot/etc/fstab to add entry for newvar
touch /oldroot/.autorelabel
You really don't want to try to migrate /var over while the system is on-line.
You might be able to get away with migrating while in single user mode.
The last step should fix selinux before anything could fail because of it.
There's a way you could do it while booted in the liveCD (involving chroot and
restorecon), but it's easier (but more time-consuming w.r.t. system downtime)
to just relabel everything.
HTH,
Matt
More information about the Discuss
mailing list