[plug] Symbolic links v's entries in fstab

Matt Kemner zombie at networx.net.au
Tue Oct 26 09:33:52 WST 1999


On Tue, 26 Oct 1999, Michael Hunt wrote:

> 1. Copy files to second partition (all those in /var/spool/imap)
> 2. Rename existing directory

If you do that, don't forget to create the directory again for a mount
point.
ie say your new partition is mounted on /var/spool/newimap you'd do:

cp -a /var/spool/imap/* /var/spool/newimap/
mv /var/spool/imap/ /var/spool/oldimap
mkdir /var/spool/imap

and then edit /etc/fstab to mount /dev/hdcX on /var/spool/imap rather than
/var/spool/newimap
Alternatively you can replace the "mv" and "mkdir" commands with
"rm -f /var/spool/imap/*" :)

> 3. Modify entry in /etc/fstab
> 4. Restart machine

Restart machine? What do you think this is, Windows?
Just run "umount /var/spool/oldimap && mount -a"
Restarting is for kernel or hardware upgrades. (Until hot-plug PCI hits
mainstream, then it'll only be for kernel upgrades)
 
> A symbolic link would just replace step 3 (and not require a reboot of
> course) but while it is easier to do from what I hear it would not be the
> best solution.

If you have a dedicated partition for the mailspool, you might as well
mount it on the right directory. It makes no difference to the system, but
it isn't any more work if you already made the partition and looks neater.

The previous scenario is different, where individual directories were
being moved to another partition, and they're all sharing a partition, so 
a symlink is the only option, unless you want to do a
backup/fdisk/mke2fs/restore :)

> Anyone got any advice to give me / Would my plan work ?

It'll work just fine (TM) :)

> I do intend to
> disconnect the machine from the network at the same time as I do the copy so
> that files are not modified.

Nah, just kill the mailservers (smtp, pop3 & imap) and then restart them
when you're finished.

 - Matt




More information about the plug mailing list