HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Failover with VMWare Server - /var/vm isn't the right size.. (http://www.howtoforge.com/forums/showthread.php?t=25763)

Bart van Kleef 5th August 2008 10:48

VMware use hda5 instade of hda6 for the VM's
 
Firstly, I'll try to make my question as clearly as possible, despite my poor English and thanks for making the great howto's! After strictly follow this and this howto, saves VMware Server (2.0 Release Candidate 1) the VM's on hda5 as I set hda6. And I see nowhere (with fdisk-l or df -h) /dev/drbd0... :confused:

Here what I've done:
Befor the installation of VMware, I have created a new directory as in the aforementioned how to was described by:
Code:

mkdir /var/vm
To save the VM's on that location. During the installation of VMware Server I also changed the Datastore default in /var/vm. (So from here it is obvious that the VM's to be saved on hda5.)
But because DRBD is set at hda6 (see drbd.conf) and I enter
Code:

mount-t ext3 /dev/drbd0 /var/vm
what the location changes from /var/vm on hda5 to /var/vm on hda6, right?

My partition scheme is as follows:
/dev/hda1 | 0.01 GB | boot (primary, ext3, bootable flag: on)
/dev/hda5 | 3.80 GB | / (logical, ext3)
/dev/hda6 | 25.4 GB | unmounted (logical, ext3, will contain the /var/vm directory)
/dev/hda7 | 1.00 GB | swap (logical, swap)

But hda6 should be well formatted with ext3 or just created?

The output from fdisk -l shows:
Code:

Disk /dev/hda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1          12      96358+  83  Linux
/dev/hda2              13        3738    29929095    5  Extended
/dev/hda5              13        474    3710983+  83  Linux
/dev/hda6            475        3611    25197921  83  Linux
/dev/hda7            3612        3738    1020096  82  Linux swap / Solaris

And df -h:
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5            3.5G  3.2G  197M  95% /
tmpfs                380M    0  380M  0% /lib/init/rw
udev                  10M  44K  10M  1% /dev
tmpfs                380M    0  380M  0% /dev/shm
/dev/hda1              92M  12M  75M  14% /boot

My drbd.conf:
Code:

resource vm1 {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f";
  startup {
    wfc-timeout 10;            # 10 seconds
    degr-wfc-timeout 30;        # 30 seconds
  }
  disk {
    on-io-error detach;
  }
  net {
    max-buffers 20000;          # Play with this setting to achieve highest possible performance
    unplug-watermark 12000;    # Play with this setting to achieve highest possible performance
    max-epoch-size 20000;      # Should be the same as max-buffers
  }
  syncer {
    rate 10M;          # Use more if you have a Gigabit network, speed is in Kylobytes. e.g.: 10M = 10Megabytes
    group 1;
    al-extents 257;
  }
  on server1.home {                  # Use the exact hostname of your server as give by the command "uname -n"
    device    /dev/drbd0;              # Drbd device ID
    disk      /dev/hda6;              # physical disk device, check your partitioning scheme!
    address    192.168.1.15:7789;      # Fixed IP address of Sproetjuh.home
    meta-disk  internal;                # I use internal metadata storage
  }
  on server2.home {
    device    /dev/drbd0;
    disk      /dev/hda6;
    address    192.168.1.17:7789;
    meta-disk  internal;
  }
}

I hope you can help me :D because I really do not know where I should start right now.. :(

Bart van Kleef 6th August 2008 12:50

81 views and no answer? Come on I really need your help :(

falko 6th August 2008 13:51

I haven't tried the VMware replication howto, but have you tried to contact the author?

Bart van Kleef 6th August 2008 19:09

Thank you for your reply Falko, I'll follow your suggestion right now! :)

Greetings from The Netherlands!

thanis 8th August 2008 23:20

Hi Bart,

It seems that your DRBD device is not started. Did you start DRBD ? You should not be able to see /dev/hda6. Please let me know at what point of the tutorial you are, as I think you have skipped some steps.

Grtz from Belgica :)
Groeten uit Antwerpen.

Bart van Kleef 11th August 2008 22:45

Thank you for taking your time thanis, and others who reading this reply right now! I've followed your how to (step for step) again and again with a new installation on both servers. But whatever I do after a reboot of the two servers drbd0 isn't mounted. Not even when I run /etc/init.d/drbd stop/start/restart.
When I try to mount it again (mount -t ext3 /dev/drbd0 /var/vm) I get the following: mount: block device /dev/drbd0 is write-protected, mounting read-only mount: /dev/drbd0 already mounted or /var/vm busy
I have no idea what I'm doing wrong, I hope you do!!

Friendly greetings,

Bart van Kleef

thanis 12th August 2008 16:34

Bart, your main issue is the not starting of the DRBD volume. What error do you get when running /etc/init.d/drbd start ? Can you post your drbd.conf for both servers ?

thanks,
Thanis

Bart van Kleef 12th August 2008 17:33

Thanis, thanks again! :) The rare thing is, I get no error when I run "/etc/init.d/drbd start"

Code:

