spool move

knoll

Verified User
Joined
Sep 26, 2005
Messages
138
Location
Belgium
Hey,

i want to move the directory /var/spool to /usr/spool because the partition /var is almost full due all the mails on the system

how do i move that ?

and getting mail in the new dir

Greets,
Alex Vanhecke
 
Note that to do it the right way you should do this in single user mode, which means while you're at the data center, and will have to shut down your OS and bring it up in single user mode.

If you don't want to do it that way you can shut down exim, pop and inetd, before you do the following:

# cd /var
# mv spool /usr
#ln -s /usr/spool spool

If you've turned off those three services, it's now time to turn them back on.

If you've switched to single-user mode it's now time to switch back to (regular) multi-user mode.

Note that if you're using the quota system this will probably break it.

The above is from memory. It is NOT tested. I take no responsibility for breaking your server.

Jeff
 
Hey,

why can't i do it while the server is running normaly?

i tried that but don't get mails

Greets,
Alex Vanhecke
 
Move spool

Hello,

I'm follwing this thread with great interest, because i've also have the same problem.

I think, when you move /var/spool to /usr/spool the quota's
of DA don't mach the actual'usage?

Maybe it is possible to move /var/spool to a directory of partition on a second drive outside the usr directory.

And if it can be done remotely (ssh) it saves me trip to the datacenter. :)

I hope that someone with a more experience with DA has the answer to this problem.
 
Hey,

it worked for me before

but i forgot ;)

i just move the files from virtual in the directory spool to /usr/spool/virtual
than i make a symlink from /var/spool/virtual to /usr/spool/virtual and chown it good

but does'nt work can't recieve mails

Greets,
Alex Vanhecke
 
nothing i can't find anything of the problem in the logfiles

Greets,
Alex Vanhecke
 
hm i remember 1 error

cannot find user dir in the logfile maillog

but i did everything correct

Greets,
Alex Vanhecke
 
Remember when I said the right way to do it?
Linux (I'm not sure about BSD but I'd bet it's the same) won't actually move files that are open until they're closed. It will show them as moved but they won't actually be moved.

So you go ahead and create the symlink, and all of a sudden the original files can't be found, can't be closed.

Anyway, that's the only reason I can think of.

Jeff
 
Back
Top