Author Topic: My Ubuntu 12.10 setup  (Read 2898 times)

Offline lrissman

  • Full Member
  • ***
  • Posts: 119
  • Karma: +6/-1
    • View Profile
My Ubuntu 12.10 setup
« on: January 13, 2013, 07:07:10 am »
Hello all,  I took some notes when I setup my ubuntu 12.10 flexraid server and thought I would share them.   I should warn that I never got to finish it as my flexraid install seems to have become corrupted and is yet unresolved (See other posts by me to see where that is)

Ubuntu Install
- Install Ubuntu 12.10 server as per normal
  - File and Print Server and Virtual Host if you want to use KVM (I use VirtualBox)
- After install, from the command line run:  sudo apt-get install gnome-desktop
- setup remote desktop sharing (Search google for some guides)
   - This allows you to use any VNC client remotely to access the gui/desktop
- Setup autologin for ubuntu 12.10 (
- sudo apt-get install smartmontools python-glade2 system-config-samba sysstat
- mkdir /disk-mounts
- mkdir /disk-mounts/dru1
- mkdir /disk-mounts/dru2
- mkdir /disk-mounts/dru3
- mkdir /disk-mounts/dru
  • -- as many as you like

- mkdir /disk-mounts/ppu1
- mkdir /disk-mounts/ppu
  • -- as many as you like

Now, here is where you need to do your own thing.   For each disk you have, either format or use existing (note, do not use NTFS in linux as it is very slow -- it works, but is slow).
- If you are using existing, tune2fs -L dru1 /dev/sd[x1]        (this will apply a label of dru1 to the device specified (note you need to repace [x1] with your disk letter and partition number.
- If you are formatting new,   mkfs.ext4 -L dru1 /dev/sd[x1]     (same as above but formats disk so it is blank)

- Setup /etc/fstab is next
- sudo vi /etc/fstab  (or your favourite editor)
- Add the following lines and modify as needed
#FlexRaid disks
LABEL=ppu1 /disk-mounts/ppu1 ext4 defaults,nofail 0 2
LABEL=dru1 /disk-mounts/dru1 ext4 defaults,nofail 0 2
LABEL=dru2 /disk-mounts/dru2 ext4 defaults,nofail 0 2
LABEL=dru3 /disk-mounts/dru3 ext4 defaults,nofail 0 2

next mount the disks (or just reboot)
sudo mount /disk-mounts/ppu1
sudo mount /disk-mounts/dru1
sudo mount /disk-mounts/dru2
sudo mount /disk-mounts/dru3

Flexraid Setup
I used these guides to install flexraid:
- install flexraid as per

In essence I created a folder /usr/lib/flexraid and gave it permissions as per the guide.   Then from my user (not root) I ran the normal linux install and pointed it to there.  To automatically start flexraid, I used the guide in the flexraid wiki -- essnetially creating a basic script in /usr/lib/flexraid that runs flexraid and using startup manager in ubuntu.  (From dash search for Startup and you will find it).

At this point you can configure flexraid remotely by using http://serverip:8080  -- I would recommend you add a userid/password for security.   Also note that the shares manager doesnt work in my linux expert mode..   ensure you setup your mount point as samba will require it.    So next we setup samba.

Note:  Flexraid does not always unmount the pool from the FileSystem when you stop the pool -- not sure why.   If it doesnt unmount and you get errors about files in the flexraid pool mount point, run sudo umount -l <flexraid mount point>.  I also add this to my stop script.

My pool start and stop scripts are below with virtualBox setup.    I also never made it to scheduling my verify and update cycles; however, you will want to create similar before-update, after-update, before-verify, and after-verify, to pause various processes and programs, then use expression language to put it all together.   
 Create Expression scripts and schedule the Before scripts for update/verify
    - before-update that runs your script and runs update
    - update that runs the update or verify and then runs after-update
     - after-update that runs your after-update script and exits

Samba Setup
sudo vi /etc/samba/smb.conf
- For windows 8 access, you need to enable SMB2 support in samba:
   - Add max protocol = SMB2  in the [global] section
   - Add your shares:

        path = /data/storage
        public = no
        guest ok = no
        read only = yes
        create mask = 0664
        directory mask = 0775
        browseable = yes
        valid users = movies andreia lrissman
        write list = andreia lrissman
        read list = movies

- Note, the valid users are those that have access (you need to create the samba users:
- Write list are the users that have write access to the share
- Read list are the users that have read access to the share.
- Share name is in the [ ] at the top

Installing VirtualBox

#download the ubuntu 12.10 .deb of virtualbox
#apt-get install dkms
#dep -i <downloaded vbox .deb>

create your vm..
setup the init script in your /etc/init.d dir for each of your VMS but dont have it autostart

-- Read:
bring vm online with the pool (and offline)

-- I put theses scripts into my flexraid install dir:
user@server:/flexraid$ cat
/etc/init.d/vbox-Win7VM start
/etc/init.d/crashplan start

user@server:/flexraid$ cat
/etc/init.d/vbox-Win7VM stop
/etc/init.d/crashplan stop

user@server:/flexraid$ cat
umount -l /data/storage

Crashplan install (if you want)
Install Crashplan normally
remove /etc/rc2.d/S99crashplan
add it to your start and stop to the pool as above

Monitoring I/O Performance
iostat, vmstat, mpstat

iostat -x -m 2
Look for %util

Troubleshooting Read errors
watch /var/log/syslog and if you see ata read errors you have issues:


« Last Edit: January 13, 2013, 07:15:53 am by lrissman »