부팅 직후 시스템에 루핑 장치가 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). 바라보다우분투 스냅 튜토리얼간략한 소개를 부탁드립니다.

관련 정보