Archive

Posts Tagged ‘fakeraid’

Installing a RAID on “hardware” with fakeraid and Ubuntu

October 10th, 2011 No comments

If you have motherboards with raid directly on the plate and want to install Linux, you probably need to fall back on software RAID … unless your controller is supported by the project fakeraid. This is not ‘a guide to replace the complete how-to but rather a reminder of the past 2 days to install one server supermicro raid with the “hardware” …

Therefore, our configuration was quite simple: 3 Disc 2 in raid 1 and a separate back up the historical data with our automatic script. we created a RAID from the bios screen text by choosing the first two records and making the raid sync (which took about one hour or so).

In these cases the problem stems from the fact that the installer of the distribution have to be aware of how to manage the controller to be able to install the operating system. Also, if in init RAM disk that is made from grub dmraid is not added to the module, the system, although installed will not start on the next reboot.

The distribution and ‘fell on a ubuntu server how to fakeraid of the page we read that the 8.10 alternate or server is already’ in the process of recognition of fake raid setup then, although support for hardy is 5 years instead of the ‘ dell’ intrepid year and a half, for convenience we have installed it. In fact everything at startup ‘and the system went smoothly, and’ installed without any major problems … The kernel has recognized the device as /dev/mapper/ddf1_root and the two partitions /dev/mapper/ddf1_root1 and /dev/mapper/ddf1_root2

I’ll Tell you to avoid wasting your time precious: Currently, the kernel that comes with Intrepid has a problem of restarting the operating system from the first reboot after installation: Although the form was present in the initrd and despite dmraid with grub and one thousand depopulation that with udev to force the dmraid we could not restart automatically to the operating system: every time we jumped in the busybox shell temporarily as photography [PHOTOS]. The strange thing is that if by hand, activating the raid with dmraid-ay command and then pressing Ctrl + D, voila here is share our ubuntu …

So how to solve? simply install the kernel 2.6.24-23-server hardy! no problem with the boot. So if you want a server a bit more ‘secure, with support for 5 years, I recommend you install Ubuntu Hardy 8.04 following the steps listed in the howto manual of fakeraid;

That said, we still …
In practice, the fakeraid works by installing the package dmraid. Once installed and loaded the module:

modprobe dm-RAID4-5

RAID MINI UBUNTU

As I wrote before, the kernel sees the disks not only as a normal SATA disks /dev/sda and /dev/sdb but also as one particular device mapped into the directory /dev/mapper, while partitions are shown with a number at the bottom … our controller ddf1 follows the format and label the disk raid that we put in bios was root: why the name of the devices and ‘ddf1_root while the 2 partitions (swap and root) are called, respectively, and ddf1_root1 ddf1_root2

[Intrepid]
If we insert the disk ubuntu intrepid server, which starts in text mode

In recognition of the disc by pressing ctrl + alt + F2 and verify the correct presence of the devices

cd /dev/mapper
ls

and control are ddf1_root

After we turned on the raid, we proceed with the normal graphical installation.

Under the “advanced” that they did not want to install grub (if you forget is not ‘a problem) ..
After the installation is finished reboot the operating system from live cd.

Finished loading, we do not properly assembled the raid because ‘the live and pointed activated the swap partition at the start. So the dmraid failed to properly install the raid.
in fact

sudo dmraid-r

shows the disks but no device in /dev/mapper

to unlock the situation:

sudo swapoff -a
sudo swapon -s
sudo dmraid -ay

Then proceed to the last part of the installation by mounting the partition system’s main operating target and then go to chroot and install the missing packages that also during the final.

sudo mkdir /target
sudo mount /dev/mapper/ddf1_root1/target
sudo mount - bind /dev/target/dev
sudo mount-t proc proc /target/proc
sudo mount-t sysfs sys /target/sys
sudo cp /etc/resolv.conf/target/etc/resolv.conf

sudo chroot /target

apt-get update
apt-get install dmraid
apt-get install grub
mkdir / boot / grub
cp /usr/lib/grub/x86_64-pc/* /boot/grub
or if you have installed the 32-bit
cp / usr/lib/grub/i386-pc/* /boot/grub

install grub on the disk

grub - no-curses
device (hd0) /dev/mapper/ddf1_root
find /boot/grub/stage1
root (hd0, 0)
setup (hd0)
quit

update-grub

nano /boot/grub/menu.lst

and verify that CISIA

# groot=(hd0, 0)

save and restart with a

sudo reboot

The next time we start the system as mentioned earlier by the busybox shell

dmraid-ay
exit

So download and install the package linux-image-2.6.24-23-server and put the new entry in /boot/grub/menu.lst default to automatically run the operating system …

[HARDY]
If instead we started with Hardy we should not use the desktop version, when loading, open a shell and install and activate the software to recognize the raid

1. you need to edit the file /etc/apt/sources.list to enable the universe repositories
then

sudo apt-get update
sudo apt-get install dmraid

or from synaptic. Then load the module and mount the raid

sudo modprobe dm-RAID4-5
sudo dmraid-ay

After we turned on the raid, we proceed with the normal install … possibly following the guide for older versions of ubuntu:

https://help.ubuntu.com/community/FakeRaidHowto # Installing% 20on%% 20older 20releases

Backup bomb-proof? Software RAID in Ubuntu

October 9th, 2011 4 comments

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.

Ubuntu RAID

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.

RAID

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.