Thursday, January 31, 2013

Dropbox Cloud for Small Business Backups

Making a Dropbox Cloud for Small Business Backups is simpler than you might imagine. Nowadays there are all kinds of technologies available for synchronizing your data online and by making use of some of the more mainstream ones (Dropbox and SugarSync) the average user has the ability to create a powerful linked set of backups for a small customer-centric consulting business without incurring high overhead costs from the cloud service industry. This write-up shows one way of maximizing the available free services paired with a single paid service account. It was also the result of some research into the limits of sync/backup tools.

The disclaimer in this talk is that in no way should a person or organization ever violate the terms of service for either of these companies - let's play nicely with two services that can really help create a sense of security and organization for important data backups as well as produce a simple way to coordinate on projects between those in-the-field and those in the home office. Also, "high overhead costs" are actually not so high for most data-conscious individuals, so a paid account in either of these services might be enough for most users. This is just an example of pushing the envelope using cloud sync tools.

Goal: Create a central point by which all data for three (or more) different accounts can be safely and successfully backed up using current Dropbox and SugarSync technology.

Symptom: A business has three different sets of data for three different customers and wants to keep that data separate when working at each of the customer sites and also backed up together at the home office.

Reason: Customers should not see other customer data, but there are important files needed remotely at customer sites. If network connectivity is no issue, then we needn't port everything via "sneaker-net" to the customer site.

Results: Using three separate Dropbox accounts and one master SugarSync account, the data is successfully kept separate remotely and backed up properly in the home office.

Sunday, January 13, 2013

Resizing Ext4 Partitions on a LIVE CentOS Virtual Machine

Goal: Increase the storage space for the variable data partition (/var) on a system without re-installing from scratch (Resizing Ext4 Partitions on a LIVE CentOS Virtual Machine).

Symptom: The current partition has 30GB for testing mode, but we need about 250GB to go "live" in production mode.

Reason: We re-sized the partition "live" in order to avoid reconfiguration of the virtual machine from scratch.

Results: The virtual HDD/LVM partition was successfully changed and re-sized to the new size without reconfiguration of the machine.

Have the VMWARE administrator increase the capacity of the virtual HDD attached to the machine.  If possible, the VMWARE admin should also perform the resize using the “boot image” of the OS with HDD utilities (such as GPARTED).  If not possible, follow these steps carefully!

Changing the Virtual HDD size:

With the VM booted and from within the VM OS:

  • Optional: stop all processes such as apache/mysql and other client applications

  • Run “fdisk” on the HDD device (/dev/sda): # fdisk /dev/sda

  • Note the start cylinder for the existing data partition and the partition type: For example: start cylinder 64 - type 8e linux LVM

  • Delete the partition (dangerous - be careful) - e.g. (d) then number 2!

  • Recreate the partition table entry using the old start cylinder and new maximum size (n), primary partition, etc)

  • Change the partition type to the former type using (t) command:

  • Write the partition table (w) and the reboot the VM.

Resizing the “VG/LV/FS”:

First,  resize the physical volume using this command: sudo pvresize /dev/sda2

Next, note “free PE” from this command: # sudo vgdisplay

Then find the LV name:  # df -h

Extend the LV to the new maximum size available:
# sudo lvextend /dev/mapper/VolGroup-lv_root --extents +56319
(note the +56319 comes from the vgdisplay command which shows the Free PE)

This increases the file system size to the new size.  
# sudo resize2fs /dev/mapper/VolGroup-lv_root
It may take a long time to run this command.

Reboot the system.  Verify the change in file system with the command: # df -h

[thomw@vm ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root    245G   17G  217G   7% /
tmpfs                    499M     0  499M   0% /dev/shm
/dev/sda1             485M  118M  342M  26% /boot