Every Cloud Needs a Silver Lining

Gilad Parann-Nissany

Subscribe to Gilad Parann-Nissany: eMailAlertsEmail Alerts
Get Gilad Parann-Nissany: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: Ubuntu Linux Journal, Entrepreneurs and Innovators

Blog Feed Post

Clustering Porticor-Protected Storage

Once you have created a secured disk on Porticor, it is almost trivial to build a highly-available RAID solution on top of it. We will demonstrate a RAID level 1 (mirrored) solution, but it can easily be extended to more sophisticated RAID levels.

Clustering Porticor Protected Storage

  • Create a disk, and expose it as an iSCSI target.
  • Go to the Virtual Appliances page, and create a second appliance in the same project.
  • Navigate to the second appliance, and create another iSCSI disk of the same size.
  • Mount both of these disks on your application server. Look up the Use It link for the particular disk for details on mounting it. Do not format the disks, only go as far as discovery and iSCSI login (the first two commands).
sudo iscsiadm --mode node ... -o new
sudo iscsiadm --mode node ... --login
  • Check out the main mount points (e.g. /dev/sdc) that were created for the disks:
ls -l /dev/disk/by-path
  • Now run (change the disk names as appropriate):
sudo mdadm --create --verbose --level=1 /dev/md0 -n 2 /dev/sdc /dev/sdd
  • Normally, this configuration should persist across reboots. If it doesn’t, make sure to add the following line to a startup script that runs late in the boot process, when remote filesystems have been mounted. Typically, /etc/rc.local should be that script.
mdadm --assemble --scan
  • To verify that things are working fine, run
sudo mdadm --detail /dev/md0
  • You should see the two disks listed, with the RAID synchronizing between the two (“state: resynching”).
  • To use your new, highly available storage, simply format /dev/md0 (use mkfs) and mount it, as you would a regular disk. Note that reconnecting to iSCSI might add a significant delay to the boot sequence, to the tune of 2-3 minutes.

Final comments: these instructions were tested on Ubuntu 11.04 and on Amazon Linux, but mdadm is common across all major Linux distributions. For further reading on RAID and its Linux implementation, see this three-article series.

Read the original blog entry...

More Stories By Gilad Parann-Nissany

Gilad Parann-Nissany, Founder and CEO at Porticor is a pioneer of Cloud Computing. He has built SaaS Clouds for medium and small enterprises at SAP (CTO Small Business); contributing to several SAP products and reaching more than 8 million users. Recently he has created a consumer Cloud at G.ho.st - a cloud operating system that delighted hundreds of thousands of users while providing browser-based and mobile access to data, people and a variety of cloud-based applications. He is now CEO of Porticor, a leader in Virtual Privacy and Cloud Security.