Re: Failed to create /dev/loop0p* entries for partitions inside loopback devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxx>
To: CentOS mailing list <centos@xxxxxxxxxx> 
Sent: Friday, May 24, 2013 11:05 AM
Subject: Re:  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@xxxxxxxxxx
45°38' N, 122°6' W
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos





[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux