container-storage-setup icon indicating copy to clipboard operation
container-storage-setup copied to clipboard

docker-storage-setup selects swap logical volume for storage

Open moolitayer opened this issue 9 years ago • 3 comments

reproduces on several vms running on top of rehv;

# systemctl status docker-storage-setup
● docker-storage-setup.service - Docker Storage Setup
   Loaded: loaded (/usr/lib/systemd/system/docker-storage-setup.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2016-01-03 22:57:08 IST; 1h 2min ago
  Process: 31474 ExecStart=/usr/bin/docker-storage-setup (code=exited, status=5)
 Main PID: 31474 (code=exited, status=5)

Jan 03 22:57:08 mtayer-centos7-5.eng.lab.tlv.redhat.com systemd[1]: Starting Docker Storage Setup...
Jan 03 22:57:08 mtayer-centos7-5.eng.lab.tlv.redhat.com docker-storage-setup[31474]: Rounding up size to full physical extent 44.00 MiB
Jan 03 22:57:08 mtayer-centos7-5.eng.lab.tlv.redhat.com docker-storage-setup[31474]: Volume group "vg0" has insufficient free space (0 extents): 11 required.
Jan 03 22:57:08 mtayer-centos7-5.eng.lab.tlv.redhat.com systemd[1]: docker-storage-setup.service: main process exited, code=exited, status=5/NOTINSTALLED
Jan 03 22:57:08 mtayer-centos7-5.eng.lab.tlv.redhat.com systemd[1]: Failed to start Docker Storage Setup.
Jan 03 22:57:08 mtayer-centos7-5.eng.lab.tlv.redhat.com systemd[1]: Unit docker-storage-setup.service entered failed state.
Jan 03 22:57:08 mtayer-centos7-5.eng.lab.tlv.redhat.com systemd[1]: docker-storage-setup.service failed.

[root@mtayer-centos7-5 ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg0/lv_swap
  LV Name                lv_swap
  VG Name                vg0
  LV UUID                zjSk0c-uMhb-x33C-YjFH-8tgO-4idb-dMFEqB
  LV Write Access        read/write
  LV Creation host, time mtayer-centos7-5.eng.lab.tlv.redhat.com, 2015-12-30 16:53:19 +0200
  LV Status              available
  # open                 2
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/vg0/lv_root
  LV Name                lv_root
  VG Name                vg0
  LV UUID                Qzt2Yr-VaWH-Phkp-p0GA-jemU-Co6K-IiblMx
  LV Write Access        read/write
  LV Creation host, time mtayer-centos7-5.eng.lab.tlv.redhat.com, 2015-12-30 16:53:19 +0200
  LV Status              available
  # open                 1
  LV Size                35.51 GiB
  Current LE             9090
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0

[root@mtayer-centos7-5 ~]# lsblk
NAME                                                                                     MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                                                                                       11:0    1 1024M  0 rom  
vda                                                                                      252:0    0   40G  0 disk 
├─vda1                                                                                   252:1    0  500M  0 part /boot
└─vda2                                                                                   252:2    0 39.5G  0 part 
  ├─vg0-lv_root                                                                          253:0    0 35.5G  0 lvm  /
  └─vg0-lv_swap                                                                          253:1    0    4G  0 lvm  [SWAP]
loop0                                                                                      7:0    0  100G  0 loop 
└─docker-253:0-131825-pool                                                               253:2    0  100G  0 dm   
  └─docker-253:0-131825-7f214d2227a61922ad5afc282a4d59f1a5067f79b4a86a6f06d17a5938b87df3 253:3    0  100G  0 dm   
loop1                                                                                      7:1    0    2G  0 loop 
└─docker-253:0-131825-pool                                                               253:2    0  100G  0 dm   
  └─docker-253:0-131825-7f214d2227a61922ad5afc282a4d59f1a5067f79b4a86a6f06d17a5938b87df3 253:3    0  100G  0 dm   

# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 

moolitayer avatar Jan 03 '16 22:01 moolitayer

@moolitayer I think you don't have sufficient space in volume group vg0. You an run command vgs and that should show you how much free space is there.

You can add another disk in the system and add that disk to volume group vg0 and that will create additional space. Then you will have to cleanup existing docker (it is using loopback devices right now). And then restart docker and that should create lvm thin pool and start using it.

rhvgoyal avatar Jan 04 '16 14:01 rhvgoyal

I'm hitting this after a fresh Fedora-Cloud_Atomic-x86_64-23-20160112.iso bare-metal anaconda install with the default automatic partitioning setup.

vgs says

VG         #PV #LV #SN Attr      VSize     VFree 
fedora       1   3   0 wz--n-    465.27g   4.00m

lmacken avatar Jan 16 '16 00:01 lmacken

This needs to be fixed in atomic installer to leave free space by default in volume group so that docker-storage-setup can setup a thin pool out of the box for docker.

rhvgoyal avatar Jan 19 '16 14:01 rhvgoyal