Scenario: 2-node HA cluster has a DRBD resource that is connected but the primary node is diskless and probably has corrupted meta-data (stored internally), however when we try to detach/attach or disconnect/connect and several other steps it does not succeed. After all standard connect/attach procedures failed we tried to recreate the internal meta-data with create-md which says we must zero the drive or shrink the file system first...below are the results of that command.

Status: The secondary node has Up-To-Date files and is in control of heartbeat, in production and functioning as desired.

Question: If we zero that partition on primary will it destroy the files on the local partition ONLY ... then we can create new internal meta-data then sync it to secondary to get Up-To-Date files back on primary? We want to make sure that secondary is not affected by this procedure since it has the good files.

[r...@primary ~]# drbdadm create-md mysql
md_offset 72826589184
al_offset 72826556416
bm_offset 72824332288

Found ext3 filesystem which uses 71119720 kB
current configuration leaves usable 71117512 kB

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 /dev/drbd0 v08 /dev/cciss/c0d1p1 internal create-md' terminated with exit code 40
drbdadm aborting

Primary drbd-overview:
0:mysql  Connected Secondary/Primary Diskless/UpToDate C r---

Secondary drbd-overview
0:mysql Connected Primary/Secondary UpToDate/Diskless C r--- /shared ext3 67G 1.9G 62G 3%

(FYI - drbd.conf should be attached - if it's not I will post a reply if anyone wants to see it)

Error logs:
[r...@primary ~]# drbdadm attach mysql
/dev/drbd0: Failure: (111) Low.dev. smaller than requested DRBD-dev. size.
Command 'drbdsetup /dev/drbd0 disk /dev/cciss/c0d1p1 /dev/cciss/c0d1p1 internal --set-defaults --create-device --on-io-error=detach' terminated with exit code 10


global {
minor-count 1;
}
resource mysql {
protocol C; # There are A, B and C protocols. Stick with C.

on primary.mycompany.com {
device /dev/drbd0; # The name of our drbd device.
disk /dev/cciss/c0d1p1;    # Partition we wish drbd to use.
address 192.168.200.210:7788; # Centos5a IP address and port number.
meta-disk internal; # Stores meta-data in lower portion of sdb1.
}

on secondary.mycompany.com {
device /dev/drbd0; # Our drbd device, must match node0.
disk /dev/cciss/c0d1p1;    # Partition drbd should use.
address 192.168.200.209:7788; # IP address of Centos5b, and port number.
meta-disk internal; #Stores meta-data in lower portion of sdb1.
}

disk {
on-io-error detach; # What to do when the lower level device errors.
}

net {
max-buffers 2048; #datablock buffers used before writing to disk.
ko-count 4; # Peer is dead if this count is exceeded.
#on-disconnect reconnect; # Peer disconnected, try to reconnect.
}

syncer {
rate 10M; # Synchronization rate, in megebytes. Good for 100Mb network.
#group 1;  # Used for grouping resources, parallel sync.
al-extents 257; # Must be prime, number of active sets.
}

startup {
wfc-timeout 0; # drbd init script will wait infinitely on resources.
degr-wfc-timeout 120; # 2 minutes.
}
}
 # End of resource mysql
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to