sproetjuh:~# /etc/init.d/drbd start
Starting DRBD resources:    [ ].
sproetjuh:~# /etc/init.d/drbd stop
Stopping all DRBD resources.
sproetjuh:~# /etc/init.d/drbd start
Starting DRBD resources:    [ d0 s0 n0 ].

Code:

kimmetjuh:~# /etc/init.d/drbd start
Starting DRBD resources:    [ ].
kimmetjuh:~# /etc/init.d/drbd stop
Stopping all DRBD resources.
kimmetjuh:~# /etc/init.d/drbd start
Starting DRBD resources:    [ d0 s0 n0 ].

And here are the configs:

Code:

sproetjuh:~# cat /etc/drbd.conf
resource vm1 {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f";
  startup {
    wfc-timeout  10;            # 10 seconds
    degr-wfc-timeout 30;    # 30 seconds
  }
  disk {
    on-io-error  detach;
  }
  net {
    max-buffers  20000;                # Play with this setting to achieve highest possible performance
    unplug-watermark  12000;          # Play with this setting to achieve highest possible performance
    max-epoch-size 20000;              # Should be the same as max-buffers
  }
  syncer {
    rate 10M;          # Use more if you have a Gigabit network. Speed is in Kylobytes. e.g.: 10M = 10Megabytes
    group 1;
    al-extents 257;
  }
  on sproetjuh {                # Use the EXACT hostname of your server as give by the command "uname -n"
    device    /dev/drbd0;              # drbd device ID
    disk      /dev/hda6;              # physical disk device , check your partitioning scheme !!
    address    192.168.1.13:7789;      # Fixed IP address of server1
    meta-disk  internal;                # I use internal metadata storage
  }
  on kimmetjuh {
    device    /dev/drbd0;
    disk      /dev/hda6;
    address    192.168.1.15:7789;
    meta-disk  internal;
  }
}

Code:

kimmetjuh:~# cat /etc/drbd.conf
resource vm1 {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f";
  startup {
    wfc-timeout  10;            # 10 seconds
    degr-wfc-timeout 30;    # 30 seconds
  }
  disk {
    on-io-error  detach;
  }
  net {
    max-buffers  20000;                # Play with this setting to achieve highest possible performance
    unplug-watermark  12000;          # Play with this setting to achieve highest possible performance
    max-epoch-size 20000;              # Should be the same as max-buffers
  }
  syncer {
    rate 10M;          # Use more if you have a Gigabit network. Speed is in Kylobytes. e.g.: 10M = 10Megabytes
    group 1;
    al-extents 257;
  }
  on sproetjuh {                # Use the EXACT hostname of your server as give by the command "uname -n"
    device    /dev/drbd0;              # drbd device ID
    disk      /dev/hda6;              # physical disk device , check your partitioning scheme !!
    address    192.168.1.13:7789;      # Fixed IP address of server1
    meta-disk  internal;                # I use internal metadata storage
  }
  on kimmetjuh {
    device    /dev/drbd0;
    disk      /dev/hda6;
    address    192.168.1.15:7789;
    meta-disk  internal;
  }
}

Code:

sproetjuh:~# cat /proc/drbd
version: 0.7.21 (api:79/proto:74)
SVN Revision: 2326 build by root@sproetjuh, 2008-08-11 23:40:44
 0: cs:Connected st:Secondary/Secondary ld:Consistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

Code:

kimmetjuh:~# cat /proc/drbd
version: 0.7.21 (api:79/proto:74)
SVN Revision: 2326 build by root@kimmetjuh, 2008-08-12 16:54:02
 0: cs:Connected st:Secondary/Secondary ld:Consistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

Code:

sproetjuh:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5            4.5G  1.6G  2.7G  38% /
tmpfs                1015M    0 1015M  0% /lib/init/rw
udev                  10M  44K  10M  1% /dev
tmpfs                1015M    0 1015M  0% /dev/shm
/dev/hda1              92M  12M  75M  14% /boot

Code:

kimmetjuh:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5            4.5G  1.6G  2.7G  38% /
tmpfs                1015M    0 1015M  0% /lib/init/rw
udev                  10M  44K  10M  1% /dev
tmpfs                1015M    0 1015M  0% /dev/shm
/dev/hda1              92M  12M  75M  14% /boot

Code:

sproetjuh:~# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1          12      96358+  83  Linux
/dev/hda2              13        9729    78051802+  5  Extended
/dev/hda5              13        596    4690948+  83  Linux
/dev/hda6            597        9483    71384796  83  Linux
/dev/hda7            9484        9729    1975963+  82  Linux swap / Solaris

Code:

kimmetjuh:~# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1          12      96358+  83  Linux
/dev/hda2              13        9729    78051802+  5  Extended
/dev/hda5              13        596    4690948+  83  Linux
/dev/hda6            597        9483    71384796  83  Linux
/dev/hda7            9484        9729    1975963+  82  Linux swap / Solaris


Isn't this the problem:

Code:

sproetjuh:~# cat /proc/drbd
version: 0.7.21 (api:79/proto:74)
SVN Revision: 2326 build by root@sproetjuh, 2008-08-11 23:40:44
 0: cs:Connected st:Secondary/Secondary ld:Consistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

