[BlueOnyx:00199] Re: Third party software
Michael Stauber
mstauber at blueonyx.it
Wed Jan 14 11:24:21 -05 2009
Hi Stephanie,
> While I'm here may I also suggest we may want to change the group on a
> site's database files (e.g. the container directory and all files within)
> with ownership mysql (as it is now) and the group of sitexxx to match the
> owning site. This means the disk usage of the database will be included in
> the site quota. I do this manually (yuck) for mysql users.
Hmmm ... now that's actually a nice idea. I'll take a look into that.
> Also (just thought of it, so haven't looked yet) doesn't mySQL by default
> put databases in /var/mysql or similar?
Correct. The MySQL databases are typically under /var/lib/mysql/, however, the
installer on the BlueOnyx CD moves that to /home/mysql/ and puts a symlink in
place between /var/lib/mysql and /home/mysql/
This is done to conserve space on /var.
Back on the BlueQuartz list somene once suggested moving the MySQL databases
of a site entirely into the home directory of a site.
This serves two purposes:
1.) The database(s) are then also subtracting from the sites disk quota
2.) Databases get migrated through CMU, too.
However, that (2) is a bit tricky. Yes, CMU will then also move the database
files, but it won't migrate the symbolic links in /var/lib/mysql/
or /home/mysql.
Problems with that:
- If you import an SQL dump, those symlinks get toasted anyway when the
database is dropped.
- If a site is deleted the symlinks need to be deteled as well.
- If you create a site with a database, the database files need to be moved
and the symlinks need to be created. For that MySQL *must* be halted briefly.
Don't really like that, as it can have a broad impact on all sites on the
server.
- When you run CMUexport while MySQL is running and data is written to the
sites MySQL database, you risk database corruptions in the MySQL files you're
backing up. That's (in my eyes) a real show stopper.
So all in all the easiest (and possibly the most sensible approach) would be
to simply leave the databases where they are by default, but to chown them to
the GID of the site in question, so that they're attributed to the quota of
that site.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list