fdisk doesn't find loop device in docker
Having a somewhat odd problem. I am testing out an installation on Docker that needs a free block device, here are the steps I took:
- Mounted an image file as
/dev/loop4on the host
- Wrote a label to it and created a partition:
/dev/loop4p1(this is for testing only, what I need is the raw device)
- Launched a Docker container (
ubuntu:14.04) in privileged mode
Now, using the device/partition works fine: I can mount it and read/write data;
fdisk -l /dev/loop4 does the expected thing; it shows up in
/proc/partitions looks as expected:
root@e1047c0fa3a3:/proc# cat /proc/partitions major minor #blocks name 259 0 500107608 nvme0n1 259 1 266240 nvme0n1p1 259 2 494927872 nvme0n1p2 259 3 4912455 nvme0n1p3 7 0 104857600 loop0 7 1 2097152 loop1 7 4 25165824 loop4 259 4 25164783 loop4p1 254 0 104857600 dm-0 254 1 10485760 dm-1
BUT if I run just
fdisk -l, ‘loop4’ doesn’t show up (only the system drive comes up), and apparently that’s how the install tool I’m using is looking for available drives, so I can’t pick ‘loop4’.
fdisk -l on the host shows everything from
Any ideas on what else fdisk looks for when listing devices?
Apparently this is a problem specifically on 14, and 16 works as expected. Still would be nice to have a workaround on 14.