Hi,

so just do what the message says: zero the metadata on the underlying storage:

dd if=/dev/zero of=/dev/VolGroup00/LogVol00 bs=1M count=1

This should help.

Best regards,

Thomas.

Zitat von Docharkhehsaz <[email protected]>:

I like to have the /var/opt directory to be mirrored on both nodes,
When I try to run :
drbdadm create-md axigenStorage I got error:

===========================================
[r...@mail2 ~]# drbdadm create-md axigenStorage
md_offset 994519805952
al_offset 994519773184
bm_offset 994489421824

Found ext3 filesystem
   971210752 kB data area apparently used
   971181076 kB left usable by current configuration

Device size would be truncated, which
would corrupt data and result in
'access beyond end of device' errors.
You need to either
   * use external meta data (recommended)
   * shrink that filesystem first
   * zero out the device (destroy the filesystem)
Operation refused.

Command 'drbdmeta 0 v08 /dev/VolGroup00/LogVol00 internal create-md' terminated with exit code 40
drbdadm create-md axigenStorage: exited with code 40

=========================

Here is my drbd.conf:
===========================
#
# please have a a look at the example configuration file in
# /usr/share/doc/drbd83/drbd.conf
#


#
# drbd.conf example
#
# parameters you _need_ to change are the hostname, device, disk,
# meta-disk, address and port in the "on <hostname> {}" sections.
#
# you ought to know about the protocol, and the various timeouts.
#
# you probably want to set the rate in the syncer sections

#
# NOTE common pitfall:
# rate is given in units of _byte_ not bit
#

#
# increase timeout and maybe ping-int in net{}, if you see
# problems with "connection lost/connection established"
# (or change your setup to reduce network latency; make sure full
#  duplex behaves as such; check average roundtrip times while
#  network is saturated; and so on ...)
#

skip {
  As you can see, you can also comment chunks of text
  with a 'skip[optional nonsense]{ skipped text }' section.
  This comes in handy, if you just want to comment out
  some 'resource <some name> {...}' section:
  just precede it with 'skip'.

  The basic format of option assignment is
<option name><linear whitespace><value>;

  It should be obvious from the examples below,
  but if you really care to know the details:

<option name> :=
        valid options in the respective scope
<value>  := <num>|<string>|<choice>|...
              depending on the set of allowed values
              for the respective option.
<num>    := [0-9]+, sometimes with an optional suffix of K,M,G
<string> := (<name>|\"([^\"\\\n]*|\\.)*\")+
<name>   := [/_.A-Za-z0-9-]+
}

#
# At most ONE global section is allowed.
# It must precede any resource section.
#
global {
    # By default we load the module with a minor-count of 32. In case you
    # have more devices in your config, the module gets loaded with
    # a minor-count that ensures that you have 10 minors spare.
    # In case 10 spare minors are too little for you, you can set the
    # minor-count exeplicit here. ( Note, in contrast to DRBD-0.7 an
    # unused, spare minor has only a very little overhead of allocated
    # memory (a single pointer to be exact). )
    #
    # minor-count 64;

    # The user dialog counts and displays the seconds it waited so
    # far. You might want to disable this if you have the console
    # of your server connected to a serial terminal server with
    # limited logging capacity.
    # The Dialog will print the count each 'dialog-refresh' seconds,
    # set it to 0 to disable redrawing completely. [ default = 1 ]
    #
    # dialog-refresh 5; # 5 seconds

    # You might disable one of drbdadm's sanity check.
    # disable-ip-verification;

    # Participate in DRBD's online usage counter at http://usage.drbd.org
    # possilbe options: ask, yes, no. Default is ask. In case you do not
    # know, set it to ask, and follow the on screen instructions later.
    usage-count no;
}


#
# The common section can have all the sections a resource can have but
# not the host section (started with the "on" keyword).
# The common section must precede all resources.
# All resources inherit the settings from the common section.
# Whereas settings in the resources have precedence over the common
# setting.
#

common {
protocol C;
  syncer { rate 10M; }
}

#
# this need not be r#, you may use phony resource names,
# like "resource web" or "resource mail", too
#

resource axigenStorage{
    on mail1.cra.ir {
    device /dev/drbd0;
    disk /dev/VolGroup00/LogVol00;
#disk /dev/sdb2;

address 192.168.44.88:7788;
meta-disk internal;
}
on mail2.cra.ir {
device /dev/drbd0;
    disk /dev/VolGroup00/LogVol00;
#disk /dev/sdb2;
address 192.168.44.89:7788;
meta-disk internal;
}
}

============


Here is pvdisplay,lvdisplay out put:
[r...@mail2 ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/mapper/isw_bahjijhdij_Volume0p2
  VG Name               VolGroup00
  PV Size               931.40 GB / not usable 29.40 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              29804
  Free PE               0
  Allocated PE          29804
  PV UUID               iXa47w-qUwE-LbPj-n3Nn-cXSj-HG9h-o3Kj2t


[r...@mail2 ~]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                7pJWE9-UYDo-L5pC-MWBI-WczC-bYxt-Nu0k3t
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                926.22 GB
  Current LE             29639
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                g7FypE-T3ii-7A80-yxPT-wLIj-VfSY-iITqH2
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                5.16 GB
  Current LE             165
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4

=============
[r...@mail2 ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14      121600   976647577+  8e  Linux LVM

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14      121600   976647577+  8e  Linux LVM


========================


Here is the question:
Should I use
http://www.drbd.org/users-guide/s-lvm-lv-as-drbd-backing-dev.html
Mean Should I create a lvm device then I map drbd device on it.

Is there any way that I donot change the partition table,
Mean I donot change size of any partition. or create any partition?

An other question:
What should I place in "disk /dev/VolGroup00/LogVol00;" should I use 'disk /sdb2" or "disk /sda2"

I just wnat to have a mirror of /var/opt directory




--
tiri GmbH
Lauenburger Str. 31a
21493 Schwarzenbek
Tel. 04151 8674995
Fax. 04151 8674996
Net. http://www.tiri.li

Geschäftsführer: Anja Baumann, Thomas Baumann
Sitz Schwarzenbek, Amtsgericht Lübeck, HRB 8837 HL

------------------------------------------------------------------
sent via tiri messaging - based on horde/imp/dspam/amavis and more
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to