※当サイトの記事には、広告・プロモーションが含まれます。

LinuxでDocker ComposeとLVM(Logical Volume Management)の関係が知りたかったのだが...

nazology.kusuguru.co.jp

人体冷凍保存とは、現在の医療では治癒不可能な人体を冷凍し、未来の医療の発展を待った後で人体を解凍・治療しようという考え方です。

人類で最初に冷凍保存された男「ジェームズ・ベッドフォード」 - ナゾロジー

この解凍技術の発明がネックになっているのですが、一方で人類はすでにいくつかの人体を実際に冷凍保存しています。

人類で最初に冷凍保存された男「ジェームズ・ベッドフォード」 - ナゾロジー

そこで今回は世界で最初に冷凍保存された男「ジェームズ・ベッドフォード」について見ていきましょう。

人類で最初に冷凍保存された男「ジェームズ・ベッドフォード」 - ナゾロジー

彼は今もなお、冷凍された状態で復活の時を待っているのです。

人類で最初に冷凍保存された男「ジェームズ・ベッドフォード」 - ナゾロジー

⇧ どちらかと言うと、「冷凍」技術の方がネックになっている気がするのだが...

「細胞」を損傷せずに「冷凍」できる技術が確立できていないのに「解凍」の「技術課題」に取り組む意味は薄い気がしますかね...

いずれにせよ、莫大なコストはかかる気はしますな...

将来的に、実現方法が確立されたとて、「選民思想」に発展しそうですな...

LVM(Logical Volume Management)とは

Wikipediaによると、

論理ボリュームマネージャ(ろんりボリュームマネージャ、logical volume manager、LVM)は、「物理ボリューム」を提供するハードディスクなどのストレージメディア・デバイス(補助記憶装置)に、直接ファイルシステムをマップするのではなく、粗粒度(典型的には、メビバイト単位程度)のブロックにより一旦「論理ボリューム」と呼ばれる仮想化されたボリュームに束ねて利用するためのシステムである。

論理ボリュームマネージャ - Wikipedia

一般的な議論については、英語版のen:Logical volume managementの記事を参照のこと。この記事では、HP-UX由来で、いくつかの商用UNIXとUnix系で使われている一連の実装としてのLVMについて述べる。他のシステムでは、例えばZFSのように、分離しない形でファイルシステムの低レイヤとしてほぼ同程度の機能を持っている、という場合もある。

論理ボリュームマネージャ - Wikipedia

⇧ とありますと。「仮想化」技術の1種ということになりますと。

とりあえず、一般的な「LVM(Logical Volume Management)」については、英語版のWikipediaを参照しろとあるので、確認してみる。

Volume management represents just one of many forms of storage virtualization; its implementation takes place in a layer in the device-driver stack of an operating system (OS) (as opposed to within storage devices or in a network).

https://en.wikipedia.org/wiki/Logical_volume_management

Design

Most volume-manager implementations share the same basic design. They start with physical volumes (PVs), which can be either hard disks, hard disk partitions, or Logical Unit Numbers (LUNs) of an external storage device. Volume management treats each PV as being composed of a sequence of chunks called physical extents (PEs). Some volume managers (such as that in HP-UX and Linux) have PEs of a uniform size; others (such as that in Veritas) have variably-sized PEs that can be split and merged at will.

https://en.wikipedia.org/wiki/Logical_volume_management

⇧ とあり、「OS(Operation System)」レベルの機能ではあるらしい。

当然と言えば、当然なのだが、「ハードウェア」に該当する「論理ボリューム(PV:Physical Volume)」は必須の要素ということになるらしい。

「Phind」に質問してみたところ、以下のような回答が返ってきた。

■各要素の関係

No 要素 説明 役割 関係性
1 Physical Volume (PV) 物理ストレージデバイス 最小のストレージ単位 VGの構成要素
2 Volume Group (VG) ストレージプール PVの論理的な統合 PVを管理し、LVを作成
3 Logical Volume (LV) 論理的なブロックデバイス ファイルシステムの基盤 VGから割り当てられた領域
4 Physical Extent (PE) PV内の最小単位 実際のストレージ単位 LEと1:1でマッピング
5 Logical Extent (LE) LV内の最小単位 論理的なストレージ単位 PEと1:1でマッピング
6 File System データの構造化層 ファイルの管理 LV上に作成
7 Directory ファイルシステム内の階層 ファイルの整理 File System内に作成

 

