LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware (12.2/13) as a High Availability NAS Server (https://www.linuxquestions.org/questions/slackware-14/slackware-12-2-13-as-a-high-availability-nas-server-737185/)

zordrak 07-02-2009 07:19 AM

Slackware (12.2/13) as a High Availability NAS Server
 
Heylo..

I'm about to put together a new NAS solution here, and wanted to get some feedback on the choices/potential pitfalls.

I intend to run two servers in a high availability configuration using drbd & heartbeat on slackware 12.2 (or 13 depending on when it arrives). I personally have no experience with drbd or heartbeat yet, but the research says it's the only way to go.

The data will be stored on a mixture of Seagate and Western Digital 1TB disks, all hooked up through a 3ware 12-lane 9650SE-12ML. Initially there'll be 4x1TB disks in RAID6 with a fifth as a hot spare in each server. And there'll be a RAID1 on velociRaptors for the OS. The data will then be accessed via NFS and Samba from a number of different client OSes. It will be a big mixture of office stuff, source code, large binaries, and massive amounts of simulation data and silicon chip layouts.

Obviously I'm thinking about the Slackware-specific issues here. I have run Slack on a supermicro board like this one will be before and am happy with the configuration of NAS/Samba for the layout, but haven't ever run slack with drbd, heartbeat or 3ware raid. Also, I'm looking at getting an APC UPS each for the servers, but again, I haven't run Powerchute with slackware before for graceful shutdown in the event of prolonged outage.

Anything to comment?

Chuck56 07-02-2009 09:06 AM

I did a small fraction of what your planning with 2 Slack boxes using RAID0 and NBD as hosts for KVM guests. Each box has a single 1TB HD and they are connected with CAT5 through a D-Link 1GB switch. In my case both boxes are on a single APC UPS, no Powerchute, but with as many drives as you're supporting a UPS for each box is probably a better fit. DRDB was something I considered but was more than I wanted to tackle at the time. Powerchute is not something I'm familiar with but sounds like I should be.

I'll be interested in following your project. Good luck and keep us up to date!.

zordrak 07-02-2009 09:53 AM

The idea of having two UPSes isn't actually so that I can have one for each box - both will serve both boxes. Each server has 3 PSUs, two will be plugged in to one UPS, the third into the other one. This way, if one of the UPSes fail, both machines will remain available.

Chuck56 07-02-2009 11:35 AM

Triple PSUs, very nice! How does the power get distributed? This is the kind of stuff I can only dream about.

zordrak 07-03-2009 03:57 AM

Quote:

Originally Posted by Chuck56 (Post 3594481)
Triple PSUs, very nice! How does the power get distributed? This is the kind of stuff I can only dream about.

It's standard Supermicro kit. Have a browse round their site, it's all very nice :) This one's one of their 4U tower cases.

timsoft 12-07-2009 03:28 AM

regarding the apc part. You don't need powerchute. You can build a slack apcupsd package (get the slackbuild from slackbuilds.org or use sbopkg)
once you have done the manual changes as noted in the readme and set the daemon running, you can easily check the ups state by doing something like
Quote:

UPSSTAT=`cat /var/log/apcupsd.status|grep STATUS|awk '{print $NF}'`
this will give you a value of ONLINE when running from mains, or something else if on batteries,
or the time left in minutes with something like
Quote:

UPSTIME=`cat /var/log/apcupsd.status|grep "TIMELEFT"|awk '{print $(NF-1)}'`
for the minutes remaining.

As you will have each machine running on both ups's it makes it more complicated deciding what to do if one ups switches of or fails, and the other is still ok, but in the same status file is an indication of the running time available which at least gives you some more info to work with.

The defaults are to shutdown when there is only 3 minutes, or 5% of battery power left. you'll want to do your own thing here, as machine co-operation is essential.
Unless you have a dedicated crossover link between the two machines, running your network switch on dual power supplies and ups's will also be essential so that the two servers can co-operate. - have fun.!

zordrak 12-07-2009 03:49 AM

Ta, will note. Using powerchute for now and is serving my needs, but will consider this for future.

Slax-Dude 12-07-2009 01:45 PM

As for heartbeat: I have no experience with it so I can't offer any help.

As for DRDB: I prefer AoE because it scales better and is simpler to set up (not that DRDB is hard hehe).
With DRDB you either have an active/passive 2 node setup or an active/active setup (you'll need a cluster FS for this. I used OCFS2 and liked it a lot).
You are also "limited" to a RAID1.
This is fine in most situations.

With AoE (plus software raid) you can use whatever you want :)
You can have a 1 active node + "n" passives, or even "n" active nodes (again, need cluster FS for more than 1 active).
You can build a network RAID1 with 1+"n" disks (DRDB only lets you do 1+1) or even a RAID6 with 100 disks!
The only limit is your hardware (number of disks, NICs and switches).

Note: the AoE initiator is a kernel module, so Slackware already has this. All you need to do is compile the AoE target binary (I used vblade)
Get it here: http://aoetools.sourceforge.net/

zordrak 12-07-2009 03:00 PM

Quote:

Originally Posted by Slax-Dude (Post 3783031)
As for heartbeat:

As for DRDB:


Perhaps I should qualify that since the original post, I have finished the project. It's an extreme-redundancy RAID61 configuration using Pacemaker and DRBD.

The write-up, along with development SlackBuilds for the Pacemaker stack is available here:

http://blog.tpa.me.uk/high-availabil...rbd-pacemaker/

I have also created a SlackBuild for DRBD which is available on http://slackbuilds.org.

Chuck56 12-07-2009 03:17 PM

Thanks for sharing and nice write up! I couldn't find the DRDB SlackBuild as available, pending or approved?

zordrak 12-08-2009 03:26 AM

Quote:

Originally Posted by Chuck56 (Post 3783132)
Thanks for sharing and nice write up! I couldn't find the DRDB SlackBuild as available, pending or approved?

http://slackbuilds.org/repository/13.0/system/drbd/
http://blog.tpa.me.uk/2009/11/09/drbd-8-3-6-slackbuild/

Although it's only available in the 13.0 repository as the 12.2 and early repos are locked down, you should be able to use the build on any version of Slackware with a reasonably recent kernel.


All times are GMT -5. The time now is 06:52 PM.