Replication volumes and availability

Status
Not open for further replies.

rafaelfas

Cadet
Joined
Jul 27, 2012
Messages
9
Gentlemen,

I need help to set up two servers with iSCSI volumes to replicate each other, and if the master server fails, the slave server to assume the position and keep the disk availability automatically.
I managed to make a replica, but I do not know where to start creating availability.

thank you
 

flojo

Cadet
Joined
Jul 27, 2012
Messages
7
ACTUALLY I just read how he did it !!!!.

From the link above :

# CARP support & enable hastd daemon, if there is no if_carp.ko in /boot/kernel,
# copy it from FreeBSD 8.2 release

Cursing my self for missing that.

But then that makes me wonder. Why is ixsystems purposly leaving out that kernel module?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Basically because you're going to light your hair on fire and then it'll get worse from there.

You don't just need CARP. You also need to be replicating the data back and forth in realtime. This is tricky. Think about it. If you have a server running on iSCSI disks, and you suddenly yanked out the disks transparently and replaced them with the disks as they were an hour ago (when the last replication ran), you now have inconsistencies between the way the kernel thinks things are, and the way they are on your disks. You're screwed when you start accessing the disk, if you try to read or write anything that's changed recently, which also happens to be the stuff you're most likely to be accessing.

iSCSI isn't a good candidate for CARP, at least not without HAST and (probably) the use of device extents. I'm going to go so far as to say there's some userland infrastructure you almost certainly need as well, which means FreeNAS may not be optimal at this time for HA iSCSI (but I'm pretty sure it could be done).
 

rafaelfas

Cadet
Joined
Jul 27, 2012
Messages
9
Gentlemen, before the information you gave me and I've been reading you can do! I'm riding a imcubido how to get a noob to get it to work only with the help of how to! When finished sending to you enjoy! For now I'll break your head over here!

For now thank you very much!
 

flojo

Cadet
Joined
Jul 27, 2012
Messages
7
@jgreco

One thing I dont like is when projects or esp companies think on behalf of its users. I.e. Dont empower there users, by not providing them with the tools necessary.
Or plainly put, let them to fail to move forward. Thats how one learns.

I agree you dont just need carp, but what I dont understand is ... Hast is provided. Thats only half the tools.

Not everyone will too use ISCSI or Hast. Some will use NFS, CIFS, and then for HA, use the VIP. to mount on. If the machine dies, the other will take over.

Inclosing, anyone yanking disks deserves what they get, no matter what you use, be it iscsi, nfs, etc etc.
 

rafaelfas

Cadet
Joined
Jul 27, 2012
Messages
9
Dude you have to give me a help here setup CARP / HAST

following settings:


mount -uw /

################################################################################
############### RC.CONF ################
################################################################################

=============================hast1==============================================

cat <<EOF >> /conf/base/etc/rc.conf
ifconfig carp0 create
ifconfig_carp0="inet 192.168.136.130 netmask 255.255.255.0 vhid 1 pass mypassword advskew 1"
# enable HAST daemon
hastd_enable="YES"
EOF
cp /conf/base/etc/rc.conf /etc/

=============================hast2==============================================

cat <<EOF >> /conf/base/etc/rc.conf
ifconfig carp0 create
ifconfig_carp0="inet 10.1.1.180 netmask 255.255.255.0 vhid 1 pass mypassword advskew 100"
# enable HAST daemon
hastd_enable="YES"
EOF
cp /conf/base/etc/rc.conf /etc/
================================================================================

################################################################################

################################################################################
############### HOSTS ################
################################################################################

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

cat <<EOF >> /conf/base/etc/hosts
192.168.136.128 hast1
192.168.136.129 hast2
EOF

cp /conf/base/etc/hosts
================================================================================

################################################################################

################################################################################
############### HAST.CONF ################
################################################################################

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

cat <<EOF >> /conf/base/etc/hast.conf
resource disk1 {
on hast1 {
local /dev/ada1
remote 192.168.136.129
}
on hast2 {
local /dev/ada1
remote 192.168.136.128
}
}

resource disk2 {
on hast1 {
local /dev/ada2
remote 192.168.136.129
}
on hast2 {
local /dev/ada2
remote 192.168.136.128
}
}
EOF

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

################################################################################

################################################################################
############### HASTD ################
################################################################################


=============================hast1==============================================

/etc/rc.d/hastd start
########################################################################


only that whatever I do the following error:

/etc/rc.d/hastd stop
ifconfig: create: bad value
[ERROR] 'hast' user doesn't exist.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
One thing I dont like is when projects or esp companies think on behalf of its users. I.e. Dont empower there users, by not providing them with the tools necessary.
Or plainly put, let them to fail to move forward. Thats how one learns.

I agree you dont just need carp, but what I dont understand is ... Hast is provided. Thats only half the tools.

Not everyone will too use ISCSI or Hast. Some will use NFS, CIFS, and then for HA, use the VIP. to mount on.

When you're creating something like FreeNAS, you typically start small and then add in the things you need. Way back in the day, I stripped down FreeBSD to a bare kernel and a single-executable userland that would fit on a floppy to make diskless Xterminals. I wouldn't have been able to do it by using the existing init and standalone executables provided by the base system, there just wasn't that much space. The various miniBSD's generally followed the methodology of adding in only what was needed, often differently than it was done in the mainline distribution.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Well, I was explaining to you that no one deliberately made it so you couldn't do what you wanted. You can certainly add CARP to the system, either by rolling your own release or quite possibly by just adding the needed modules to the system. However, it will be a bit of an uphill battle until the developers start implementing the features natively.

Have you considered just installing FreeBSD and doing it the traditional way?
 
Status
Not open for further replies.
Top