3

We're currently working on a virtualization setup, and because of features like being able to grow volumes on our filers rather than having to go through the process resizing block devices etc. we'd like to use NFS volumes for everything, essentially, rather than exposing "block devices" through iSCSI or similar technologies.

This does however pose a little problem, as file system caching suffers quite a lot, as we cannot find a way to instruct the Linux NFS driver to treat an NFS volume as a block device in terms of caching. I know this is sort of counter intuitive as to what NFS was designed for, but I'm wondering if there's any known way, without using for example CacheFS, to make the NFS client believe that it has exclusive accesss to the volume and thus can freely cache as much in virtual memory as it wants? We can technically guarantee this exclusivity, so it's just a question of making the client believe us, essentially ;)

For the record all hosts are running Linux using kernel version 3.2 on a Xen hypervisor likewise running on a version 3.2 kernel.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
Nick Bruun
  • 63
  • 1
  • 4
  • On any storage device that's worthwhile, resizing volumes presented via iSCSI or FC is dead simple. Is that the only problem that you're trying to avoid? – MDMarra May 30 '12 at 10:38
  • Not the only one. Deduplication is fair more trivial using NFS, too. – Nick Bruun May 30 '12 at 10:40
  • 2
    That depends entirely on your storage array. – MDMarra May 30 '12 at 11:26
  • That is correct, yet the abilities that NFS give solve a lot of problems in terms of support and the necessary level of knowledge required of clients. – Nick Bruun May 30 '12 at 11:45
  • 2
    I really don't know what your business requirements are, but iSCSI is dead simple. Instead of trying to shoehorn block behavior into non-block storage, maybe you should take a good hard look at *why* you're actually using NFS and strongly consider iSCSI again. – MDMarra May 30 '12 at 12:57
  • Oracle Linux has dm-nfs which does exactly this, but as it's never been accepted upstream and doesn't seem to be maintained for current kernels I'd be hesitant to use it. As has already been mentioned, iSCSI is a much more appropriate solution for this case. – Michael Hampton Mar 27 '15 at 03:14

1 Answers1

4

Virtualization on NFS is a well established technology. There are benefits and disadvantages to NFS and block, but you can't pick and choose them. Deduplication, volume resizing, and thin provisioning on block devices are all mature technologies that work fine. Same for NFS.

Basil
  • 8,851
  • 3
  • 38
  • 73