Summary - Moving mail to new disk

From: James McCaw (jmccaw@weber.ucsd.edu)
Date: Thu Apr 10 1997 - 16:14:44 CDT


The original problem was that the / partition, which was only about 14
Megabytes, had the mail files on it and frequently filled up, causing the
computer to have a problem, as you can well imagine.
I installed a new hard drive and was able to do that because of this group.
 I then moved the print files, but not the print program to the new disk
and then set up some soft links from the old directories to the new
directories.

Procedure:
1. Change to single-user mode by logging in as su. This stopped anyone
from using the
    mail program.

2. Copy the files from /var/spool/mail to /new1/mail
    cp -rp /var/spool/mail /new1 /* this is a recursive-preserve copy,
which
     chown username filename * preserved everything except
ownership. I
                                          * used chown on each file, making everything
                                         /* identical to the original directories.
    cp -rp /var/spool/mqueue /new1
    chown username filename

3. Remove the original files
    cd /var/spool
    rm -rf mqueue
    rm -rf mail

4. Create soft links.
    ln -s /var/spool/mqueue /new1/mqueue
    ln -s /var/spool/mail /new1/mail

5. Then I rebooted
    shutdown -r now

6. Checked out the mail, directories and file systems. The / file system
was down
    to 55% full and is no longer affected by the buildup of mail.

All's well that ends well!

Thanks to all again.

Jim



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:50 CDT