Date: Mon, 28 Feb 2005 17:31:56 +0000 From: Daniel Bye <freebsd-questions@slightlystrange.org> To: freebsd-questions@freebsd.org Subject: Re: What am I doing wrong with MOUNT? Message-ID: <20050228173156.GA68693@catflap.slightlystrange.org> 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
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050228173156.GA68693>