On Mon, Feb 28, 2005 at 09:15:23AM -0800, Gerald Lightsey wrote: <snip> > My surprise is that every indication I get after I regain control of the > system is that the database tables are being built within the ORIGINAL /var > directory structure rather than the 120gb drive mounted on the /var > mountpoint. If I use the df command while drive 1 is mounted it shows that > /var on disk 0 is full and /var on disk 1 just has whatever I copied onto > the drive when it was mounted to a temporary mount point. Also by > experimentation/confirmation I find that simply creating a couple of new > databases within MySQL while drive 1 is mounted on /var shows that the > databases have been created on the original /var on disk 0 as directories > after disk 1 is unmounted. > > What am I doing wrong or what don't I understand about a drive being mounted > on /var where data is being written underneath it to the original > /var/db/mysql/mydatabasename on disk 0 rather than onto the mounted disk 1?
What are the outputs of the commands ``mount'' and ``df -h''? Are you
sure that you are first unmounting the partition on disk 0 that is
mounted at /var before you mount the new disk (1) at /var? Did you
reboot at any point? Keep in mind that you will need to alter the file
/etc/fstab to let the system know that it now needs to be mounting the
single slice from the new disk at /var.
Here is quick rundown on how you could achieve your goal:
1) Mount the new disk at at /mnt with something like:
# mount /dev/ad1s1a /mnt
2) Copy everything from your original /var partition to the new one:
# cd /var && tar cf - ./ | (cd /mnt && tar xvpf -)
3) Edit /etc/fstab from something like:
/dev/ad0s1e /var ufs defaults
1 2
to:
/dev/ad1s1a /var ufs defaults
1 2
4) Unmount old partition from /var and mount new one at /var:
# umount /var && mount /var
There may be an error or two in this, but it should serve to give the
general idea. Also, you may want to reallocate the partition formerly
mounted at /var for something else?
Nathan
pgpmwK9QVusPc.pgp
Description: PGP signature
