<div dir="ltr">Hi Igor, you're right, I created the the partition on the client but I'm a bit confused because I'm using /dev/drbd3 as a backstore for targetcli so I'm expecting something like this:<div>sde</div><div>|------drbd3</div><div> |----------drbd3p1</div><div> |------------------myvolgroup_lv1</div><div><br></div><div>instead of </div><div><br></div><div>sde</div><div>|---------sde1</div><div>|---------drbd3</div><div><br></div><div><br></div><div>Furthermore, I'd like to understand if I need to change my configuration or it is ok for a production environment. The idea is that I need a drbd device used as a backstores in targetcli and nothing else. I don't need to resize it. On the initiator server I need to create a PV and then a VG and many LVs. Actually I'm using a raw device as a backing device for drbd and /dev/drbdX as a backstores. Let me know what do you think about this.</div><div>Thank you,</div><div>Marco</div><div><br></div><div> </div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-27 23:40 GMT+02:00 Igor Cicimov <span dir="ltr"><<a href="mailto:icicimov@gmail.com" target="_blank">icicimov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><div class="h5"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 25 Mar 2017 8:16 pm, "Marco Marino" <<a href="mailto:marino.mrc@gmail.com" target="_blank">marino.mrc@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-3075246202373513450quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi, I'm trying to understand how to configure raw devices when used with drbd. I think I have a problem with data alignment. Let me describe my case:<br><br></div>I have a raw device /dev/sde on both nodes and on top of it there is the drbd device. So, in the .res configuration file I have<br>....<br>disk /dev/sde;<br>device /dev/drbd2;<br>....<br><br></div>At this point I used /dev/drbd2, <u>without create any partition,</u> as a backstore in the targetcli.<br></div>On the iscsi initiator appeared one new device (/dev/sdf), and on top of it I create a new partition with type = LVM and finally a new PV, VG and many LVs.<br></div>From the iscsi initiator it seems to be ok:<br><br>[root@cv1 ~]# gdisk /dev/sdf<br>GPT fdisk (gdisk) version 0.8.6<br><br>Partition table scan:<br> MBR: protective<br> BSD: not present<br> APM: not present<br> GPT: present<br><br>Found valid GPT with protective MBR; using GPT.<br><br>Command (? for help): p<br>Disk /dev/sdf: <a href="tel:(780)%20835-1448" value="+17808351448" target="_blank">7808351448</a> sectors, 3.6 TiB<br>Logical sector size: 512 bytes<br>Disk identifier (GUID): D5C7161E-5C4C-42B3-BEDE-520DC0<wbr>49D106<br>Partition table holds up to 128 entries<br>First usable sector is 34, last usable sector is <a href="tel:(780)%20835-1414" value="+17808351414" target="_blank">7808351414</a><br>Partitions will be aligned on 2048-sector boundaries<br>Total free space is 3221 sectors (1.6 MiB)<br><br>Number Start (sector) End (sector) Size Code Name<br> 1 2048 <a href="tel:(780)%20835-0207" value="+17808350207" target="_blank">7808350207</a> 3.6 TiB 8E00 primary<br><br>Command (? for help): q<br>[root@cv1 ~]#<br><br><br><br></div>The problem is on the drbd node where I have:<br><br>[root@iscsi2 ~]# lsblk<br>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br>........<br>sde 8:64 0 3,7T 0 disk <br>├─sde1 8:65 0 3,7T 0 part <br>└─drbd2 147:2 0 3,7T 0 disk <br>[root@iscsi2 ~]#<br><br></div>Futrhermore<br><br>[root@iscsi2 ~]# gdisk /dev/sde<br>GPT fdisk (gdisk) version 0.8.6<br><br>Partition table scan:<br> MBR: protective<br> BSD: not present<br> APM: not present<br> GPT: present<br><br>Found valid GPT with protective MBR; using GPT.<br><br>Command (? for help): p<br>Disk /dev/sde: <a href="tel:(780)%20858-9824" value="+17808589824" target="_blank">7808589824</a> sectors, 3.6 TiB<br>Logical sector size: 512 bytes<br>Disk identifier (GUID): D5C7161E-5C4C-42B3-BEDE-520DC0<wbr>49D106<br>Partition table holds up to 128 entries<br>First usable sector is 34, last usable sector is <a href="tel:(780)%20835-1414" value="+17808351414" target="_blank">7808351414</a><br>Partitions will be aligned on 2048-sector boundaries<br>Total free space is 3221 sectors (1.6 MiB)<br><br>Number Start (sector) End (sector) Size Code Name<br> 1 2048 <a href="tel:(780)%20835-0207" value="+17808350207" target="_blank">7808350207</a> 3.6 TiB 8E00 primary<br><br>Command (? for help): q<br>[root@iscsi2 ~]#<br><br><br><br><div><br><div>It seems that there are 2 "partitions" even though drbd2 is not a partition. Is this a problem related to my configuration?<br></div></div></div></blockquote></div></div></div><div dir="auto"><br></div></div></div><div dir="auto">What do you mean 2 partitions? It is a partition on sde you created on the client and the drbd device itself. The lsblk shows you exactly that. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_-3075246202373513450quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div dir="ltr"><div><div></div><div>My question is: how can I solve? Should I create a new partition on /dev/sde and use /dev/sde1 as a backing device for the drbd resource? Or perhaps should I create a partition on top of /dev/drbd2 before I can use the device as a backstore in targetcli??<br><div><br></div><div>Thank you,<br></div><div>Marco<br></div><div><br></div></div></div></div>
<br></span><span class="">______________________________<wbr>_________________<br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com" target="_blank">drbd-user@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-user" rel="noreferrer" target="_blank">http://lists.linbit.com/mailma<wbr>n/listinfo/drbd-user</a><br>
<br></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div>