From owner-freebsd-questions@FreeBSD.ORG Mon Feb 28 17:32:00 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 E283316A4CE for ; Mon, 28 Feb 2005 17:32:00 +0000 (GMT) Received: from catflap.slightlystrange.org (cpc2-cmbg1-3-0-cust94.cmbg.cable.ntl.com [213.107.104.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DD5043D55 for ; Mon, 28 Feb 2005 17:32:00 +0000 (GMT) (envelope-from danielby@slightlystrange.org) Received: from danielby by catflap.slightlystrange.org with local (Exim 4.44 (FreeBSD)) id 1D5okO-000I5r-Fa for freebsd-questions@freebsd.org; Mon, 28 Feb 2005 17:31:56 +0000 Date: Mon, 28 Feb 2005 17:31:56 +0000 From: Daniel Bye To: freebsd-questions@freebsd.org Message-ID: <20050228173156.GA68693@catflap.slightlystrange.org> Mail-Followup-To: 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="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <20050228171532.CDFO13819.fed1rmmtao12.cox.net@geraldligh> User-Agent: Mutt/1.4.2.1i 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: Daniel Bye List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 17:32:01 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 28, 2005 at 09:15:23AM -0800, Gerald Lightsey wrote: > Posted last night to newbies -(my mistake) >=20 > I'm brand new to FreeBSD and Unix world in general. My son has an intern= et > site supported by FreeBSD that uses MySQL. I have set up a FreeBSD vers= ion > 5.3 system on my home network using an 80gb drive sliced and partitioned = to > the FreeBSD 5.3 defaults. I installed MySQL version 3.23 from the ports > because that is the version on my son's server. I wanted to install a co= py > of his database that I had MySQL dump on his FreeBSD server and FTP'd it = to > my Windows PC and placed on a CD. After directing the .SQL dump back to a > like named database on my newly installed box I originally received a > message that I was out of disk space. >=20 > I find that MySql is working in /var/db/mysql and that the default > installation slice/partition of FreeBSD must be too small to handle the > databases I want to play with. So I read up on the file system and thoug= ht > I understood that one can graft another drive onto a mount point on the > system to add space at the mount point. I purchased a 120gb drive for un= der > $50 after rebates and partitioned it into one FreeBSD partition, (not > dangerously dedicated). I expected, from what I read, that if I mounted = it > at the /var mount point everything in the original /var directory would > become unreachable/invisible. I tried it and I got the results I expecte= d. > The reason I thought I would replace the ENTIRE /var directory was because > if /var is too small for MySQL it would probably quickly be exposed to be > too small for something else unexpected. =20 >=20 > I mounted the new drive 1 to a temporary mount point and used the cp comm= and > to copy each directory in /var to the drive. I looked in all the new/old > directories at the temporary mount point using ls -F and everything appea= red > to be there at the file level. I used the umount command to unmount the = new > drive/partition from the temporary mount point and remounted it at /var. = I > opened MySQL and created the named database I wanted and again started to > collect the data from the CD by directing the .SQL file data to my databa= se. > Again, just like it did originally, after several minutes of creating tab= les > the system reported that it had run out of space. >=20 > 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? Just a thought - each time you mounted the new disk at /var, the system was already running in multi-user mode. That means that all network daemons etc have been started and are running /before/ you mount the disk. MySQL will continue to use the /original/ /var because it has open filehandles on that fs. Try stopping MySQL before mounting the new disk. Start MySQL again, and it should start up on the new fs. Dan --=20 Daniel Bye PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc PGP Key fingerprint: 3B9D 8BBB EB03 BA83 5DB4 3B88 86FC F03A 90A1 BE8F _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCI1WMhvzwOpChvo8RAqwXAJ0To88Pqjvi6t8Kqum0072YU2r3pACfcPH7 TKlT0xF+GOo+ZZ/R07pEQXQ= =5DEj -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl--