Hi,
On Mon, 19 Jul 1999 sinisa@stripped wrote:
> Paul DuBois writes:
> > >Paul DuBois writes:
> > > > >Paul DuBois writes:
> > > > > > This is a followup on the recent discussion about moving a
> database
> > > > > > directory out of the data directory and then putting a
> symlink to
> > > > > > the new location in the data directory.
> > > > > >
> > > > > > There *is* one problem with this that I forgot about.
> There is
> > > > > > no problem using the database, but in pre-3.23 versions of
> MySQL,
> > > > > > if you execute DROP DATABASE, MySQL will remove all the
> files in the
> > > > > > database, then give an error when it tries to remove the
> database
> > > > > > directory. This fails because the "directory" is really a
> symlink.
> > > > > > You must fix things up manually yourself.
> > > > > >
> > > > > > This problem is fixed in MySQL 3.23.
> > > > > >
> > > > > > Fix for pre-3.23 MySQL: don't drop the database. :-)
> > > > >
> > > > >Paul my friend,
> > > > >
> > > > >
> > > > >Who said to use symlinks. Use links ....
> > > >
> > > > Sinisa, the entire discussion was about symlinks. Can you explain
> what
> > > > you mean "use links"? It is inadvisable to hard link a directory,
> only
> > > > root can do that anyway, and what would this gain you over a
> symlink?
> > > >
> > > > --
> > > > Paul DuBois, paul@stripped
> > > >
> > >
> > >
> > >DROP DATABASE prior to 3.23.xx .......
> >
> >
> > I'm afraid your cryptic answer does not mean anything to me.
> >
> > I repeat my questions:
> >
> > Can you explain what
> > you mean "use links"? It is inadvisable to hard link a directory, only
> > root can do that anyway, and what would this gain you over a symlink?
> >
> > --
> > Paul DuBois, paul@stripped
> >
>
>
> Over a hard link you could drop databases prior to 3.23.xx, without
> additional labour ...
>
> My answers are not cryptic, but sometimes when I write to a
> connausseur like you, I write short messages !!
>
A hard link on a directory is at least dangerous if possible at all.
On many Unices it doesn't work (tried it on AIX, FreeBSD, Linux, Solaris).
It worked on SunOS 4, but there were problems with unlinking such a thing
or even fsck. I wouldn't do something like find . -print | cpio ... if
there was a hard link on a directory somewhere ;-)
In this case: why do you want a hard link? I think the only reason to put
database directories out of the main data directory is disk space. And a
hard link needs to be on the same disk slice, so you gain nothing. A
symlink is the only way.
Cheers,
Michael
--
Michael Hase Six Offene Systeme GmbH
michael@stripped Sielminger Str. 63
http://www.six.de 70771 Leinfelden-Echterdingen
phone +49 711 99091 62 Germany