起動直後にシステムに3つの屋根ふき装置があるのはなぜですか?

起動直後にシステムに3つの屋根ふき装置があるのはなぜですか?

Linux Mint 19.2 Cinnamonにログインした直後に、システムで利用可能なすべてのドライブを一覧表示してこの質問を始めましょう。

# fdisk -l

Disk /dev/loop0: 89,1 MiB, 93454336 bytes, 182528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 89,1 MiB, 93429760 bytes, 182480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 202,9 MiB, 212713472 bytes, 415456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 989573D5-37E7-437A-B680-9410F7234A94

Device          Start        End    Sectors   Size Type
/dev/nvme0n1p1   2048     194559     192512    94M EFI System
/dev/nvme0n1p2 194560 1000214527 1000019968 476,9G Linux filesystem


Disk /dev/sda: 232,9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B05FAE90-8E4B-4CCC-AC77-D35D4B260C8A

Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1026047   1024000   500M EFI System
/dev/sda2    1026048   1288191    262144   128M Microsoft reserved
/dev/sda3    1288192 459608774 458320583 218,6G Microsoft basic data
/dev/sda4  459610112 461398015   1787904   873M Windows recovery environment
/dev/sda5  461398016 485992447  24594432  11,7G Windows recovery environment
/dev/sda6  485992448 488396799   2404352   1,2G Windows recovery environment

ここにループデバイスが何であるかさえ知らないことを追加する必要があるようです。私は毎日多数のディスクをマウントし、イメージを作成し、使用するなどの仕事をします。今のところ、そのループデバイス0、1、2に目を向けてみましたが、おそらくずっと前からあったでしょうし、仕事のストレスのために気づかなかったかもしれません。


リストをリストしても、いつ開始されたかはわかりません。おそらく今日見た日付と同じです。

# ll /dev/loop[012]

brw-rw---- 1 root disk 7, 0 Nov 13  2019 /dev/loop0
brw-rw---- 1 root disk 7, 1 Nov 13  2019 /dev/loop1
brw-rw---- 1 root disk 7, 2 Nov 13  2019 /dev/loop2

再起動してもシステムに残っているのはなぜですか?変じゃないですか?

これは私のものです/etc/fstab

UUID=f1fc7345-be7a-4c6b-9559-fc6e2d445bfa    /               ext4     errors=remount-ro                0    1
UUID=4966-E925                               /boot/efi       vfat     umask=0077                       0    1
none                                         /ramdisk        tmpfs    size=1G,mode=0777                0    0
UUID=01D480EF7EDA45C0                        /mnt/windows    ntfs     nosuid,nodev,nofail,noexec,rw    0    0

この3つのループデバイスに関する追加情報をどのように取得できますか?

私はfdisk今、次のことを試しました。

# fdisk /dev/loop0

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The old squashfs signature will be removed by a write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xc54bc258.

Command (m for help): v
Remaining 182527 unallocated 512-byte sectors.

Command (m for help): p

Disk /dev/loop0: 89,1 MiB, 93454336 bytes, 182528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc54bc258

initramfs画像を変更せずに再生成しましたが、再起動後も保持されます。


実際に削除する前に、これについてもっと知りたいです。


コメントQ&A:

/dev/tty*デバイスに興味があるだけに、さまざまなデバイスにも興味を持ってみてはいかがでしょうかloop

ttyまあ、このデバイスの正確な目的が何であるかわからないので、これは難しい質問です。だから推測無知は幸せです、少し話しています。

特にこれらのデバイスを削除するのはなぜですか/dev/loop*

私はそれらについてもっと知りたいと思い、そこに何が含まれているかを調べ、fdisk出力、修正によるとパーティションテーブルが含まれていないと言いました。さらに、これらのloopデバイスは私が直接使用した他のLinuxには存在しません。


Snapデーモンと関連があるようです。

# losetup -a

/dev/loop1: [66306]:6161256 (/var/lib/snapd/snaps/core_8039.snap)
/dev/loop2: [66306]:6160663 (/var/lib/snapd/snaps/core_7917.snap)
/dev/loop0: [66306]:6160545 (/var/lib/snapd/snaps/vlc_1049.snap)

# losetup -l
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                           DIO LOG-SEC
/dev/loop1         0      0         1  1 /var/lib/snapd/snaps/core_8039.snap   0     512
/dev/loop2         0      0         1  1 /var/lib/snapd/snaps/core_7917.snap   0     512
/dev/loop0         0      0         1  1 /var/lib/snapd/snaps/vlc_1049.snap    0     512

ベストアンサー1

装置があるからといって/dev/loop*必ずしも何も表わされません。一部のシステムではそのデバイスを事前に入力し、一部のシステムではそうではありません。ただし、出力に表示される場合は、fdisk -lファイルまたは他のブロックデバイスにループデバイスを提供するように設定されていることを意味します。

以下を実行して、どのルーピングデバイスが設定されていて、何を「ループ」しているかを確認できます。

losetup -l

ルートとして。あなたの場合、これらのデバイスはスナップボリュームにアクセスするために使用されます。

snap list

システムで実行されているSnapが一覧表示されます(VLCおよびCore Snap)。バラよりUbuntuスナップチュートリアル簡単なご紹介をお願いします。

おすすめ記事