Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Oct 9, 2008, at 9:03 AM, kevin kempter wrote: > > On Oct 9, 2008, at 9:00 AM, kevin kempter wrote: > >> >> On Oct 9, 2008, at 8:56 AM, Timh Bergström wrote: >> >>> No need to fdisk-remove the filesystem on /dev/sda2, just force >>> creation of meta-data on r0. When the drbd-modules are loaded and >>> services are started, you only need to run mkfs.ext3 /dev/drbd1 and >>> then mount it wherever you want, mount -t ext3 /dev/drbd1 >>> /my/mount/point. >>> >>> You are really missing the point with drbd. You should go back to >>> the >>> documentation; http://www.drbd.org/users-guide-emb/ch-configure.html >>> and follow the "how-to" there. >>> >>> //T >>> >>> >> ok, I'm walking thru the doc again. This time I did a yum install >> drbd >> however, once the rpm install finished I tried this: >> >> # modprobe drbd >> FATAL: Module drbd not found. > > My mistake -- I spoke (emailed) too soon. Apologies. >> >> >> Is the modprobe bit not required for an RPM install ? >> >>> >>> 2008/10/9 kevin kempter <kevin at kevinkempterllc.com>: >>>> >>>> On Oct 9, 2008, at 8:37 AM, Timh Bergström wrote: >>>> >>>>> 2008/10/9 kevin kempter <kevin at kevinkempterllc.com>: >>>>>> >>>>>> On Oct 8, 2008, at 3:36 PM, Florian Haas wrote: >>>>>> >>>>>>> On 10/08/2008 11:04 PM, Jerry Amundson wrote: >>>>>>>> >>>>>>>> On Wed, Oct 8, 2008 at 3:33 PM, kevin kempter >>>>>>>> <kevin at kevinkempterllc.com> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> 1) I setup 2 new installs of CentOS v5 (32bit) as VM's via >>>>>>>>> vmware >>>>>>>>> server >>>>>>>>> on >>>>>>>>> a Dell 2900 (quad core, 16Gram, single RAID slice, etc) >>>>>>>>> >>>>>>>>> Note: I created /stage as a separate ext2 filesystem >>>>>>>>> (mounted from >>>>>>>>> /dev/sda2). This is the filesystem I want to replicate with >>>>>>>>> drbd >>>>>>>> >>>>>>>> That will need to be re-made on the drbd device. >>>>>>> >>>>>>> Wrong. If you shrink the filesystem (resize2fs) to make room >>>>>>> for DRBD's >>>>>>> metadata, you will be able to replicate the existing data >>>>>>> without >>>>>>> remaking the filesystem. If you need to keep that data. >>>>>>> >>>>>>> After you have shrunk your filesystem (shrink by 128M to be on >>>>>>> the safe >>>>>>> side), you want to do exactly what your original error message >>>>>>> told you, >>>>>>> namely use "drbdadm create-md <resource>" to create your >>>>>>> metadata. >>>>>>> >>>>>>> Btw: ext2, being a non-journaling filesystem, is a really bad >>>>>>> choice for >>>>>>> HA environments. Use ext3. >>>>>>> >>>>>>> Florian >>>>>>> >>>>>>> -- >>>>>>> : Florian G. Haas >>>>>>> : LINBIT Information Technologies GmbH >>>>>>> : Vivenotgasse 48, A-1120 Vienna, Austria >>>>>>> >>>>>>> When replying, there is no need to CC my personal address. >>>>>>> I monitor the list on a daily basis. Thank you. >>>>>>> >>>>>>> LINBIT(R) and DRBD(R) are registered trademarks of LINBIT. >>>>>>> _______________________________________________ >>>>>>> drbd-user mailing list >>>>>>> drbd-user at lists.linbit.com >>>>>>> http://lists.linbit.com/mailman/listinfo/drbd-user >>>>>> >>>>>> >>>>>> Hi All; >>>>>> >>>>>> I'm finding no luck with anything I've tried. So I've decided >>>>>> to go back >>>>>> to >>>>>> ground zero and walk through a proper setup. A few questions: >>>>>> >>>>>> I've setup 2 brand new CentOS 5 VM's (via vmware server). I'm >>>>>> wanting to >>>>>> use >>>>>> internal meta-data to keep things simple. >>>>>> >>>>>> How do I need to prepare the disk ? this far I've created a >>>>>> partition >>>>>> (/drbd_data) as an ext3 filesystem as part of the initial disk >>>>>> partitioning >>>>>> (in the CentOS install) on both servers. Is this correct? >>>>> >>>>> Why? If you do not already have any data that you want to >>>>> preserve in >>>>> this space, just dont create a filesystem on it at all, do that >>>>> when >>>>> drbd is set up and started. >>>>> >>>> Since I already created it, do I need to use fdisk and remove it? >>>> >>>>>> >>>>>> Also, do I need to unmount these /drbd_data file systems before >>>>>> attempting >>>>>> to startup drbd ? >>>>> >>>>> It should not be mounted as it should not contain a filesystem, >>>>> see above. >>>>> >>>>>> >>>>>> >>>>>> Next steps: >>>>>> 1) install the drbd RPM's on both servers >>>>>> >>>>>> 2) modprobe drbd (on both servers) >>>>>> >>>>>> 3) create the /etc/drbd.conf file on both servers >>>>>> >>>>>> 4) run drbdadm create-md 'resource' on the master node >>>>>> >>>>>> 5) run drbdadm attach 'resource' on the master node >>>>> >>>>> After this step, you should create the filesystem on the DRBD >>>>> resource >>>>> (ie. mkfs.ext3 (read manual for options) /dev/drbd1) not /dev/ >>>>> sda2. >>>>> Then connect it - then mount the DRBD-resource. And you only >>>>> have to >>>>> create the filesystem on the master node, which will be >>>>> replicated to >>>>> the slave-node with drbd. >>>>> >>>> In the drbd.conf file the on resource entries (in the samples) >>>> show device >>>> and disk entries that are both /dev/xx I'm confused on the >>>> difference. >>>> If I create an ext3 fs at /dev/sda2 how do I associate this >>>> device with >>>> something like /dev/drbd1 ? Is /dev/drbd1 simply the mount point ? >>>> >>>> >>>>>> >>>>>> 6) run drbdadm connect 'resource' on the master >>>>>> >>>>>> >>>>>> Previously when I tried to run step 4 I got error messages, >>>>>> trying to use >>>>>> a >>>>>> minimal config using internal meta data >>>>>> >>>>>> Does the above sound correct ? Am I missing anything ? >>>>>> >>>>>> Thanks in advance >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> drbd-user mailing list >>>>>> drbd-user at lists.linbit.com >>>>>> http://lists.linbit.com/mailman/listinfo/drbd-user >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Timh Bergström >>>>> System Administrator >>>>> Diino AB - www.diino.com >>>>> :wq >>>> >>>> >>> >>> >>> >>> -- >>> Timh Bergström >>> System Administrator >>> Diino AB - www.diino.com >>> :wq >> > OK, I'm doing some more reading. I get that the disk entry in my on command (in /etc/drbd.conf) should be the actual disk device and the device entry is the device that drbd will ultimately create for me as part of this setup process. So, I have a 4G disk partition (ext3) which is currently not mounted. Before I unmounted it I can see it in a df: # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 4.1G 14G 24% / tmpfs 2.0G 0 2.0G 0% /dev/shm /dev/sda2 3.9G 73M 3.7G 2% /drdb_data Next I ran umount /dedb_data # umount /drdb_data # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 4.1G 14G 24% / tmpfs 2.0G 0 2.0G 0% /dev/shm I installed the drbd kernel module and drbd via yum on both servers Then I setup the same drbd.conf file on both servers: # global { usage-count yes; } common { protocol C; } resource r0 { on CentOS-32-VM1 { device /dev/drbd1; disk /dev/sda2; address 192.168.1.11:7789; meta-disk internal; } on CentOS-32-VM2 { device /dev/drbd1; disk /dev/sda2; address 192.168.1.10:7789; meta-disk internal; } } And finally I tried to start the configuration/setup by running the create-md command (and it bombs): # drbdadm create-md r0 Found ext3 filesystem which uses 4192964 kB current configuration leaves usable 4192800 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/drbd1 v08 /dev/sda2 internal create-md' terminated with exit code 40 drbdadm aborting Thoughts ? Any help would be greatly appreciated.. Thanks in advance.