挂载docker逻辑卷

时间:2020-02-21 13:46:42

标签: linux docker amazon-ecs docker-volume lvm

我正在尝试访问以前由docker使用的逻辑卷。这是各种命令的结果:

lsblk

NAME                          MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1                       259:2    0  80G  0 disk
├─nvme0n1p1                   259:3    0  80G  0 part /
└─nvme0n1p128                 259:4    0   1M  0 part
nvme1n1                       259:0    0  80G  0 disk
└─nvme1n1p1                   259:1    0  80G  0 part
  ├─docker-docker--pool_tdata 253:1    0  79G  0 lvm
  │ └─docker-docker--pool     253:2    0  79G  0 lvm
  └─docker-docker--pool_tmeta 253:0    0  84M  0 lvm
    └─docker-docker--pool     253:2    0  79G  0 lvm

fdisk

Disk /dev/nvme1n1: 85.9 GB, 85899345920 bytes, 167772160 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 label type: dos
Disk identifier: 0x00029c01

        Device Boot      Start         End      Blocks   Id  System
/dev/nvme1n1p1            2048   167772159    83885056   8e  Linux LVM
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/nvme0n1: 85.9 GB, 85899345920 bytes, 167772160 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 label type: gpt
Disk identifier: 358A5F86-3BCA-4FB2-8C00-722B915A71AB


#         Start          End    Size  Type            Name
 1         4096    167772126     80G  Linux filesyste Linux
128         2048         4095      1M  BIOS boot       BIOS Boot Partition

lvdisplay

  --- Logical volume ---
  LV Name                docker-pool
  VG Name                docker
  LV UUID                piD2Wx-aDjf-CkpN-b4s4-YXWE-6ERm-GWTcOz
  LV Write Access        read/write
  LV Creation host, time ip-172-31-39-159, 2020-02-16 09:18:57 +0000
  LV Pool metadata       docker-pool_tmeta
  LV Pool data           docker-pool_tdata
  LV Status              available
  # open                 0
  LV Size                79.03 GiB
  Allocated pool data    80.07%
  Allocated metadata     31.58%
  Current LE             20232
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

但是当我尝试挂载卷docker-docker--pool_tdata时,出现以下错误:

mount  /dev/mapper/docker-docker--pool_tdata /mnt/test
mount: /dev/mapper/docker-docker--pool_tdata is already mounted or /mnt/test busy

我还尝试过重启计算机,卸载docker,并使用lsof

查看该卷上是否打开了文件。

关于如何安装该卷,您有任何线索吗? 谢谢

0 个答案:

没有答案