From owner-freebsd-questions@FreeBSD.ORG Mon Feb 28 18:04:13 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CC2716A4CE for ; Mon, 28 Feb 2005 18:04:13 +0000 (GMT) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5C2743D49 for ; Mon, 28 Feb 2005 18:04:12 +0000 (GMT) (envelope-from nkinkade@fastmail.fm) Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id 673C4C5A949; Mon, 28 Feb 2005 13:04:11 -0500 (EST) X-Sasl-enc: aiuHrPWdcnb1HCDmuQeixA 1109613848 Received: from gentoo-npk.bmp.ub (unknown [206.27.244.136]) by www.fastmail.fm (Postfix) with ESMTP id 959B6570326; Mon, 28 Feb 2005 13:04:08 -0500 (EST) Received: from nkinkade by gentoo-npk.bmp.ub with local (Exim 4.21) id 1D5pFZ-000145-86; Mon, 28 Feb 2005 12:04:09 -0600 Date: Mon, 28 Feb 2005 12:04:09 -0600 From: Nathan Kinkade To: Gerald Lightsey Message-ID: <20050228180409.GR10499@gentoo-npk.bmp.ub> Mail-Followup-To: Gerald Lightsey , freebsd-questions@freebsd.org References: <20050228171532.CDFO13819.fed1rmmtao12.cox.net@geraldligh> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LkYZvX65tyO4RZtj" Content-Disposition: inline In-Reply-To: <20050228171532.CDFO13819.fed1rmmtao12.cox.net@geraldligh> X-PGP-Fingerprint: 3FDF A406 B149 3959 A8CB C5A9 3B46 4812 D852 7E49 User-Agent: Mutt/1.5.6i Sender: cc: freebsd-questions@freebsd.org Subject: Re: What am I doing wrong with MOUNT? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nathan Kinkade List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 18:04:13 -0000 --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: > 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--