<p>I was trying to deploy a openebs cstore-pool based dynamically provisioned storage class so that I could have 3 seperate disks on 3 different machines.</p>
<p>While doing this I realized that I do not have an external drive and for capacity management I have to use a separate disk for pooling.</p>
<p>I created a disk image with dd with the size of 4GB for trying the feature.</p>
<pre><code>$ dd if=/dev/zero of=diskImage4 bs=1M count=4096
</code></pre>
<p>When I mounted it I saw that it is mounted as a loop device to loop0, as shown in the <code>lsblk</code> command output</p>
<pre><code>loop0    8:0    0     8K  1 loop mountPoint
</code></pre>
<p>What I was trying to achieve was,</p>
<pre><code>sda      8:16   0   23.5G  0 disk 
└─sda1   8:18   0   23.5G  0 part /
sdb      8:0    0   4.0G   0 disk 
└─sdb1   8:1    0   4.0G   0 part 
</code></pre>
<p>How can I mount the new created file &quot;diskImage4&quot; as a disk partition.</p>
<p>I saw some mount parameters and the <code>losetup</code> command but they were all finally used for mounting the image as a loop device.</p>
<p>Or if there is a way to use files as disks in cstore-pools I would love to learn that.</p>
<p>If there is no common or understandable way to achieve this, thanks anyways.</p>

Catastrophe
<p>You havent created a partition table on the virtual disk.</p>
<p>Do the DD as above, then run the output of that through gparted or fdisk and creat a partition table</p>
<p>then do an losteup <code>losetup -f diskImage4</code></p>
<p>then read the partitions <code>partx -a /dev/loop0</code> (or whatever the loop device is created as</p>
<p>Then do a lsblk</p>
<p>loop0 and loop0p1 should be visible</p>
