Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2005 12:04:09 -0600
From:      Nathan Kinkade <nkinkade@ub.edu.bz>
To:        Gerald Lightsey <glightsey1@cox.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: What am I doing wrong with MOUNT?
Message-ID:  <20050228180409.GR10499@gentoo-npk.bmp.ub>
In-Reply-To: <20050228171532.CDFO13819.fed1rmmtao12.cox.net@geraldligh>
References:  <20050228171532.CDFO13819.fed1rmmtao12.cox.net@geraldligh>

next in thread | previous in thread | raw e-mail | index | archive | help

--LkYZvX65tyO4RZtj
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 /v=
ar
> 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 th=
at
> /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.=20
>=20
> What am I doing wrong or what don't I understand about a drive being moun=
ted
> 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

--LkYZvX65tyO4RZtj
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCI10ZO0ZIEthSfkkRAksZAJ40nmXM1I9PFf03dZ/jyLs3QmHqLACglAZW
FziwpIOHgLevpbzmWuqzoWk=
=JjvX
-----END PGP SIGNATURE-----

--LkYZvX65tyO4RZtj--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050228180409.GR10499>