<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Chad Sine wrote:
<blockquote
cite="mid:g2r6a70b1aa1004281452u7b6456f9qd827444110e60655@mail.gmail.com"
type="cite">DRBD Users,<br>
<br>
I'm setting up 2 CentOS 5.4 x86_64 servers to use DRBD. I set them up
to do RAID1, but /dev/drbd0 only shows up at 12GB instead of the 1.8 TB
that the underlying devices have.<br>
<br>
Both boxes are configured just like this, with 1800GB for /dev/sda4<br>
<br>
<div style="margin-left: 40px;">[root@centos54 etc]# parted<br>
GNU Parted 1.8.1<br>
Using /dev/sda<br>
Welcome to GNU Parted! Type 'help' to view a list of commands.<br>
(parted) print<br>
<br>
Model: Dell VIRTUAL DISK (scsi)<br>
Disk /dev/sda: 2000GB<br>
Sector size (logical/physical): 512B/512B<br>
Partition Table: msdos<br>
<br>
Number Start End Size Type File system Flags<br>
1 32.3kB 206MB 206MB primary ext3 boot<br>
2 206MB 108GB 107GB primary ext3<br>
3 108GB 120GB 12.8GB primary ext3<br>
4 120GB 1920GB 1800GB primary<br>
</div>
<br>
Here is the /etc/drbd.conf used on each<br>
<br>
<div style="margin-left: 40px;">global { usage-count no; }<br>
common { syncer { rate 1000M; } }<br>
resource drbd-data {<br>
protocol C;<br>
startup {<br>
wfc-timeout 15;<br>
degr-wfc-timeout 60;<br>
become-primary-on centos54;<br>
}<br>
<br>
# disk {<br>
# size 1700G;<br>
# }<br>
net {<br>
cram-hmac-alg sha1;<br>
shared-secret "myP4$$";<br>
}<br>
on centos54 {<br>
device /dev/drbd0;<br>
disk /dev/sda3;<br>
address <a moz-do-not-send="true"
href="http://10.0.0.1:7787">10.0.0.1:7787</a>;<br>
meta-disk internal;<br>
}<br>
on centos54_2 {<br>
device /dev/drbd0;<br>
disk /dev/sda3;<br>
address <a moz-do-not-send="true"
href="http://10.0.0.2:7787">10.0.0.2:7787</a>;<br>
meta-disk internal;<br>
}<br>
}<br>
</div>
<br>
>From there, I ran the following command to create the md on each box<br>
<pre style="margin-left: 40px;"><font size="4"><span
style="font-family: arial,helvetica,sans-serif;"># drbdadm create-md drbd-data</span></font>
</pre>
<br>
Then I ran the following command on the primary system<br>
<pre style="margin-left: 40px;"><font size="4"># drbdadm -- --overwrite-data-of-peer primary drbd-data</font>
</pre>
Everything looks to synchronize with UpToDate for each device and
centos54 is primary.<br>
<br>
However, now if I run parted on /dev/drbd0, it is only 12 GB, instead
of 1.8TB. I tried doing the following, but I still only get a 12GB
partition<br>
<br>
# mkfs.ext3 /dev/drbd0<br>
# mount /dev/drbd0 /media<br>
<br>
What can I do to get the full 1.8 TB of mirrored storage?
Unfortunately, I don't have the output of the last few commands
available, sine the server is in use at the moment. I'll be able to
test and give proper output this weekend, when I swap out hard drives
and attempt this transition again.<br>
</blockquote>
<br>
according to the output of parted, sda3 is 12.8GB in size and, what do
ya know, you told drbd to use /dev/sda3 for the disk of the drbd-data
resource. so it did exactly what you told it. if you want to use the
1.8TB, change drbd to use sda4.<br>
<br>
mike<br>
</body>
</html>