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

View: New views
5 Messages — Rating Filter:   Alert me  

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

by jaymax :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


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


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

as in
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=

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

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

by Kyle Wheeler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday, October  1 at 07:33 PM, quoth jaymax:
> 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

What's wrong with `mv /var/qmail /usr/var/qmail` ?

~Kyle
- --
Truth never damages a cause that is just.
                                                      -- Mahatma Gandhi
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkjkxYIACgkQBkIOoMqOI14fnwCgw6DCTXCzvFZPCMF9zb/fxfzy
DBEAnjWEOb1/RKFPxGfaHKkF2OukVhJF
=m0i3
-----END PGP SIGNATURE-----

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

by Harald Hanche-Olsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+ jaymax <jaymax36@...>:

> tar cf - . | (cd /usr/var; tar xf - ) from the /var directory

... will ruin the inode number magic that is essential for qmail.
More below.

> 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.

Edit conf-qmail, recompile and run make setup check.
Then copy the control and users directories from the old location to
the new. If the queue was not empty, copy the contents of the old
queue directory using the tar trick or something like

  cd /var/qmail
  find queue -type f -print | cpio -pdmV /usr/var/qmail

IMPORTANT: Fix up message numbers before starting qmail or smtpd in
its new location. You can find some scripts for this on qmail.org.

- Harald

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

by Harald Hanche-Olsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+ Harald Hanche-Olsen <hanche@...>:

>   cd /var/qmail
>   find queue -type f -print | cpio -pdmV /usr/var/qmail
>
> IMPORTANT: Fix up message numbers before starting qmail or smtpd in
> its new location. You can find some scripts for this on qmail.org.

On second thought, it is better to just let the old qmail run and
allow the queue to drain naturally. When it's empty, you remove the
whole directory tree. Then you don't need to worry about inodes.

- Harald

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

by Markus Stumpf-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 02, 2008 at 07:49:12PM +0200, Harald Hanche-Olsen wrote:
> On second thought, it is better to just let the old qmail run and
> allow the queue to drain naturally. When it's empty, you remove the
> whole directory tree. Then you don't need to worry about inodes.

Or use "smtproutes" and a "kill -ALRM" to send all the messages to
the "new" qmail. You will loose the information about how long it has
been in the queue, but that is IMHO a minor drawback.

        \Maex

LightInTheBox - Buy quality products at wholesale price!