projectatomic / container-storage-setup

Service to set up storage for Docker and other container systems
Apache License 2.0
153 stars 77 forks source link

NVMe Device Configuration #235

Open blaines opened 7 years ago

blaines commented 7 years ago

Receiving ERROR: Partition specification unsupported at this time. when attempting to run docker-storage-setup with nvme device. This is due to a bug with the device configuration validation routine believing that I've chosen a partition rather than a device.

Configuration:

DEVS=/dev/nvme0n1
VG=docker

Workaround:

Create docker volume group manually and remove DEVS line.

blaines commented 7 years ago

Similar to #138

mvollmer commented 7 years ago

Create docker volume group manually and remove DEVS line.

I think this could be called "best practice" instead of "workaround", actually. :-)

rhvgoyal commented 7 years ago

@shishir-a412ed is cleaning up @mvollmer patch to remove hard coded assumptions about partition name being '${dev}1'. Once that patch gets merged, this problem should be solved.

cgwalters commented 6 years ago

Related (but possibly distinct) c-s-s fails to GROWPART=true with Fedora Atomic Host 28 in AWS on NVME (defaults).

# rpm -q container-storage-setup
container-storage-setup-0.10.0-1.gitdf0dcd5.fc28.noarch
# rpm-ostree status
State: idle; auto updates disabled
Deployments:
● ostree://fedora-atomic:fedora/28/x86_64/atomic-host
                   Version: 28.20180613.0 (2018-06-13 13:52:10)
                    Commit: c51100f14cf12b25c16562cede7455191e536c0534e3b2ef87e66be9e12899ae
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
# cat /etc/sysconfig/docker-storage-setup 
...
GROWPART=true
ROOT_SIZE=+100%FREE
# lsblk
NAME              MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1           259:0    0  42G  0 disk 
├─nvme0n1p1       259:1    0   1G  0 part /boot
└─nvme0n1p2       259:2    0   5G  0 part 
  └─atomicos-root 253:0    0   5G  0 lvm  /sysroot
# journalctl -b -r -u docker-storage-setup
-- Logs begin at Tue 2018-06-26 01:39:40 UTC, end at Tue 2018-06-26 01:49:03 UTC. --
Jun 26 01:41:38 ip-172-18-3-8 systemd[1]: Started Docker Storage Setup.
Jun 26 01:41:38 ip-172-18-3-8 container-storage-setup[1013]:   Logical volume atomicos/root successfully resized.
Jun 26 01:41:38 ip-172-18-3-8 container-storage-setup[1013]:   Size of logical volume atomicos/root unchanged from <5.00 GiB (1279 extents).
Jun 26 01:41:38 ip-172-18-3-8 container-storage-setup[1013]:   1 physical volume(s) resized / 0 physical volume(s) not resized
Jun 26 01:41:38 ip-172-18-3-8 container-storage-setup[1013]:   Physical volume "/dev/nvme0n1p2" changed
Jun 26 01:41:38 ip-172-18-3-8 container-storage-setup[1013]: FAILED: /dev/nvme: does not exist
#
cgwalters commented 6 years ago

So it's definitely

    # Split device & partition.  Ick.
    growpart $( echo $pv | sed -r 's/([^0-9]*)([0-9]+)/\1 \2/' ) || true

And yeah the comment. Ick. We can use sysfs for this, something like $(basename $(dirname $(readlink /sys/dev/block/$major:$minor))).