You are not logged in.

#1 2012-06-03 17:11:39

Zmann
Member
Registered: 2010-04-27
Posts: 43

[SOLVED] Issues with separate partition for /var

Hi all,

due to issues with /usr being located on a separate partition, I decided to move my whole root partition to SSD. To minimize write access to SSD I put /var to a separate partition. Now I noticed, that at boot time bootlogd writes to /var/log/boot but later on the /var partition is mounted and hides all the content formerly written to e.g. /var/log/boot. So what am I expected to do to put my /var directory on a different partition except a corresponding entry in /etc/fstab?

Cheers, Zmann

Last edited by Zmann (2012-06-04 20:28:00)

Offline

#2 2012-06-03 22:21:09

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [SOLVED] Issues with separate partition for /var

You might just have accidentally made some files in there a while back as a one-time problem. Probably you should delete (of course maybe  "rescuing" first) the files in the /var tree on the root filesystem, and then remount the correct /var partition.

The reasoning behind this is that bootlogd's man page claims that it will hold onto the data, instead of writing it to a file, if /var/log/boot can't be created. I interpret that to mean that in /var/log doesn't exit on your root partition, it won't create the file in the wrong place, but will instead write in where you intend, on the real /var, once it's been mounted.

Offline

#3 2012-06-03 23:11:40

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: [SOLVED] Issues with separate partition for /var

ataraxia got it right.

to fix this i suggest something like:

# mount --bind / /mnt && rm -rf /mnt/var/*

Though you might want to be a bit more careful than that so you don't accidentally delete stuff you want to keep...

Offline

#4 2012-06-04 20:27:34

Zmann
Member
Registered: 2010-04-27
Posts: 43

Re: [SOLVED] Issues with separate partition for /var

Hi ataraxia and tomegun,

yes, you're right: the reason was that I didn't remove the old stuff from the /var partition and so the bootlogd succeeded in creating /var/log/boot and thus assumed (wrongly), that the var partition was ready and could be written to. Thanks for pointing that out.

Cheers, Zmann

Offline

Board footer

Powered by FluxBB