Bug 69399

Summary: mysql-server ports use ridiculous layout
Product: Ports & Packages Reporter: Dan Mahoney <danm>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Dan Mahoney 2004-07-22 01:00:41 UTC
FreeBSD by default installs a very small /var partition for the user.  This small partition is used not only for mail, and 
logs (both of which can grow on occasion without warning), but the mysql-server port uses this location as the default 
location for all databases.  Additionally, the /var/tmp directory is used

Fix: 

The "fix" is something like:

mkdir /usr/var
cd /var
cp db /usr/var
ln -s /usr/var/db
cp tmp /usr/var
ln -s /usr/var/tmp

However, it's generally my opinion that at least a WARNING or something should be printed, as the default table types 
(especially InnoDB) tend to grow by fairly large increments.

Either an alternate location needs to be found for "big" semi-permanent files (/var is for mainly transient files -- it's not 
supposed to be a huge earth-shattering disaster if you lose /var), or that partition needs to be defaulted to something a lot 
bigger.
How-To-Repeat: 
cd /usr/ports/mysql40-server
make install

let logs and/or mail run for a while (especially easy if you've also installed apache from ports), as the apache logs are 
written to /var/log with no rotation.

Watch your tables corrupt themselves and mysql die with error 28 from the table handler.
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-22 22:33:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer, but I think this PR is bogus.
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2004-07-22 22:41:41 UTC
State Changed
From-To: open->closed

Bogus. Suggestion: don't use symbolink link, use DB_DIR for speed :)