iSCSI targets with GlusterFS
While founding an IT home office work or small business, we can use our old computers as server. However the biggest problem is storage. Each of our machine have a variety of cpu, ram, and hard disk. We can manage these resources to establish efficient deployment. With help of glusterfs, we only relocate our applications with consideration of cpu and ram.
GlusteFS provides storage sharing and also raid property over network. If we use java, we can use hazelcast for cpu and ram using. However this solution may not apply with complicated solutions of our work. We need to have dedicated cpu, ram, and hard disk for each project. And these resources means money, and we do a small business, may be a startup.
For minimizing costs of cpu and ram, we can use virtualization. The solution for storage is building home made storage array which is a SAN. We may not buy a big SAN device because of costs. However building is very easy and cheap. Requirements are very little.
- A small computer with a lot of sata connector on it’s motherboard. It we can not afford money for buying such a capacity of sata connector, we can buy a cheap PCIe sata controller (search amazon or newegg).
- A lot of disks.
We attach disks to our small computer. Install a linux distribution, I prefer Centos 7. From here I assume that we installed Centos 7 on our storage computer. Install additional repository epel to our computer.
Building SAN is easy as following these steps:
- Create a raid device with our disks.
- Create lvm on raid device and format with your lovely file system, I prefer xfs.
- Create virtual disks with dd.
- Configure iscsi target for sharing virtual disks.
Voliá! You create a SAN box. You can attach your disks with iscsi utils on guest systems. Also for your computers and virtual servers, you can buy or create them without any storage and use your san box as disks for them. If your dedicated computer’s/server’s network card provides iscsi booting you can boot from your san box. If not, you can flash your network card or memory stick. Using gpxe provide booting from san box.
Your san box does not provide high availability. However if we build a second san box as same as our first one, we can easily provide ha. There will be a middle step between 2 and 3. Setup a gluster system with replication between these two san after step 2. And at step 3, create virtual disks on glusterfs mount. Hence we have two copy of virtual disks on different machines. When attaching disks on our SAN, we should add both two machine. Hence we have a multipath storage. If one of our san went down, other san will be serve our virtual disks.
I summarize the main steps of creating a home based san device. My future posts will be explain each step in a detailed way.
Please keep in touch.
Short Url:http://srkykzm.com/s/FATR3Uy