centos 6 failed to create entries under /dev for newly created loopback devices. Any one know why? and how to fix/workaround it?
The steps to duplicate is pretty simple
dd if=/dev/zero of=/tmp/deleteme bs=1M count=100 losetup /dev/loop0 /tmp/deleteme fdisk /dev/loop0 ## created partitions 1, 2, etc. fdisk -l /dev/loop0 ## confirmed that the partitions do exist mkfs.ext3 /dev/loop0p1 ## failed here, the error prompt says that the /dev/loop0p1 doesn't exist! ls /dev/loop0p* ## no entries
Please shed a light here, I'm running centos 6.4
Thanks. Robert
On Fri, 24 May 2013, Gelen James wrote:
centos 6 failed to create entries under /dev for newly created loopback devices. Any one know why? and how to fix/workaround it?
The steps to duplicate is pretty simple
dd if=/dev/zero of=/tmp/deleteme bs=1M count=100 losetup /dev/loop0 /tmp/deleteme fdisk /dev/loop0 ## created partitions 1, 2, etc. fdisk -l /dev/loop0 ## confirmed that the partitions do exist
At this point, you need to run "kpartx -a /dev/loop0" (fdisk should have told you so).
mkfs.ext3 /dev/loop0p1 ## failed here [...]
kpartx drops partitions into /dev/mapper, so the actual invocation would be
mkfs.ext3 /dev/mapper/loop0p1
You can also use partprobe instead of kpartx, but I'm not as familiar with its operation.
Hi Paul and all,
Thanks for your workaround. I followed exactly with kpartx command, it does works for mkfs when using /dev/mapper/* entries.
But there is still no /dev/loop0p* entries created. Do you have any ideas why?
I've tried to use a loopback /dev/loop0 to simulate drive type storage pool for KVM virtualization tests, and so that always fails because no /dev/loop0p* entries created.
Please shed a light on this. Thanks a lot.
--Robin
________________________________ From: Paul Heinlein heinlein@madboa.com To: CentOS mailing list centos@centos.org Sent: Friday, May 24, 2013 11:05 AM Subject: Re: [CentOS] Failed to create /dev/loop0p* entries for partitions inside loopback devices
On Fri, 24 May 2013, Gelen James wrote:
centos 6 failed to create entries under /dev for newly created loopback devices. Any one know why? and how to fix/workaround it?
The steps to duplicate is pretty simple
dd if=/dev/zero of=/tmp/deleteme bs=1M count=100 losetup /dev/loop0 /tmp/deleteme fdisk /dev/loop0 ## created partitions 1, 2, etc. fdisk -l /dev/loop0 ## confirmed that the partitions do exist
At this point, you need to run "kpartx -a /dev/loop0" (fdisk should have told you so).
mkfs.ext3 /dev/loop0p1 ## failed here [...]
kpartx drops partitions into /dev/mapper, so the actual invocation would be
mkfs.ext3 /dev/mapper/loop0p1
You can also use partprobe instead of kpartx, but I'm not as familiar with its operation.
-- Paul Heinlein heinlein@madboa.com 45°38' N, 122°6' W _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos