Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
2012/1/11 Yuan Luo <yuan.luo at ericsson.com>: > Hi, > > The problem seems be solved by cleaning the MBR of the devices on both drbd node > dd if=/dev/null of=/dev/sda1 bs=1M count=1 > on both Primary and Secondary node and sync the peer. > > Thanks for your help anyway. Good new is the hd works. :D Good, but still: your pvdisplay output shows that LVM could be bypassing drbd, and that's not good. > > BRs, > Yuan > > ________________________________________ > From: Jose Ildefonso Camargo Tolosa [ildefonso.camargo at gmail.com] > Sent: Wednesday, January 11, 2012 2:04 PM > To: Yuan Luo > Cc: drbd-user at lists.linbit.com > Subject: Re: [DRBD-user] DRBD LVM device-mapper error > > Hi, > > I'm using LVM volume as underlaying device for DRBD, and on top of > DRBD I have LVM, so, it goes something like this: > > sdaX ----- LVM (/dev/mapper/vg_name-lv_drbd_a) ---- DRBD ---- LVM > (vg_a with lv: lv_a) > > Anyway, my lvm.conf has these: > > filter = [ "r/.*lv_drbd.*/", "r/.*block.*/", "a/.*drbd.*/", "a/sd.*/"] > write_cache_state = 0 > > I did that filter while half-asleep, but it works. > > On Wed, Jan 11, 2012 at 12:21 AM, Yuan Luo <yuan.luo at ericsson.com> wrote: >> Hi Jose, >> >> Thank you for your comment. >> I deleted pv and vg, and created again >> when >> ipworks-ebs02:~ # pvs >> Invalid volume group #orphans_lvm2 >> >> ipworks-ebs02:~ # pvs -a >> WARNING: Locking disabled. Be careful! This could corrupt your metadata. >> Invalid volume group #orphans_lvm2 >> Invalid volume group #orphans_lvm2 >> Invalid volume group (null) >> Invalid volume group (null) >> Invalid volume group (null) >> >> What happened? I think this is the root cause. Could you send me your lvm.conf? >> Thanks. >> >> BRs, >> Yuan Luo >> >> -----Original Message----- >> From: Jose Ildefonso Camargo Tolosa [mailto:ildefonso.camargo at gmail.com] >> Sent: 2012年1月11日 12:38 >> To: Yuan Luo >> Subject: Re: [DRBD-user] DRBD LVM device-mapper error >> >> On Tue, Jan 10, 2012 at 11:04 PM, Yuan Luo <yuan.luo at ericsson.com> wrote: >>> Hi, >>> >>> Thanks for your reply. >>> >>> Node2 is DRBD primary. As I mentioned before, in another set of production environment, I've successfully established DRBD(P+S) + Pacemaker and failover works perfect. >>> So please assume the default DRBD configuration were correct. Ebs02 is primary, ebs01 is secondary. /dev/sda1 is a 300GB physical partition in both nodes and is expected to create a drbd. >>> >>> ipworks-ebs02:~ # rcdrbd status >>> drbd driver loaded OK; device status: >>> version: 8.3.7 (api:88/proto:86-91) >>> GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by >>> phil at fat-tyre, 2010-01-13 17:17:27 m:res cs ro >>> ds p mounted fstype 0:r0 Connected >>> Primary/Secondary UpToDate/UpToDate C >>> >>> I also modified /etc/lvm/lvm.conf +line 35 as: >>> filter = [ "a|^/dev/drbd|", "a/sda/", "a/sdb/", "r/.*/" ] >>> >>> Now the situation is, pv /dev/drbd0 created ok, vg ipwdg created ok, but lv ipwvol created failed. >>> ipworks-ebs02:~ # lvcreate -n ipwvol -L 50G ipwdg >>> WARNING: Locking disabled. Be careful! This could corrupt your metadata. >>> device-mapper: reload ioctl failed: Invalid argument >>> Aborting. Failed to activate new LV to wipe the start of it. >>> >>> ipworks-ebs02:~ # pvs >>> WARNING: Locking disabled. Be careful! This could corrupt your metadata. >>> PV VG Fmt Attr PSize PFree >>> /dev/sda1 ipwdg lvm2 a- 299.98G 299.98G >> >> Ok, here is the problem: it is using the underlaying device directly (sda1)... It should be using /dev/drbd0 on primary, and volume group should be invisible on the secondary. >> >> There are some errors on your lvm.conf ... I have not time to dig into details right now, but I hope this at least put you into the right direction. >> >> Ildefonso. >> >>> >>> ipworks-ebs02:~ # pvdisplay >>> WARNING: Locking disabled. Be careful! This could corrupt your metadata. >>> --- Physical volume --- >>> PV Name /dev/sda1 >>> VG Name ipwdg >>> PV Size 299.99 GB / not usable 2.62 MB >>> Allocatable yes >>> PE Size (KByte) 4096 >>> Total PE 76796 >>> Free PE 76796 >>> Allocated PE 0 >>> PV UUID iEopx7-vr09-FKGx-wUWq-hXLm-OVKn-4k3Lq5 >>> >>> ipworks-ebs02:~ # vgdisplay >>> WARNING: Locking disabled. Be careful! This could corrupt your metadata. >>> --- Volume group --- >>> VG Name ipwdg >>> System ID >>> Format lvm2 >>> Metadata Areas 1 >>> Metadata Sequence No 7 >>> VG Access read/write >>> VG Status resizable >>> Clustered yes >>> Shared no >>> MAX LV 0 >>> Cur LV 0 >>> Open LV 0 >>> Max PV 0 >>> Cur PV 1 >>> Act PV 1 >>> VG Size 299.98 GB >>> PE Size 4.00 MB >>> Total PE 76796 >>> Alloc PE / Size 0 / 0 >>> Free PE / Size 76796 / 299.98 GB >>> VG UUID AATSOL-Fnua-HNwR-n8Ph-waHt-WkMj-k3P7Zy >>> >>> lvs command output: empty >>> Of course ;) no lv is created. >>> >>> This problem is really a little tricky. Thanks in advance. >>> >>> BRs, >>> Yuan Luo >>>