From: Dmitry Surrentchick <grproject@mtu-net.ru>
To: "sisyphus@altlinux.ru" <sisyphus@altlinux.ru>
Subject: [sisyphus] MySQL симлинк на бд (патч)
Date: Sat, 28 May 2005 06:57:55 +0400
Message-ID: <20050528025755.GA5946@server.conceptio> (raw)
Здравствуйте.
(MySQL-server-4.0.24, alt)
Понадобилось вынести одну большую бд на отдельный винт.
Т.е. надо сделать:
/var/lib/mysql/db
|-db1
|-db2
|-~db3 (это симлинк вообще на др. винт)
В доках говорится, что по умолчанию такой поддержки нету... В смысле,
олписана такая ситуация в документации на MySQL, в разделе 7.6.1.1 Using
Symbolic Links for Databases on Unix. Объясняется также, почему именно
(чтоб в одну и ту же залинкованную базу нельзя было писать одновременно,
вроде, так я понял). В общем, надо пересобрать её с правками в коде.
Говорится также, что и как менять:
===
file to modify depends on your version of MySQL. For MySQL 4.0 and up, look
for the following statement in the `mysys/my_symlink.c'
if (!(MyFlags & MY_RESOLVE_LINK) ||
(!lstat(filename,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
Before MySQL 4.0, look for this statement in the `mysys/mf_format.c'
if (flag & 32 || (!lstat(to,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
Change the statement to this:
if (1)
===
Подскажите, я не понял, с предметом не очень знаком, - менять, что на
что? Просто вместо if (бла-бла))) написать if (1)? Т.е. просто убрать
эти две строчки (для >4.0) м вместо них написать if (1)?
Я сделал патч. Вот он (diff -u ...):
########################################################################
--- mysys/my_symlink.c.orig 2005-05-28 04:09:29 +0400
+++ mysys/my_symlink.c 2005-05-28 04:11:14 +0400
@@ -113,8 +113,7 @@
struct stat stat_buff;
DBUG_ENTER("my_realpath");
- if (!(MyFlags & MY_RESOLVE_LINK) ||
- (!lstat(filename,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
+ if (1)
{
char *ptr;
DBUG_PRINT("info",("executing realpath"));
########################################################################
Т.е., вот последовательно, что делал:
1) Положил этот патч в ~/RPM/SOURCES
1) Прописал его в спеке:
а) в строке 40 добавил:
Patch11: mysql-4.0.24-alt-symlink_db.patch
б) в строке 286 добавил:
%patch11
2) Пересобрал, поставил...........
Не работает. Базу под симлинком не видит. Помогите.
P.S. Может, я вообще из самой документации чего-то не понял?.. Да, и насчёт
чрута. Симлинк я делал и база на базу в datadir каталоге. Тоже не видит.
*/_С yважением, Dmitry_/*
next reply other threads:[~2005-05-28 2:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-28 2:57 Dmitry Surrentchick [this message]
2005-05-28 4:15 ` tma
2005-05-28 13:13 ` Dmitry Surrentchick
2005-05-28 13:32 ` [sisyphus] MySQL симлин к " Eugene Ostapets
2005-05-28 20:33 ` Sergey
2005-05-28 22:35 ` Dmitry Surrentchick
2005-05-29 15:30 ` [sisyphus] " Michael Shigorin
2005-05-29 23:19 ` Dmitry Surrentchick
2005-05-29 23:41 ` Dmitry Surrentchick
2005-05-30 11:39 ` Michael Shigorin
2005-05-28 22:53 ` [sisyphus] " Dmitry V. Levin
2005-05-30 11:44 ` [sisyphus] MySQL симлинк " ABATAPA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050528025755.GA5946@server.conceptio \
--to=grproject@mtu-net.ru \
--cc=sisyphus@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git