X-Git-Url: http://git.tuebingen.mpg.de/?p=aple.git;a=blobdiff_plain;f=LVM.m4;h=bf130769e1ccf4e73513c292de25f47bcc59ab32;hp=b02556a9193c88f3afe72cf2853500778cf25817;hb=HEAD;hpb=e9a3585174e0fda1ac580d0e720f7ecc48bb9e9f;ds=sidebyside diff --git a/LVM.m4 b/LVM.m4 index b02556a..959d4ce 100644 --- a/LVM.m4 +++ b/LVM.m4 @@ -60,21 +60,18 @@ they can be submitted as a unit for performance reasons. The thusly processed bios then form an I/O request which is handed to an I/O scheduler (also known as elevator).

-

At this time of writing (2018-11) there exist two different sets -of schedulers: the traditional single-queue schedulers and the -modern multi-queue schedulers, which are expected to replace the -single-queue schedulers soon. The three single-queue schedulers, -noop, deadline and cfq (complete fair queueing), were designed for -rotating disks. They reorder requests with the aim to minimize seek -time. The newer multi-queue schedulers, mq-deadline, kyber, and bfq -(budget fair queueing), aim to max out even the fastest devices. As -implied by the name "multi-queue", they implement several request -queues, the number of which depends on the hardware in use. This -has become necessary because modern storage hardware allows multiple -requests to be submitted in parallel from different CPUs. Moreover, -with many CPUs the locking overhead required to put a request into -a queue increases. Per-CPU queues allow for per-CPU locks, which -decreases queue lock contention.

+

Traditionally, the schedulers were designed for rotating disks. +They implemented a single request queue and reordered the queued +I/O requests with the aim to minimize disk seek times. The newer +multi-queue schedulers mq-deadline, kyber, and bfq (budget fair +queueing) aim to max out even the fastest devices. As implied by +the name "multi-queue", they implement several request queues, +the number of which depends on the hardware in use. This has become +necessary because modern storage hardware allows multiple requests +to be submitted in parallel from different CPUs. Moreover, with many +CPUs the locking overhead required to put a request into a queue +increases. Per-CPU queues allow for per-CPU locks, which decreases +queue lock contention.

We will take a look at some aspects of the Linux block layer and on the various I/O schedulers. An exercise on loop devices enables the @@ -410,14 +407,13 @@ one PV to different PVs in the same VG. SECTION(«LVM Snapshots») -

LVM snapshots are based on the CoW optimization -strategy described earlier in the chapter on Unix -Concepts. Creating a snapshot means to create a CoW table of -the given size. Just before a LE of a snapshotted LV is about to be -written to, its contents are copied to a free slot in the CoW -table. This preserves an old version of the LV, the snapshot, which -can later be reconstructed by overlaying the CoW table atop the LV. +

LVM snapshots are based on the CoW optimization strategy described +earlier in the chapter on Unix +Concepts. Creating a snapshot means to create a CoW table of the +given size. Just before a LE of a snapshotted LV is about to be written +to, its contents are copied to a free slot in the CoW table. This +preserves an old version of the LV, the snapshot, which can later be +reconstructed by overlaying the CoW table atop the LV.

Snapshots can be taken from a LV which contains a mounted file system, while applications are actively modifying files. Without coordination @@ -838,12 +834,12 @@ EXERCISES() target_args. Determine the correct values for the first three arguments to encrypt /dev/loop0. -

  • The target_args for the dm-crypt target are - of the form cipher key iv_offset device offset. To - encrypt /dev/loop0 with AES-256, cipher - is aes, device is /dev/loop0 and both - offsets are zero. Come up with an idea to create a 256 bit key from - a passphrase.
  • +
  • The target_args for the dm-crypt target are + of the form cipher key iv_offset device offset. To + encrypt /dev/loop0 with AES-256, cipher + is aes, device is /dev/loop0 + and both offsets are zero. Come up with an idea to create a 256 bit + key from a passphrase.
  • The create subcommand of dmsetup(8) creates a device from the given table. Run a command of