User Tools

Site Tools


computers:server:ubuntu10.04lts_hydra

Base Install

  1. Clean install of Ubuntu 10.04 LTS
    1. Set for automatic install of security updates
    2. Services enabled:
      1. DNS
      2. OpenSSH
      3. Samba

Configuration

Network

  1. Set the local network to static IP address
    1. Modify the /etc/network/interfaces file with a static entry:
      # The primary network interface
      auto eth0
      iface eth0 inet static
              address x.x.x.x
              netmask 255.255.255.0
              network x.x.x.x
              broadcast x.x.x.255
              gateway x.x.x.1
              # dns-* options are implemented by the resolv.conf package, if installed
              dns-nameservers x.x.x.1
              dns-search lattice.net
  2. Restart the network:
    sudo /etc/init.d/networking restart

Raid

The moment of truth. How hard would it be to configure a raidz array out of the five 2TB drives? Um, two lines!? These instructions came from here

  1. Install the zfs code:
    sudo apt-get install zfs-fuse
  2. Turn our hard drives into a raid array:
    sudo zpool create media -m /storage raidz /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf

Import

The update repository appears to be broken, so I might need to re-install the OS on hydra. According to a post I found, all I need to do is “import” the pool.

With all of the drives in the system, just run zpool import.
That will scan all the drives for ZFS metadata, and will show any pools that can be imported.
Then you just import the one you want via zpool import <poolname>. 

Update

AH, would make more sense to use a these drive IDs since it would be consistent:

“You should add your drives using the /dev/disk/by-id directory. That way the drive will be picked up consistently regardless of the device node in /dev/. ”

Drive Failure

  • 2013.09.30 - Looks like we might have had a drive failure. I know in the past, one of the drives was flaky and would not show up because of a cable issue (swapped cables, and it worked).
  • Drive identification: (just pasting in the drives in the raid alive
    # status as of today 2013.09.30
    #sudo zpool status -v media
    
      pool: media
     state: DEGRADED
    status: One or more devices could not be opened.  Sufficient replicas exist for
    	the pool to continue functioning in a degraded state.
    action: Attach the missing device and online it using 'zpool online'.
       see: http://www.sun.com/msg/ZFS-8000-2Q
     scrub: none requested
    config:
    
    	NAME        STATE     READ WRITE CKSUM
    	media       DEGRADED     0     0     0
    	  raidz1-0  DEGRADED     0     0     0
    	    sdb     ONLINE       0     0     0
    	    sdc     ONLINE       0     0     0
    	    sdd     ONLINE       0     0     0
    	    sde     ONLINE       0     0     0
    	    sdf     UNAVAIL      0     0     0  cannot open
    
    errors: No known data errors
    
    
    #ls /dev/disk/by-id/ -la
    lrwxrwxrwx 1 root root   9 Sep 30 15:44 scsi-SATA_ST2000DL003-9VT_5YD24VFW -> ../../sde
    lrwxrwxrwx 1 root root   9 Sep 30 15:44 scsi-SATA_ST2000DL003-9VT_5YD2J987 -> ../../sdc
    lrwxrwxrwx 1 root root   9 Sep 30 15:44 scsi-SATA_ST2000DL003-9VT_5YD2K8XW -> ../../sdb
    lrwxrwxrwx 1 root root   9 Sep 30 15:44 scsi-SATA_ST2000DL003-9VT_5YD2K90G -> ../../sdd

Software

Daemons

apcd

  1. Install apcupsd
    sudo apt-get install apcupsd
  2. Configure the configuration file: /etc/apcupsd/apcupsd.conf
    UPSTYPE net
    DEVICE xx.xx.xx.xx # your master local apcupsd server
  3. Set the ISCONFIGURED flag in /etc/default/apcupsd to yes
  4. Restart the daemon
    sudo service apcupsd restart

LAMP

Linux, Apache, Mysql and PHP as shown here

NOTE: According to the comments on that page, you could do all of these with this: (but I'm not that lazy, I can copy and paste a few lines)

sudo tasksel install lamp-server

mysql

sudo aptitude install mysql-server mysql-client

apache

sudo aptitude install apache2

php5

  1. Install php5
    sudo aptitude install php5 libapache2-mod-php5
  2. Restart the apache server
    sudo /etc/init.d/apache2 restart

mediatomb

NOTE: I could not get this to work, the content always came up with some kind of error. uShare worked right out of the box with no fusing, so I'm going to use that for the UPnP server.

nfs

Will use NFS to share up the storage directory.

  1. Grab the NFS server package
    sudo apt-get install nfs-kernel-server nfs-common portmap
  2. Configure portmap
    sudo dpkg-reconfigure portmap
  3. And restart (this did not work btw)
    sudo /etc/init.d/portmap restart
  4. Modify our exports
    sudo nano /etc/exports
    # here are some example entries
    # hal
    /storage/video                 10.0.0.5(ro,fsid=7,no_root_squash,async,subtree_check)
    # nmt
    /storage/video                 10.0.0.13(ro,fsid=7,no_root_squash,async,subtree_check)
  5. Restart the NFS server
    sudo /etc/init.d/nfs-kernel-server restart

samba

  1. Stole the /etc/samba/smbd.conf from Mythbuntu and made it read only.

ushare

uShare is a media server uPnP media server (very light weight)

  1. Install the service
    sudo apt-get install ushare
  2. I manually edited this file first, there were some options that don't come up when you do the “config”
    sudo vi /etc/ushare.conf
  3. Proper configuration is done with this
    sudo dpkg-reconfigure ushare

vsftpd

I would like a local ftp client so that we can move files around as fast as possible

  1. Install vsftpd
    sudo apt-get install vsftpd
  2. Modify the /etc/vsftpd.conf file
    sudo nano /etc/vsftpd.conf
    1. Modify so we can write files to the server
      write_enable=YES

Programs

jed

sudo apt-get install jed
computers/server/ubuntu10.04lts_hydra.txt · Last modified: 2013/09/30 20:29 by david