This symbolism is already well known, so it makes no sense to explain in detail what kind of animal it is .
There will be no comparison with LVM , for it is possible, but meaningless, to compare a muscle-car with a jet-truck.
Graphics and comics are also not delivered.
It is, let's say, an unfinished success story, because the upgrade by which it was caused can only be stopped, but not completed.
Practically in every IT family there are several PCs and / or laptops, for sure there is an HTPC or even a NAS. So we had two PCs, then a large wall monitor was added, and in this situation the birth of the HTPC is a matter of time. When he was born, he was immediately named a proud name - Server. Later it turned out that some of the favorite games can do in Linux - and the Server immediately got a Steam account.
So a few years passed, during which the Server received 16GB of memory, virtuals with gitlab and projects appeared on it ...
And then the understanding came that an upgrade is brewing, and upgrading 3 PCs at once is too expensive; At the same time, there was already a successful experience with PCIE-passthrough and a virtual virtual machine.
A suitable solution was the gradual migration of gaming machines to virtuals. While only one is emigrated, in the future, under the guest, I will mean it.
Of the three processors (i3-3220, i5-3470, i5- 3470K), VT-d supported only the second, and it went to the Server instead of i3. A low-profile 1050Ti was bought to replace the 7970, and the old iron was sold in parts.
The server received the latest UEFI-firmware, Ubuntu 16.04 and the largest SSD available - Crucial M4, 256 GB, under the root pool. The installation was carried out according to this manual , from which the installation script was accumulated in the live system. Then, after a successful download, virt-manager
, libvirt-bin
, ovmf
and xubuntu-desktop
were installed. Of course, VT-x and VT-d were included.
By the way, the separation of the binary part of the system from logs, caches and other hamsters more than once helped in the process of vivisection of the system of experiments, allowing you to return the working state to a simple zfs rollback
, accessible even from initrd (but there is a feature: if you use a separate datasset for /root
, use the parameter kernel init=/bin/sh
for emergency boot; sh, unlike bash, will not create garbage at the /root
mount point).
To avoid guessing what happened, in /etc/default/grub
comment out everything related to HIDDEN_TIMEOUT
, obviously set a timeout other than 0 (I have 10), uncomment / add GRUB_TERMINAL=console
and be sure to remove quiet splash
from GRUB_CMDLINE
.
vfio-pci.ids=10de:1c82,10de:0fb9,8086:1e31
(I have the video card itself thrown, its sound and a four-port USB3 controller) and allow the use of iommu intel_iommu=on
(other parameters are intel_iommu=on
to AMD, but I will not lie for lack). Also, in order to send a video card, you will need to explicitly prohibit its use by the video driver, since nvidia was being forwarded and the proprietary driver was not installed, then for me it looks like this: modprobe.blacklist=nouveau nouveau.modeset=0
. All these parameters are written in the /etc/default/grub
file, in the GRUB_CMDLINE
line. Do not forget to run update-grub
and restart before adding guest-ready devices for probros.cpu=host
although useful, did not help. Fortunately, it was enough to use virsh edit <guestname>
, and in the <features>/<hyperv>
add the line <vendor_id state='on' value='ASUS'/>
. But in turn, libvirt from the repository (including backports) is too rotten and did not understand this parameter. After several unsuccessful attempts to build and install a more recent version, I turned to ppa, and Jacob Zimmermann found a suitable package. I recommend, having found a stable version, not to update the driver on the video card in the guest, due to the constant mutation of the business bug with forwarding.zfs create rpool/lxc
), run lxc init
, choose the type of ZFS storage, refuse to create a pool, agree to use dataset, enter the name of the dataset created a little earlier. Now they live there gitlab, samba-dc (with the key --usentvfs, a samba over 4.3 will not start), a couple of small projects.-s
key when created), the snapshot will take up as much space as the original.zdb -D <poolname>
), and DDT (deduplication table), the size of which depends directly on the number of unique blocks, should be stored in memory entirely; and this means that it is simply unprofitable to use deduplication with a small block size (except, perhaps, a virtual farm with a dedup_ratio of a much larger unit and a titanic amount of RAM). In addition, with a small block size (this applies primarily to zvol), it is impossible to use compression other than zle.zfs create -V <size> -s -b 64K <zfs path>
, adding -o dedup=on
and -o compression=lz4
as necessary.cmd
(press Shift-F10
)diskpart
, and further in itselect disk < >
select partition < >
format FS=NTFS UNIT=64K QUICK
assign LETTER=S
mkdir s:\windows
.We return to the installation wizard, update the disk configuration, select the largest partition created (with which the magic was done) and continue the installation as usual.
, 64, Windows , , - . ? , Windows-: , , , .
The easiest way was to get smb or nfs balls and create Steam libraries on them. Regular files are easily and naturally deduplicated, including both exported libraries and the Linux client library, without unnecessary gestures. As always, the most obvious solution turned out to be in principle working, but wrong. SMB in this mode moves with the speed of a notebook hard disk, despite the fact that the files are on the SSD. NFS (and Windows 8.1 supports NFS v3, not 4) moved a little faster, it felt like some kind of "green" desktop drive, but it was still too little for a comfortable game. In addition, all the operating systems from M $ love to lose network drives that are automatically connected when logon, and each time pointing Steam to the location of the library quickly get bored.
ISCSI is the solution. The targetcli
was installed on the targetcli
, configured by this manual , adjusted for blockio usage and by the form /dev/zvols/<zfs path>
. For unmap to work properly, you need to use Windows 8+ (starting with 8, unmap support for the iSCSI initiator is implemented), and set attributes emulate_3pc=1,emulate_tpu=1,emulate_caw=1,emulate_tpws=1,emulate_tas=1
for each block device. If done correctly, then deleting files and formatting should free up space and reduce the size of the zvol.
Now identical files in volumes exported for libraries take up space only once, but the Steam library for Linux still occupies a separate place. Let's create a separate dataset for this library with options -o dedup=on -o recordsize=64K
. If the sections in zvol are aligned on the 1MB border, and the cluster size is set to 64KB, then it is logical that you need to share files on the host with the same granularity so that deduplication can find the same blocks.
zfs set logbias=throughput <pool>
significantly affects performance, especially when using deduplication. Not only does this exclude an additional write-to-log / erase-log loop, it also stops the drive's write cache.Well, my little experiment ended with undeniable success, although difficulties arose on the way. Further, I would like to upgrade to Zen2, 32-64GB of memory, NVME SSD, transfer a second PC to the Server ... but this will be a completely different witch.
Source: https://habr.com/ru/post/339456/
All Articles