Bug 1273583 - docker-storage-setup fails to create a thin pool when disk is under 8GB
docker-storage-setup fails to create a thin pool when disk is under 8GB
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
7.1
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: smahajan@redhat.com
atomic-bugs@redhat.com
: Extras
Depends On: 1215146
Blocks: 1298243
  Show dependency treegraph
 
Reported: 2015-10-20 14:03 EDT by Jake Hunsaker
Modified: 2017-05-08 08:32 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-01 13:53:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jake Hunsaker 2015-10-20 14:03:31 EDT
Description of problem:

docker-storage-setup is failing to create the docker thin pool when a whole disk is specified in /etc/sysconfig/docker-storage-setup.

Version-Release number of selected component (if applicable):
docker-1.7.1

How reproducible:
Easily

Steps to Reproduce:
1. Present a disk device under 8GB in size to a system/VM
2. Try to create a thin pool with dss from the device
3.

Actual results:
Oct 12 14:37:59 esrmftstg07 systemd: Starting Docker Storage Setup...
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: 0
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: Checking that no-one is using this disk right now ...
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: OK
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: sfdisk:  /dev/sdc: unrecognized partition table type
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: sfdisk: No partitions found
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: sfdisk: Warning: The partition table looks like it was made
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: for C/H/S=*/48/4 (instead of 1009/67/62).
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: For this listing I'll assume that geometry.
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: sfdisk:               start: (c,h,s) expected (10,32,1) found (0,33,3)
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: sfdisk:               end: (c,h,s) expected (1023,47,4) found (1009,47,4)
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: Disk /dev/sdc: 1009 cylinders, 67 heads, 62 sectors/track
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: Old situation:
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: New situation:
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: Units: sectors of 512 bytes, counting from 0
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: Device Boot    Start       End   #sectors  Id  System
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: /dev/sdc1          2048   4194303    4192256  8e  Linux LVM
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: /dev/sdc2             0         -          0   0  Empty
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: /dev/sdc3             0         -          0   0  Empty
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: /dev/sdc4             0         -          0   0  Empty
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: Warning: partition 1 does not end at a cylinder boundary
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: Warning: no primary partition is marked bootable (active)
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: This does not matter for LILO, but the DOS MBR will not boot this disk.
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: end of partition 1 has impossible value for cylinders: 1009 (should be in 0-1008)
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: sfdisk: I don't like these partitions - nothing changed.
Oct 12 14:37:59 esrmftstg07 docker-storage-setup: (If you really want this, use the --force option.)
Oct 12 14:37:59 esrmftstg07 kernel: sdc: unknown partition table
Oct 12 14:37:59 esrmftstg07 systemd: docker-storage-setup.service: main process exited, code=exited, status=1/FAILURE
Oct 12 14:37:59 esrmftstg07 systemd: Failed to start Docker Storage Setup.
Oct 12 14:37:59 esrmftstg07 systemd: Unit docker-storage-setup.service entered failed state.

Expected results:

Thin pool should be created normally

Additional info:

Documentation states that the minimum size is 2GB, but consistently customer is able to produce the above error unless the disk is 8GB or larger.
Comment 3 Vivek Goyal 2015-10-28 10:36:26 EDT
This looks like an sfdisk issue. I have another bug very similar to this.

https://bugzilla.redhat.com/show_bug.cgi?id=1215146

I think real solution is to upgrade util-linux package so that we have newer sfdisk which does not have this problem.

Alternatively if sfdisk --force works, we could think of providing an option and allow user to force it. But I don't even know what are the implications of forcing it.

CCing Karel Zak.
Comment 4 Daniel Walsh 2015-12-01 16:27:07 EST
Looks like the other bug is blocked.
Comment 7 Daniel Walsh 2016-06-03 09:06:13 EDT
Stephen can you look to switch out the parted.
Comment 10 smahajan@redhat.com 2017-01-26 11:48:43 EST
https://bugzilla.redhat.com/show_bug.cgi?id=1380160

Shishir
Comment 11 smahajan@redhat.com 2017-01-26 11:49:09 EST
https://github.com/projectatomic/docker-storage-setup/pull/191

Shishir
Comment 12 smahajan@redhat.com 2017-01-31 18:42:09 EST
PR Merged upstream. Moving this to modified.

Shishir
Comment 15 Chris Evich 2017-05-01 13:53:11 EDT
+ Installed RHEL 7.3 on VM w/ 7gig /dev/vdb
+ Registered/Subscribed
+ Installed docker container-selinux deltarpm
+ Update everything + reboot
+ Edited /etc/sysconfig/docker-storage-setup:
DEVS="/dev/vdb"
VG="dockervg"
WIPE_SIGNATURES="True"
DATA_SIZE="100%FREE"
+ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda    253:0    0   40G  0 disk 
└─vda1 253:1    0  7.8G  0 part /
vdb    253:16   0    7G  0 disk 
+ ran docker-storage-setup
+ restarted docker
+ ran docker info
...
 Data file: 
 Metadata file: 
 Data Space Used: 20.45 MB
 Data Space Total: 7.495 GB
 Data Space Available: 7.475 GB
...

Note You need to log in before you can comment on or make changes to this bug.