0%

Binary packages of Fio often don’t come with rado and rbd ioengine. In order to use such ioengine to test Ceph, you need to compile the fio on your own. Below are step by step instructions to build it.

  1. Clond source code
    clone the source code and check out to the specific version you want to compile. (I used fio-3.27)
    1
    2
    git clone git://git.kernel.dk/fio.git
    git checkout fio-3.27
  1. Install dependecy library and compile
    1
    2
    3
    4
    5
    6
    7
    8
    9
    apt install -y librbd-dev
    rados=yes ./configure

    #you should be able to see in the log
    # Rados engine yes
    # Rados Block Device engine yes

    rados=yes sudo make
    rados=yes sudo make install
  1. Verify
    you should be able to see rados and rbd after installation,
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    $ sudo fio --enghelp
    Available IO engines:
    cpuio
    mmap
    sync
    psync
    vsync
    pvsync
    pvsync2
    null
    net
    netsplice
    ftruncate
    filecreate
    filestat
    filedelete
    posixaio
    falloc
    e4defrag
    splice
    mtd
    sg
    io_uring
    libaio
    rados <<<<<<<
    rbd <<<<<<<

you now run rados ioengine to benchmark Ceph

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# rados.fio
# config file for fio job
[global]
#logging
#write_iops_log=write_iops_log
#write_bw_log=write_bw_log
#write_lat_log=write_lat_log
ioengine=rados
clientname=admin
pool=rados-behnch
#busy_poll=0
rw=randrw
rwmixread=10
bs=1m

[rbd_iodepth32]
iodepth=32
size=12800m

and then execute fio

1
sudo fio rados.fio

x11vnc is a Vitrutal Netowrk Computing service. It provides real display to remotely control another computer.

I have a PC with Ubuntu 19.04 but only want to use it remotely while keep its remote desktop environment accessibility. During this procedure, I have faced many issues but found rare information regarding Ubuntu 19.04. After I figured it out, I decided to write this article for those who are also troubled as I was.

Install X11VNC

1
sudo apt install x11vnc

create password (the following command create a encrpted password for the client to access the server )
The encryted password will be stored in the user folder.

1
x11vnc -storepasswd

You can then test x11vnc service by running following command.

1
2
3
x11vnc -create -xkb -display :0 -noxrecord -noxfixes -noxdamage -rfbauth /home/$username/.vnc/passwd -usepw
# -usepw: enable password authentication
# -rfbauth: specify the encrypted password file

Display Manager Change

Since Ubuntu 19.04 use gdm3 for display manager ( to display login interface), which has some problem with x11vnc and I found no solution online, I then changed display manager to lightdm by using following command.

1
sudo dpkg-reconfigure gdm3

You can change it to lightdm in the interface.

Start x11vnc on Boot

Afterwards, in order to make the x11vnc on boot, we need make it a service by creating this file to /etc/systemd/system/x11vnc.service.

1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
Description="x11vnc"
Requires=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/x11vnc -create -xkb -display :0 -noxrecord -noxfixes -noxdamage -o /var/log/x11vnc.log -rfbauth /home/diskun/.vnc/passwd -usepw -auth guess -forever
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
Restart-sec=200

[Install]
WantedBy=multi-user.target

ExecStart is the command we wanna execute. There are some new paramters.

-o /var/log/x11vnc.log : specify the log file path

-auth guess : let x11vnc autmatically determin display manager path on startup. Without this parameter, x11vnc has problem to execute before login

-forever: Keep listening for more connections rather than exiting as soon as the first client(s) disconnect.

1
2
3
4
5
6
7
8
9
10
11
# create the file
sudo vi /etc/systemd/system/x11vnc.service
# reload configuration
sudo systemctl daemon-reload
# test the service
sudo systemctl start x11vnc
# you can test the service by
sudo systemctl status x11vnc
# or login from other computer by vnc service
# if it works well, make it run on startup
sudo systemctl enable x11vnc

Connect Remotely

You can then connect your Ubuntu 19.04 remotely. In Mac OS, you can easily connect by open Finder and press CMD + K to open connect server promp and paste folllowing such kind of url:

1
vnc://192.168.2.142:5900

vnc is the protocal to be used;
192.168.2.142 is the address of your ubuntu server;
5900 is the port to your x11vnc service run on.

Hope this can help solve your problem:D

References