And again you're my only hope..

Cordial greetings and thanks for your help,

Bart van Kleef

thanis 12th August 2008 20:12

Hi Bart,

I'm guessing you skipped a part of the howto :)

Please review this:
Code:

Now we define "server1" as the primary/master server:

On "sproetjuh":

drbdsetup /dev/drbd0 primary --do-what-I-say
mkfs.ext3 /dev/drbd0

Wait a while to have the "ext3" filesystem created on /dev/drbd0 and then:

drbdadm connect all

If you don't get errors, you should be able to continue the howto (e.g. mount the /var/vm etc ...). If you do get errors using any of these commands, please post it here !

Grtz,
Thanis

Bart van Kleef 12th August 2008 20:33

Thanis,

No that's not the point where I went wrong. :( If I can believe google secondary/secondary is normal. Heartbeat makes one primary.

But you're right when I run on sproetjuh:

Code:

drbdsetup /dev/drbd0 primary --do-what-I-say
mkfs.ext3 /dev/drbd0

mount -t ext3 /dev/drbd0 /var/vm

Is drbd0 showed in the output of df -h! :)

But after a reboot the status of drbd is again secondary/secondary and drbd0 is gone in df -h..

So I guess its hearbeat, here are my configs:

Code:

sproetjuh:~# cat /etc/ha.d/ha.cf
logfile /var/log/ha-log
logfacility    local0
keepalive 1
deadtime 10
warntime 10
udpport 694
bcast  eth1
auto_failback off
node    sproetjuh  ## make sure both names are accessible - check /etc/hosts
node    kimmetjuh
ping 10.1.1.15  ## Enter an IP address that is pingable from the ETH0 network !!
respawn hacluster /usr/lib/heartbeat/ipfail

Code:

kimmetjuh:~# cat /etc/ha.d/ha.cf
logfile /var/log/ha-log
logfacility    local0
keepalive 1
deadtime 10
warntime 10
udpport 694
bcast  eth1
auto_failback off
node    sproetjuh  ## make sure both names are accessible - check /etc/hosts
node    kimmetjuh
ping 10.1.1.13  ## Enter an IP address that is pingable from the ETH0 network !!
respawn hacluster /usr/lib/heartbeat/ipfail

Code:

sproetjuh:~# cat /etc/ha.d/authkeys
auth 3
3 md5 failover  ## this is just a string, enter what you want ! auth 3 md5 uses md5 encryption

Code:

kimmetjuh:~# cat /etc/ha.d/authkeys
auth 3
3 md5 failover  ## this is just a string, enter what you want ! auth 3 md5 uses md5 encryption

Code:

sproetjuh:~# cat /etc/ha.d/haresources
sproetjuh 192.168.1.13 drbddisk::vm1 Filesystem::/dev/drbd0::/var/vm::ext3 vmstart

Code:

kimmetjuh:~# cat /etc/ha.d/haresources
sproetjuh 192.168.1.13 drbddisk::vm1 Filesystem::/dev/drbd0::/var/vm::ext3 vmstart

And "ifconfig |more" don't give me any "eth0:0" but:

Code:

sproetjuh:~# ifconfig |more
eth0      Link encap:Ethernet  HWaddr 00:04:75:A9:E6:01
          inet addr:192.168.1.13  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::204:75ff:fea9:e601/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:700 errors:0 dropped:0 overruns:0 frame:0
          TX packets:686 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:56704 (55.3 KiB)  TX bytes:66691 (65.1 KiB)
          Interrupt:185 Base address:0xaf80

eth1      Link encap:Ethernet  HWaddr 00:04:75:A9:E6:B3
          inet addr:10.1.1.13  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::204:75ff:fea9:e6b3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6945 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6945 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1072187 (1.0 MiB)  TX bytes:1072200 (1.0 MiB)
          Interrupt:177 Base address:0x4f00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3326 (3.2 KiB)  TX bytes:3326 (3.2 KiB)

vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01
          inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Code:

kimmetjuh:~# ifconfig |more
eth0      Link encap:Ethernet  HWaddr 00:04:75:A9:E7:AE
          inet addr:192.168.1.15  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::204:75ff:fea9:e7ae/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:684 errors:0 dropped:0 overruns:0 frame:0
          TX packets:830 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:57395 (56.0 KiB)  TX bytes:77289 (75.4 KiB)
          Interrupt:185 Base address:0x6f80

eth1      Link encap:Ethernet  HWaddr 00:04:75:8C:4E:3C
          inet addr:10.1.1.15  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::204:75ff:fe8c:4e3c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7312 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7317 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1129181 (1.0 MiB)  TX bytes:1129476 (1.0 MiB)
          Interrupt:177 Base address:0x8f00

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3326 (3.2 KiB)  TX bytes:3326 (3.2 KiB)

vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01
          inet addr:192.168.4.1  Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Thanks a lot for all your time! You're my hero ;)


All times are GMT +2. The time now is 21:31.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.