「RHEL 7(Red Hat Enterprise Linux 7)」のドキュメントによると、

docs.redhat.com

⇧ 上記によると、「LVM(Logical Volume Management)」を実現する「パッケージ」が「LVM(Logical Volume Manager)」なるものらしい。

そして、「LVM(Logical Volume Manager)」にはバージョンが存在するらしい。

詳しいことは分からないですが、「物理ボリューム(PV:Physical Volume)」を「ボリュームグループ(VG:Volume Group)」が分類・整理して「論理ボリューム(LV:Logical Volume)」を作り出しているっぽい。

LinuxでDocker ComposeとLVM(Logical Volume Management)の関係が知りたかったのだが...

で、本題。

「WSL 2(Windows Subsystem for Linux 2)」の「Ubuntu 24.04 LTS」環境に「Docker」がインストールされていたので、「lsblk」コマンドを実施してみた。

■「WSL 2(Windows Subsystem for Linux 2)」の「Ubuntu 24.04 LTS」環境でコマンド実施

ts0818@DESKTOP-JG9SBOV:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
ts0818@DESKTOP-JG9SBOV:~$ sudo systemctl list-unit-files -t service | grep docker
[sudo] password for ts0818:
docker.service                               enabled         enabled
ts0818@DESKTOP-JG9SBOV:~$ lsblk
NAME
    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda   8:0    0 388.4M  1 disk
sdb   8:16   0   186M  1 disk
sdc   8:32   0     1G  0 disk [SWAP]
sdd   8:48   0     1T  0 disk /var/lib/docker
                              /mnt/wslg/distro
                              /
ts0818@DESKTOP-JG9SBOV:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
none            1.9G     0  1.9G   0% /usr/lib/modules/6.6.87.2-microsoft-standard-WSL2
none            1.9G  4.0K  1.9G   1% /mnt/wsl
drivers         465G   96G  370G  21% /usr/lib/wsl/drivers
/dev/sdd       1007G  4.6G  952G   1% /
none            1.9G   80K  1.9G   1% /mnt/wslg
none            1.9G     0  1.9G   0% /usr/lib/wsl/lib
rootfs          1.9G  2.7M  1.9G   1% /init
none            1.9G  540K  1.9G   1% /run
none            1.9G     0  1.9G   0% /run/lock
none            1.9G   12K  1.9G   1% /run/shm
none            1.9G   76K  1.9G   1% /mnt/wslg/versions.txt
none            1.9G   76K  1.9G   1% /mnt/wslg/doc
C:\             465G   96G  370G  21% /mnt/c
D:\             466G   13G  454G   3% /mnt/d
tmpfs           1.9G   16K  1.9G   1% /run/user/1000    

⇧ とあるように、「LVM(Logical Volume Management)」が関係しているのかが分からない...

ネットの情報を漁っていたところ、

superuser.com

⇧ 上記サイト様によりますと、「lsblk -f」で確認できるらしい。

 


で、そもそも、「LVM(Logical Volume Manager)」の「サービス」が存在しないのだが...

■「WSL 2(Windows Subsystem for Linux 2)」の「Ubuntu 24.04 LTS」環境の「サービス」一覧

