We have an Active/Passive topology where there are two x86 complexes with a shared raw storage, where only one of the nodes in a given moment has an access to the shared storage (AKA the active node). In case of a a failover in the active node, the passive node initiates a take over and becomes the active node with an access to the shared storage. Each node has its own boot device storage with a filesystem. However, the shared storage cannot have a filesystem mounted on it.
We are interested in installing MySQL on both nodes, where its data resides in the shared storage and only the active node is running the server.
MySQL with InnoDB is capable of running on a raw device, and there is also a guide on how to run MySQL over a cluster similar to our topology. However, in the second example, they do have a filesystem mounted on the shared storage. The filesystem issue raises a major concern:
ib_logfile* still require a file system. So the raw MySQL feature is not exactly fully raw. Please correct me if I'm mistaken. Is there a workaround to store those files in the raw storage? We can save the redo logs (ib_logfile0
, ib_logfile1
) in the node's boot device and always delete those files before the server is starting (So we won't have old logfiles in case of multiple failovers). However, this might lead to uncommitted transaction to be partially committed in case of a failure in a middle of a transaction, thus contradicting the whole idea of transactions.
Are there any more files/features that might affect the behaviour of mysql in this topology?
Best Answer
It's worth noting that InnoDB's write ahead log (WAL), the ib_logfile*, is not the only thing that will need a file system. You have:
/<datadir>/<schema>/
)All of the above are typically within the data directory, so as long as you have
datadir=/some/valid/fs/path
-- that's also replicated (e.g. DRBD) or shared (e.g. NFS, GFS, OCFS) between the two nodes -- then you'll be fine.It's worth noting that the .frm, .par, .trn, .trg, and .opt files will go away with the new Data Dictionary.
Stay tuned for some big announcements there in the coming months! :)
It's not clear to me why you're using the RAW device? I'm sure you have your reasons though. :)
Good luck!