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

Re: moving /var



On Sat, 2006-12-23 at 16:55 +0100, Michelle Konzack wrote:
> Am 2006-12-20 13:41:11, schrieb Greg Folkert:
> > 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)
> 
> /var/run and var/lock must NOT be on the root partition.
[...snip...]

As of right NOW, Ubuntu uses a "different" way of booting.

*IF* /var/run and /var/lock are NOT on the initial root (/) filesystem
before the other filesystems are mounted then it fails to boot properly.

In fact "/etc/init.d/mountvirtfs" executed early (S01) in the boot
process has the initial mounting of the tmpfs stuff in it here it is:

        # Mount standard /proc filesystem
        TYPE=
        case "$KERNEL" in
            Linux|GNU)
                TYPE=proc
                ;;
            *FreeBSD)
                TYPE=linprocfs
                ;;
            *)
                TYPE=procfs
                ;;
        esac

        # Mount standard /proc and /sys.
        domount $TYPE /proc
        domount sysfs /sys

        # Mount /var/run and /var/lock as tmpfs.
        # /var may be on another drive so create /var/run if we need to
        domount tmpfs /var/run "-o mode=0755"
        domount tmpfs /var/lock "-o mode=1777"

        # Mount /proc/bus/usb -- though all software should be modified to
        # use /dev/bus/usb instead now
        domount usbfs /proc/bus/usb

Then later in the boot process, it "remounts" the dirs to a "safe
location" for saving later... then once /var is properly mounted it
remounts them where they properly need to be. Done in mtab (S22) then in
mountall (S35)

I KNOW this is the way it is in Ubuntu, I had a server I setup for a
customer. After I did initial setup, I had to add a real Raid Array
(2.2TB) to various filesystems of which one was /var (before /var was on
root). During the re-deploy I missed making the /var/run and /var/lock
directories as *I* would NEVER have done that normally. This caused
failing to reboot properly, not bringing up the NICs and periodically
falling off the network as well.

I "got" to make a 2 hour each way and 3-5 hour troubleshooting "Gratis"
travel call each time this thing failed. (4 times)

It was tracked down to there NOT being /var/run and /var/lock on the
root(/) filesystem  

So, please DO NOT tell me what NOT to do. I specified this was on Ubuntu
on the off chance the person was using Ubuntu.

I'll bet the Lenny (Etch+1) has this.
-- 
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: