I have bunch of XEN virtual machines.

I want to share few partitions that are on different drive.

At first I was thinking of using "disk" variables in configuration file, but xen manual states:

disk - List of block devices to export to the domain e.g. disk = [ 'phy:hda1,sda1,r' ] exports physical device /dev/hda1 to the domain as /dev/sda1 with read-only access. Exporting a disk read-write which is currently mounted is dangerous - if you are certain you wish to do this, you can specify w! as the mode.

Other option would set NFS server on Xen host and mount share from guest.

Which of the options is better?

Is it ok to store MySQL files on NFS share?


NFS is better, if you wish to access the partitions from the host or another virtual machine. Barring a cluster file system with a cluster lock manager, mounting the same filesystem via the raw block device on multiple hosts inevitably leads to corruption. However, if you intend to dedicate a partition to a single virtual machine only, direct access will likely have lower overhead.

And yes, MySQL can be run over NFS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.