Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[FreBSD] Changing /var to /usr/var - qmail implications

Status
Not open for further replies.

jaymax2U

Technical User
Oct 1, 2008
47
0
0
US
Hello,
I am running qmail on a FreeBSD 6.X platform,qmail puts several files in the /var partition.
I've run into a 'full filesystem condition' in the /var partition and would like to change it. I have created a /usr/var directory and would then do a link from /var to /usr/var to by pass the artition size restrictions. When I executed tar cf - . | (cd /usr/var; tar xf - ) from the /var directory some of the files & directories were transferred but for others I got this message

[small][blue]
tar: ./run/log: tar format cannot archive socket: Inappropriate file type or format
tar: ./run/devd.pipe: tar format cannot archive socket: Inappropriate file type or format
tar: ./run/logpriv: tar format cannot archive socket: Inappropriate file type or format
tar: ./run/rpcbind.sock: tar format cannot archive socket: Inappropriate file type or format
tar: ./run/dovecot/dict-server: tar format cannot archive socket: Inappropriate file type or format
tar: ./run/dovecot/auth-worker.818: tar format cannot archive socket: Inappropriate file type or format
tar: ./run/dovecot/login/default: tar format cannot archive socket: Inappropriate file type or format
tar: ./named/var/run/log: tar format cannot archive socket: Inappropriate file type or format
[/blue][/small]

These all have permissions of type
srw-rw-rw-

as in
[small][blue]
srw-rw-rw- 1 root wheel 0 Jan 1 2002 ./run/log=
srw-rw-rw- 1 root wheel 0 Jan 1 2002 ./run/devd.pipe=
srw------- 1 root wheel 0 Jan 1 2002 ./run/logpriv=
srw-rw-rw- 1 root wheel 0 Sep 29 05:03 ./run/rpcbind.sock=
srw------- 1 root wheel 0 Sep 29 05:03 ./run/dovecot/auth-worker.818=
srwxrwxrwx 1 root wheel 0 Sep 29 05:03 ./run/dovecot/dict-server=
srw-rw---- 1 root dovecot 0 Sep 29 05:03 ./run/dovecot/login/default=
srw-rw-rw- 1 root wheel 0 Jan 1 2002 ./named/var/run/log=
[/blue][/small]

I was told that only way to effect the change over is to reconfigure the config files and that the program(s) would recreate the dir with the correct permissions

Now the "Life with Qmail" p29 doc. list a long array of config files all of which were not configured with explicit paths.

Could someone say in which configure file I would have to reset the /var to /usr/var path so as to make this change, and where it is to be found.

Thanks
 
You're making this harder than it needs to be.

If you have another physical partition that you can add to your FS, then use it to replace an existing part of /var (not /var/run) rather than mess with moving stuff...

For example, if you have a /var/log folder, you could
1) create and format the new partition,
2) mount that new partition temporarily as /tmp/foo/
3) shutdown most everything running on the server (temporarily)
4) use 'dd' or 'tar' to copy from /var/log (and lower recursively) to /tmp/foo
5) unmount /var/log
6) unmount /tmp/foo
7) remount /tmp/foo in /var/log's place
8) adjust fstab accordingly.






D.E.R. Management - IT Project Management Consulting
 
OK I see your idea, I do not have any existing physical partition that could be repartioned and formated except for another disk which is in use.

If /var/log is the usual culprit here, is it possible to rotate it out into another file on another partition periodically?
 
The culprit is whatever you determine from your own analysis of folder utilization...

The point I should have emphasized a bit more clearly is that certain folders like /var/run are more universally used by many applications where you'd need to find their configuration files to move them from /var/run to /usr/var/run (or whatever it was you wanted).

It's much more common (and eaiser) to substitute some appropriate free disk to be a partition for a subfolder like /var/log (or even /var/run)

D.E.R. Management - IT Project Management Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top