From owner-freebsd-questions@FreeBSD.ORG Mon Feb 28 17:15:33 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 4117C16A4CF for ; Mon, 28 Feb 2005 17:15:33 +0000 (GMT) Received: from fed1rmmtao12.cox.net (fed1rmmtao12.cox.net [68.230.241.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE98043D46 for ; Mon, 28 Feb 2005 17:15:32 +0000 (GMT) (envelope-from glightsey1@cox.net) Received: from geraldligh ([68.7.148.88]) by fed1rmmtao12.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050228171532.CDFO13819.fed1rmmtao12.cox.net@geraldligh> for ; Mon, 28 Feb 2005 12:15:32 -0500 From: "Gerald Lightsey" To: Date: Mon, 28 Feb 2005 09:15:23 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcUduRaW2gXpcSE4SViAFrcUmdL2qA== Message-Id: <20050228171532.CDFO13819.fed1rmmtao12.cox.net@geraldligh> Subject: What am I doing wrong with MOUNT? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 17:15:33 -0000 Posted last night to newbies -(my mistake) I'm brand new to FreeBSD and Unix world in general. My son has an internet site supported by FreeBSD that uses MySQL. I have set up a FreeBSD version 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 copy 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. 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 thought 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 under $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 expected. 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. I mounted the new drive 1 to a temporary mount point and used the cp command 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 appeared 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 database. Again, just like it did originally, after several minutes of creating tables the system reported that it had run out of space. 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? Thanks, Gerald