[Nottingham] Mount and Filesystem
Peter Chang
Peter.Chang at nottingham.ac.uk
Tue Sep 25 18:52:02 BST 2007
Hi Raph,
You can't combine partitions like you want unless you use logical volumes
(lvm2 on top of device mapper). But you can mount filesystems in
sub-directories of an extant fs:
/dev/sda1 -> /var
/dev/sdb1 -> /var/log
The steps are
1) create a new mount point (mkdir /var/foo)
2) create the new filesystem and mount it to /var/foo
3) bring down the processes that are writing to /var (go to whatever
initlevel is needed with telinit)
4) copy stuff over from whatever directory (eg, /var/log) you're replacing
5) unmount new fs
6) rename the old directory
7) create a new directory with the same name as the old one for use as a
mount point
8) mount new fs on that new mount point
9) send appropriate signals to any processes still writing to the old
directory to make them open a new (log) file
10) configure /etc/fstab (or use whatever TUI or GUI to point a partition
to a mount point) to allow the system to automatically mount the new fs
11) tidy up (remove first mount point /var/foo, bring the system up to the
original initlevel)
hth
Peter
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
More information about the Nottingham
mailing list