ts0818@DESKTOP-JG9SBOV:~$ systemctl list-unit-files -t service
UNIT FILE                                    STATE           PRESET
apparmor.service                             enabled         enabled
apport-autoreport.service                    static          -
apport-coredump-hook@.service                static          -
apport-forward@.service                      static          -
apport.service                               enabled         enabled
apt-daily-upgrade.service                    static          -
apt-daily.service                            static          -
apt-news.service                             static          -
autovt@.service                              alias           -
cloud-config.service                         enabled         enabled
cloud-final.service                          enabled         enabled
cloud-init-hotplugd.service                  static          -
cloud-init-local.service                     enabled         enabled
cloud-init.service                           enabled         enabled
console-getty.service                        enabled-runtime disabled
console-setup.service                        enabled         enabled
container-getty@.service                     static          -
containerd.service                           enabled         enabled
cron.service                                 enabled         enabled
cryptdisks-early.service                     masked          enabled
cryptdisks.service                           masked          enabled
dbus-org.freedesktop.hostname1.service       alias           -
dbus-org.freedesktop.locale1.service         alias           -
dbus-org.freedesktop.login1.service          alias           -
dbus-org.freedesktop.resolve1.service        alias           -
dbus-org.freedesktop.timedate1.service       alias           -
dbus-org.freedesktop.timesync1.service       alias           -
dbus.service                                 static          -
debug-shell.service                          disabled        disabled
dmesg.service                                enabled         enabled
docker.service                               enabled         enabled
dpkg-db-backup.service                       static          -
e2scrub@.service                             static          -
e2scrub_all.service                          static          -
e2scrub_fail@.service                        static          -
e2scrub_reap.service                         enabled         enabled
emergency.service                            static          -
esm-cache.service                            static          -
fstrim.service                               static          -
getty-static.service                         static          -
getty@.service                               enabled         enabled
hwclock.service                              masked          enabled
initrd-cleanup.service                       static          -
initrd-parse-etc.service                     static          -
initrd-switch-root.service                   static          -
initrd-udevadm-cleanup-db.service            static          -
keyboard-setup.service                       enabled         enabled
kmod-static-nodes.service                    static          -
kmod.service                                 alias           -
landscape-client.service                     enabled         enabled
ldconfig.service                             static          -
logrotate.service                            static          -
man-db.service                               static          -
modprobe@.service                            static          -
motd-news.service                            static          -
netplan-ovs-cleanup.service                  enabled-runtime enabled
networkd-dispatcher.service                  enabled         enabled
nftables.service                             disabled        enabled
packagekit-offline-update.service            static          -
packagekit.service                           static          -
pam_namespace.service                        static          -
polkit.service                               static          -
procps.service                               alias           -
quotaon.service                              static          -
rc-local.service                             static          -
rescue.service                               static          -
rsync.service                                disabled        enabled
rsyslog.service                              enabled         enabled
serial-getty@.service                        disabled        enabled
setvtrgb.service                             enabled         enabled
snapd.apparmor.service                       enabled         enabled
snapd.autoimport.service                     enabled         enabled
snapd.core-fixup.service                     enabled         enabled
snapd.failure.service                        static          -
snapd.recovery-chooser-trigger.service       enabled         enabled
snapd.seeded.service                         enabled         enabled
snapd.service                                enabled         enabled
snapd.snap-repair.service                    static          -
snapd.system-shutdown.service                enabled         enabled
squid.service                                enabled         enabled
ssh.service                                  enabled         enabled
sshd.service                                 alias           -
ssl-cert.service                             enabled         enabled
sudo.service                                 masked          enabled
syslog.service                               alias           -
system-update-cleanup.service                static          -
systemd-ask-password-console.service         static          -
systemd-ask-password-wall.service            static          -
systemd-backlight@.service                   static          -
systemd-battery-check.service                static          -
systemd-binfmt.service                       static          -
systemd-boot-check-no-failures.service       disabled        disabled
systemd-bsod.service                         static          -
systemd-confext.service                      disabled        enabled
systemd-exit.service                         static          -
systemd-firstboot.service                    static          -
systemd-fsck-root.service                    static          -
systemd-fsck@.service                        static          -
systemd-fsckd.service                        static          -
systemd-growfs-root.service                  static          -
systemd-growfs@.service                      static          -
systemd-halt.service                         static          -
systemd-hibernate-resume.service             static          -
systemd-hibernate.service                    static          -
systemd-hostnamed.service                    static          -
systemd-hwdb-update.service                  static          -
systemd-hybrid-sleep.service                 static          -
systemd-initctl.service                      static          -
systemd-journal-catalog-update.service       static          -
systemd-journal-flush.service                static          -
systemd-journald.service                     static          -
systemd-journald@.service                    static          -
systemd-kexec.service                        static          -
systemd-localed.service                      static          -
systemd-logind.service                       static          -
systemd-machine-id-commit.service            static          -
systemd-modules-load.service                 static          -
systemd-network-generator.service            disabled        enabled
systemd-networkd-wait-online.service         disabled        enabled
systemd-networkd-wait-online@.service        disabled        enabled
systemd-networkd.service                     disabled        enabled
systemd-pcrextend@.service                   static          -
systemd-pcrfs-root.service                   static          -
systemd-pcrfs@.service                       static          -
systemd-pcrlock-file-system.service          disabled        enabled
systemd-pcrlock-firmware-code.service        disabled        enabled
systemd-pcrlock-firmware-config.service      disabled        enabled
systemd-pcrlock-machine-id.service           disabled        enabled
systemd-pcrlock-make-policy.service          disabled        enabled
systemd-pcrlock-secureboot-authority.service disabled        enabled
systemd-pcrlock-secureboot-policy.service    disabled        enabled
systemd-pcrmachine.service                   static          -
systemd-pcrphase-initrd.service              static          -
systemd-pcrphase-sysinit.service             static          -
systemd-pcrphase.service                     static          -
systemd-poweroff.service                     static          -
systemd-pstore.service                       enabled         enabled
systemd-quotacheck.service                   static          -
systemd-random-seed.service                  static          -
systemd-reboot.service                       static          -
systemd-remount-fs.service                   enabled-runtime enabled
systemd-repart.service                       static          -
systemd-resolved.service                     enabled         enabled
systemd-rfkill.service                       static          -
systemd-soft-reboot.service                  static          -
systemd-storagetm.service                    static          -
systemd-suspend-then-hibernate.service       static          -
systemd-suspend.service                      static          -
systemd-sysctl.service                       static          -
systemd-sysext.service                       disabled        enabled
systemd-sysext@.service                      static          -
systemd-sysupdate-reboot.service             indirect        enabled
systemd-sysupdate.service                    indirect        enabled
systemd-sysusers.service                     static          -
systemd-time-wait-sync.service               disabled        disabled
systemd-timedated.service                    static          -
systemd-timesyncd.service                    enabled         enabled
systemd-tmpfiles-clean.service               static          -
systemd-tmpfiles-setup-dev-early.service     static          -
systemd-tmpfiles-setup-dev.service           static          -
systemd-tmpfiles-setup.service               static          -
systemd-tpm2-setup-early.service             static          -
systemd-tpm2-setup.service                   static          -
systemd-udev-settle.service                  static          -
systemd-udev-trigger.service                 static          -
systemd-udevd.service                        static          -
systemd-update-done.service                  static          -
systemd-update-utmp-runlevel.service         static          -
systemd-update-utmp.service                  static          -
systemd-user-sessions.service                static          -
systemd-volatile-root.service                static          -
ua-reboot-cmds.service                       enabled         enabled
ua-timer.service                             static          -
ubuntu-advantage.service                     enabled         enabled
udev.service                                 alias           -
unattended-upgrades.service                  enabled         enabled
user-runtime-dir@.service                    static          -
user@.service                                static          -
uuidd.service                                indirect        enabled
wsl-pro.service                              enabled         enabled
wslg.service                                 generated       -
x11-common.service                           masked          enabled

182 unit files listed.

⇧「lvm*」が見当たらない...

「Docker」と「Docker Compose」で「コンテナ仮想化」の基本的な仕組みは変わらないと思うので、「Docker」独自の仕様で「論理ボリューム(LV:Logical Volume)」が生成されているってことなんですかね?

つまり、

No 領域 LVM(Logical Volume Management)向けのツール
1 Linux パッケージ LVM(Logical Volume Manager)
2 Docker ?

⇧「Docker」内部で「LVM(Logical Volume Management)」を実現している仕組みが分からない...

とりあえず、

docs.docker.com

⇧ 公式のドキュメントを見ても、「LVM(Logical Volume Management)」との関係が分からないのよね...

「Docker」が「ブラックボックス」過ぎるのだが、「Docker」独自の仕組みで「論理ボリューム(LV:Logical Volume)」が管理されているってことなんですかね?

毎度モヤモヤ感が半端ない…

今回はこのへんで。