Open schoebel opened 3 years ago
Hi,
thank you for your response. It is working now on my 5.4.114 build.
Hi, thank you for your continued porting and maintaining efforts.
I just want to report that I compiled and installed on a fresh new Debian 10.9, kernel version 4.19.181 from debian sources, using mars0.1astable128, x86_64, and it works, it is now replicating.
Tobias, I see that now there is mars0.1astable129, beside the 128->129 increment please tell us if I used the "right" branch/tag.
I also compiled Debian 9.13 kernel, 4.9.258, with mars0.1astable129 (I had to update mars on existing cluster members with debian 9), patches applied with some offset but everything OK.
The rest of this post could be of interest to who is about to do the same, including people googling for "compile mars kernel on debian 10".
This is what I did:
cd /usr/local/src rm -rf linux* mars* apt-get install linux-source-4.19 tar xaf /usr/src/linux-source-4.19.tar.xz cd linux-source-4.19/ cp /boot/config-4.19.0-16-amd64 .config make olddefconfig make kernelversion # The version usually has a nonzero third number, I went on anyway cd .. # this was the last tag 0.1astableX at the times, today I would use 129: wget https://github.com/schoebel/mars/archive/refs/tags/mars0.1astable128.zip unzip mars0.1astable128.zip mv mars-mars0.1astable128 linux-source-4.19/block/mars cd linux-source-4.19/ # All three patches went through without errors nor offsets patch -p1 < block/mars/pre-patches/vanilla-4.19/0001-mars-v2-minimum-pre-patch-for-mars.patch patch -p1 < block/mars/pre-patches/vanilla-4.19/0001-mars-SPECIAL-for-in-tree-build.patch patch -p1 < block/mars/pre-patches/vanilla-4.19/0001-sched-wait-fix-endless-kthread-loop-at-timeout.patch make clean # Now it will ask you questions, enable MARS as a module, leave all MARS settings at defaults: make oldconfig mkdir -p debian/certs cat > debian/certs/debian-uefi-certs.pem
And pasted this:
-----BEGIN CERTIFICATE----- MIIDnjCCAoagAwIBAgIRAO1UodWvh0iUjZ+JMu6cfDQwDQYJKoZIhvcNAQELBQAw IDEeMBwGA1UEAxMVRGViaWFuIFNlY3VyZSBCb290IENBMB4XDTE2MDgxNjE4MDkx OFoXDTQ2MDgwOTE4MDkxOFowIDEeMBwGA1UEAxMVRGViaWFuIFNlY3VyZSBCb290 IENBMIIBIjANBgkqhkiG9w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ICATE----- MIIC/DCCAeSgAwIBAgIFAKdGje8wDQYJKoZIhvcNAQELBQAwIDEeMBwGA1UEAxMV RGViaWFuIFNlY3VyZSBCb290IENBMB4XDTE2MDgxNjE4MjI1MFoXDTI2MDgxNjE4 MjI1MFowJDEiMCAGA1UEAxMZRGViaWFuIFNlY3VyZSBCb290IFNpZ25lcjCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANPRg5AP2mWiLwdaYJXr98eGfCCG 2mWjphLrWzvOyPs/oXJLnt9QxQMzpAwrX9ZBBA22z5VI7YqyrdblATdOYM2ySjgE s0SAlK+fblTbqB88t0sw3iGBbwmjZrpqK5bWmmF3DNTtPNBxu62M8CJcPiXMbSIu YZeVr5suTVi2fngCww65+rJbJ959or4MFKxz7JewFV7t7eWldT944HHOL86D7VMx MJhO5vkBooiIpiMIfA23VDoWle1eeV6QTv7Nqt6C/PaWcU5JSbnT6bCrf9cqR7dT MCd83GaYCW/RfvV/PT7UomqIWQIvLz3IxijeQv7ZUj0kwvxAmBH2dr+Mu2UCAwEA AaM5MDcwEQYJYIZIAYb4QgEBBAQDAgQQMBUGA1UdJQQOMAwGCisGAQQBgjcKAwEw CwYDVR0PBAQDAgeAMA0GCSqGSIb3DQEBCwUAA4IBAQBXG6RgTCnp8n1rXJPbzGyf GD9pSJp13mTzg0oJqSYh7ulWXeE+2XXLzH+/TeToiT1+EUKHQMPV4HF53ABs4XFi x5jCyycLL5/M7PqLsvMLnvPyw8mf2yWTkKTNuwHljvTXVai0dUEx/U5dAxigwqzF 3kbn3BzPEtWd6Eedk4wyzUTVdMcwmlelVtB+zwURtPTzKfnbm1PSvS+tanUmRWS6 uiiWh4638HlX+noOPEo4krzylfLnKND32JgaXjmetWWAvfPaEj9Qdmcpn9ELCh6H l1xy2/MBdErdB7p26Wr83SLbRgLXrwrF7RW8Dyup242/f2+torfFTUpHs8FWkLYX -----END CERTIFICATE-----
Then I compiled:
# Again, tag it with the actual version you downloaded time make deb-pkg LOCALVERSION=-mars0.1astable128 KDEB_PKGVERSION=$(make kernelversion)-4 # It took about two hours on my notebook ls -lh *.deb -rw-r--r-- 1 root root 11M Apr 22 23:32 linux-headers-4.19.181-mars0.1astable128_4.19.181-4_amd64.deb -rw-r--r-- 1 root root 664M Apr 22 23:53 linux-image-4.19.181-mars0.1astable128-dbg_4.19.181-4_amd64.deb -rw-r--r-- 1 root root 46M Apr 22 23:34 linux-image-4.19.181-mars0.1astable128_4.19.181-4_amd64.deb -rw-r--r-- 1 root root 992K Apr 22 23:32 linux-libc-dev_4.19.181-4_amd64.deb
I copied the .deb on the target system and installed them with "dpkg --install .deb"
Rebooted, mounted /mars, copied marsadm, marsadm.8 and cron.d/mars. I did not configure systemd since in my specific setup we need manual startup at boot. Joined cluster and resources.
Hope this helps, Bergonz
@subbergunz
Hi, could you please share with us, what does look like your disks/raid/partition/lvm/fs setup?
Thanks
Sure, in this fresh debian 10 server I have four SSD disks, nvme[0-3]n1. 0 and 1 have a single partition in softraid as md3, md3 is encrypted with cryptsetup, the content is a PV of the "vm" VG. In this VG the LV's are the block devices "under" mars, one mars resource each. Today I have just two VMs, named p2 and p3.
nvme0n1 259:0 0 953.9G 0 disk `-nvme0n1p1 259:2 0 953.9G 0 part `-md3 9:3 0 953.8G 0 raid1 `-vmpv 253:4 0 953.7G 0 crypt |-vm-undermars--p2 253:6 0 12G 0 lvm `-vm-undermars--p3 253:7 0 12G 0 lvm # the same for nvme1n1 # mars devices do not appear with correct dependencies in lsblk, here # we "marsadm create-resource p2 /dev/vm/undermars-p2" and so on
nvme2 and 3 have two partitions, the first is in softraid as md0 for /boot, the second is in softraid as md1 with a PV of the "vg0" VG, where the "root" LV is the root FS. In the same VG, the LV "encmars" is encrypted, once decrypted it is mounted as /mars.
nvme2n1 259:3 0 477G 0 disk |-nvme2n1p1 259:6 0 512M 0 part | `-md0 9:0 0 511M 0 raid1 /boot `-nvme2n1p2 259:7 0 476.4G 0 part `-md1 9:1 0 476.3G 0 raid1 |-vg0-root 253:0 0 32G 0 lvm / |-vg0-encmars 253:1 0 64G 0 lvm `-mars 253:5 0 64G 0 crypt /mars # the same for nvme3n1
Startup cannot be automated because we choosed to avoid storing the keys in the server itself, so at boot we have to manually input them in order to open md1 and md3. Since the server needs manual intervention at boot anyway, we didn't bother to trigger everything in systemd, and simply wrote the procedure in /etc/motd for the on-call admin.
We choosed to encrypt both /mars and the devices under mars, so each write has to be encrypted twice and decrypted once. This is the price we pay for having both permanent and temporary data encrypted on disk.
This is a server we rent as a root bare metal from a provider, it is increasingly difficult to rent a server with four physical disks of the size we need for such a setup.
Hope this helps, Bergonz
Hi,
somebody asked a question that the new pre-patches (with version v2 in their name) are not reported correctly by "modinfo mars".
I cannot find the question anymore.
Anyway, here is the answer: I just pushed WIP-next-release which should fix the report string of "modinfo mars".
Please give feedback if it works for your build environment.
Cheers,
Thomas