Ubuntu RAID
First, a clarification is urgent: we are not gone, but like so many, we have a life outside the blog that right now there is absorbing a lot, those who for various arguments, some to new jobs, some to old works where you need more effort than usual. There are people out there that claim, not realizing that we have better things to do.
That said, we had left last week with a dilemma that I was wearing: how to avoid losing all of my photographic archive, which is essential for my mental and physical balance? they were such different use of cubic expensive in total autonomy, other gadgets of dubious quality, even Google through RSS feeds, I found incredible characters willing to spend more than $1000 for a series of networked external HD. Some even put in a bank safe deposit box the HD directly.
In the end, thanks to the advice obtained by the comments of several users, I decided to entrust to a RAID solution, because it already owned a desktop PC with Ubuntu, fully functional and without screen. Want to know more?
As operating system I opted for Ubuntu Gutsy 7.10, with a normal installation procedure using the Desktop version. Then I loaded the SSH server and VNC, as I will have to do with a headless machine (wow, I learned that this is the name of the server without screen). Finally I set up Samba to share folders and printer with Win systems.
Let’s start with the SSH server:
sudo apt-get install openssh-server openssh-client
perfect. Remember to open port 22 on our firewall and router.
Now, the VNC server:
the other time I explained how to make a tunnel with PuTTY on the 5900 to use VNC over a secure ssh connection, since this protocol usually travels in the clear, making the system extremely vulnerable, I refer you to another article for the setting of this option . For now it works and it seems safe, if someone had something to add we are available here.
To avoid putting even the blind user name and pwd, I installed a VNC server session with the exhumation, according to this guide. Remember not to enable the remote desktop native Ubuntu (Wine), to avoid problems.
Well, now in the future I will always be able to access the intranet from my PC, even without a screen.
Now for the part of the backup.

This type of RAID does not perform any type of backup
RAID allows you to create different types of configurations, when they have at least 2 HD. The most common types that are used are certainly the
RAID 0 and
RAID 1, the first allows you to expand the amount of hard disk space available, just “
hanging” a HD after another, as if it were a ‘single unit. This type of
RAID does not perform any type of backup. For my needs I use
RAID 1 instead, which can be mirrored by one on another, completely copying and real-time content of a HD on the other. I am not versed in the other configurations because certainly out of scale with the objectives of this post
Anyway here’s the best guide, which I followed almost to the letter. For convenience and to make my google traced this process in the future, I will repeat it here on our blog.
Let’s start.

1) I installed on my motherboard card xsataci Hamlet for the two SATA inputs necessary that I missed. Little stuff (20€, and this figure is true), but he does his duty. Warning: This card can also function as RAID, but in reality is within the so-called fakeraid, then loads all the processes on the CPU of the PC, with a possible slowdown in general.
2) I put the two HD 320gb (Western Digital).
3) install gparted
sudo apt-get install gparted
4) create an ext3 partition on each of the two hard disks (in my case it was /dev/sdb1 and /dev/sda1)
5) to create a RAID, the best program for effectiveness and ease of use mdadm seems to be:
sudo apt-get install mdadm
6) build our RAID array:
sudo mdadm-C /dev/md0 -l1 -n2 /dev/sdb1 /dev/sda1
(So-Create a raid /dev/md0 -level=1 with the number 2-device: sdb1 and sda1)
7) check that all is well:
sudo mdadm-D /dev/md0
8) right now, but the array does not have a filesystem that allows us to work, so we use
sudo mkfs-t ext3-L-NAME-OF-PARTITION /dev/md0
9) will create the folder in which the mount
sudo mkdir /media/RAID
10) we must ensure that this partition is mounted at boot time, so usually we open /etc/fstab:
sudo gedit /etc/fstab
and add this line:
/dev/md0 /media/RAID ext3 defaults 0 0
11) well, now mount the drive and you’re done! you can do it through disk-manager, excellent utility to automatically set the partitions to automatically mount at boot.
12) side note: given my ignorance, when fitted to the new units corresponding to the RAID, I discover with pleasure that I write permission, make me directed by the kindly note that by default only root can write to these partitions and that permits the user are set later. To resolve this quirks, it was enough to beat in the terminal:
sudo chmod 777 /media/RAID
That said, we have a fileserver that RAID can also share a network with Windows systems by simply pointing the mount in the folder paths to be shared with Samba.