📜 ⬆️ ⬇️

POHMELFS: NFS in a new way

Those who followed the kernel updates may have noticed that POHMELFS support was added to release 2.6.30.
What is it - Hangover file?
The study of the vicinity of the project page suggested that the development of the FS is carried out by Moscow programmer Yevgeny Polyakov (and only he!), Who has many other interesting projects on the same site, such as the CARP port for Linux . In general, the impression was that the programmer was extremely competent and stubborn.
Let's go back to PohmelFS . The Wikipedia article confirms the hangover's involvement in the name, which for the sake of decency stands for Parallel Optimized Host Message Exchange Layered File System . The documentation on the project’s page indicates that in the future, PohmelFS is a distributed FS with redundancy, access control and other delights, developed so as not to lag much behind the performance of local FSs. A sort of alternative to a variety of GFS, GlusterFS and other Coda. But all this will be after the integration of the project with two others - DST and Elliptics . At the moment, PohmelFS is an alternative to the old bad NFS, which shows better performance ( pruflink ) almost everywhere.

under habrakat process of adjustment on a small zoo

A new thing, unknown, how to use it - no one really knows. I found a single howto on the web, and that is not very clever. Therefore, here I publish a literate (in my opinion) method of elementary customization.

The first thing to do is download the 2.6.30 kernel sources and build the kernel with the pohmelfs module. At the time of publication, the driver had staging status, therefore its inclusion in the menuconfig is nontrivial. You need to turn on the Device Drivers -> Staging drivers option and turn off Device Drivers -> Staging drivers -> Exclude Staging drivers from being built , after which you can enable POHMELFS, which is also there.
It should be noted that the kernel needs to be updated only on the client. The server part works in userspace.
')
The second thing that is needed for the FS to work is the userspace utilities and server. It is necessary to compile the source. I downloaded the latest snapshot pohmelfs-server.git from here. To those who will do the same, I’ll tell you that the snapshots are distributed in the format tar.bz2, which you need to know if you don’t know.
Unpack, read README, put /usr/src/linux/drivers/staging/pohmelfs/netfs.h where it recommends the beginning of the README, that is, /usr/src/linux/fs/pohmelfs/netfs.h (this is very important , because there is no place to take this file on the server, but to build the server it is necessary). Carefully, the path to the sources of the kernel may be different. Thereafter
$ ./autogen.sh
$ ./configure

The autogen can complain about anything, it is treated in an obvious way.
But configure under Gentoo swore at the impossibility of finding POHMELFS inclusions, and only when reading the log it turned out that the problem was not really in netfs.h, but in bitsperlong.h, which he had not found for some unknown reason . I had to configure it like this:
$ CPPFLAGS=-I/usr/src/linux-2.6.30-git18/arch/x86/include ./configure --with-kdir-path=/usr/src/linux
Then you can do make, then he will collect everything he can. I went the other way.
On the server, the build and installation looked like this:
$ cd server; make
# cp fserver /usr/local/sbin

On the client, in turn:
$ cd cfg; make; cd ../utils; make; cd ..
# cp cfg/cfg /usr/local/sbin/pohmelcfg; cp utils/flush /usr/local/sbin/pohmelflush

This is an important deviation from the Makefile, since now only the server part is installed on the server, and only the client part on the client, and so far unnecessary inclusions are not installed at all. Client binaries have also been renamed into more understandable names, since, for example, “cfg” does not say that it only configures pohmelfs.
User space utilities successfully assembled on both Gentoo x86_64 and Arch Linux i686.

The moment of truth comes. Run!
First, run the server part. fserver works in the foreground, so first we do it like this:
# /usr/local/sbin/fserver -a 192.168.1.10 -r /mnt/HD_a2/ -w5 2>&1 >>/var/log/fserver.log &
(Substitute the desired parameters, -w is the number of worker processes)

Further - setup and mounting of FS on the client.
# modprobe pohmelfs
# pohmelcfg -A add -a 192.168.1.10 -p 1025 -i 1
# mount -t pohmel -o idx=1 /mnt/pohmel

Here, -i for cfg and idx = for mount should be the same, the default is 0. As I understand it, this is just the ID of the installed rack.

My server and client launch did not cause any difficulties, it all worked right away.
Small performance test (700MB file):
stolen@stolen ~/soft/pohmelfs-server.git $ time cat /mnt/pohmel/share/GRTMPVOL_RU_20.10.08.iso >/dev/null
real 1m37.150s
user 0m0.010s
sys 0m1.270s

stolen@stolen ~/soft/pohmelfs-server.git $ time cat /mnt/pohmel/share/GRTMPVOL_RU_20.10.08.iso >/dev/null
real 0m0.591s
user 0m0.003s
sys 0m0.257s

stolen@stolen ~/soft/pohmelfs-server.git $ time cat /mnt/upload/share/GRTMPVOL_RU_20.10.08.iso >/dev/null
real 1m3.719s
user 0m0.003s
sys 0m0.400s

The third is NFS, a little winning on reading. By recording 100MB POHMELFS was 10 times faster, apparently due to background I / O.

Source: https://habr.com/ru/post/62685/


All Articles