[DRBD-user] Problem with drbd and data alignment

Igor Cicimov icicimov at gmail.com
Mon Mar 27 23:40:15 CEST 2017

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 25 Mar 2017 8:16 pm, "Marco Marino" <marino.mrc at gmail.com> wrote:

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:

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
....
disk            /dev/sde;
device          /dev/drbd2;
....

At this point I used /dev/drbd2, *without create any partition,* as a
backstore in the targetcli.
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.
>From the iscsi initiator it seems to be ok:

[root at cv1 ~]# gdisk /dev/sdf
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdf: 7808351448 <(780)%20835-1448> sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): D5C7161E-5C4C-42B3-BEDE-520DC049D106
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7808351414
<(780)%20835-1414>
Partitions will be aligned on 2048-sector boundaries
Total free space is 3221 sectors (1.6 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      7808350207 <(780)%20835-0207>   3.6 TiB     8E00
primary

Command (? for help): q
[root at cv1 ~]#



The problem is on the drbd node where I have:

[root at iscsi2 ~]# lsblk
NAME                       MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
........
sde                          8:64   0   3,7T  0 disk
├─sde1                       8:65   0   3,7T  0 part
└─drbd2                    147:2    0   3,7T  0 disk
[root at iscsi2 ~]#

Futrhermore

[root at iscsi2 ~]# gdisk /dev/sde
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sde: 7808589824 <(780)%20858-9824> sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): D5C7161E-5C4C-42B3-BEDE-520DC049D106
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7808351414
<(780)%20835-1414>
Partitions will be aligned on 2048-sector boundaries
Total free space is 3221 sectors (1.6 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      7808350207 <(780)%20835-0207>   3.6 TiB     8E00
primary

Command (? for help): q
[root at iscsi2 ~]#




It seems that there are 2 "partitions" even though drbd2 is not a
partition. Is this a problem related to my configuration?


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.

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??

Thank you,
Marco


_______________________________________________
drbd-user mailing list
drbd-user at lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20170328/4c3c3e86/attachment.htm>


More information about the drbd-user mailing list