Archive for January, 2008

Day 1: Ubuntu RAID-1 and LVM enabled filer on a USB stick with backuppc

January 9, 2008

Ok for the time being I decided to abandon freenas and openfiler (since I could not get backuppc installed in them) and install Ubuntu Gutsy Gibbon on 4GB A-Data USB stick ($20 from Fry’s).

It is super easy to install Ubuntu on USB stick. Make sure CDROM is the first boot device. Pop-in Ubuntu cdrom and reboot.

I used Ubuntu 7.10 alternate cd image (so no Ubuntu server or Ubuntu desktop cd image). This alternate has no X11 and supports LVM/RAID configs. During install I just picked /dev/sda as drive to partition and install on. It might be good idea to disconnect IDE drives during install no prevent accidentally installing on /dev/hdX drive.

No special usb modules loading andor rebuilding initrd.img tricks were required. Even though initially I thought so that I need to follow instructions outlined at http://www.pendrivelinux.com/

After reboot change boot device to USB HDD in BIOS settings and remove cd from cdrom drive. It takes a while to boot up…

Then just update Ubuntu and install swat, backuppc, samba, nfs, sshd, apache, webmin etc to help admin etc work.

In my box (Shuttle SK41G AMD Athlon XP 1800+) I have:

  • 2x160GB Hitachi Deskstars in RAID-1 array (file system: ext3 – mounted as /nasse)
  • 1x400GB Seagate (filesystem: ReiserFS – mounted as /storage)

Mount and df from box:

root@nasse:~# mount /dev/sda1 on / type ext3 (rw,errors=remount-ro)

proc on /proc type proc (rw,noexec,nosuid,nodev)

/sys on /sys type sysfs (rw,noexec,nosuid,nodev)

varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)

varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)

udev on /dev type tmpfs (rw,mode=0755)

devshm on /dev/shm type tmpfs (rw)

devpts on /dev/pts type devpts (rw,gid=5,mode=620)

lrm on /lib/modules/2.6.22-14-generic/volatile type tmpfs (rw)

/dev/hda1 on /storage type reiserfs (rw)

securityfs on /sys/kernel/security type securityfs (rw)

nfsd on /proc/fs/nfsd type nfsd (rw)

/dev/mapper/nasse-nasse_store on /nasse type ext3 (rw,noatime)
root@nasse:~#

root@nasse:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 3.5G 762M 2.6G 23% / varrun 236M 184K 236M 1% /var/run varlock 236M 0 236M 0% /var/lock udev 236M 88K 236M 1% /dev devshm 236M 0 236M 0% /dev/shm lrm 236M 34M 203M 15% /lib/modules/2.6.22-14-generic/volatile /dev/hda1 373G 35M 373G 1% /storage /dev/mapper/nasse-nasse_store 154G 2.2G 152G 2% /nasse root@nasse:~#

This link https://help.ubuntu.com/community/Installation/RAID1+LVM was super useful for me.

More on backuppc set up and config later.

Advertisements

Openfiler or FreeNAS with backuppc?

January 8, 2008

Well I have been testing them both. They are both very nice packages. My goal is to have backuppc to take care of backups in my homenetwork. Unfortunately none of them come with backuppc preloaded.

I somehow like openfiler more: it is under more active development, it is based on rpath and it is easier to load other packages on it.

Openfiler comes with bacula preloaded, but it is an overkill for my purposes. I somehow like backuppc approach and design a lot.

I tried to install backuppc on openfiler, but I could not get perl modules installed. I am not that familiar with conary pkg management and conary repositories did not have recent backuppc packages available so I gave up. I’m not sure if you can install backuppc on FreeNAS?

Also I tried to run backuppc on my other server and store backups on my openfiler over NFS. Backuppc caused my other linux server to crash when rsyncing large files. Not very good since this other server is my mythbackend…

Mythfrontend on Compaq 1505US Presario with ATI Mobility Radeon 7500 laptop

January 8, 2008

I struggled with this for a while. Mythbuntu, Mythdora, Ubuntu, FC [6|7|8] all kept failing at some point: install failed or X did not loead or was unstable.

Then I finally installed knoppmyth R5F27 and everything worked out of the box. Including X and Streamzap remote.

Openfiler on USB stick

January 8, 2008

I followed h@nnes instructions. The only thing I had to do was to add more sleep to load modules.

Here is my init file:

[root@nasse ~]# cat /tmp/a/init
#!/bin/nashmount -t proc /proc /proc
setquiet
echo Mounted /proc filesystem
echo Mounting sysfs
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mknod /dev/console c 5 1
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mkdir /dev/pts
mkdir /dev/shm
echo Starting udev
/sbin/udevstart
echo -n “/sbin/hotplug” > /proc/sys/kernel/hotplug
echo “Loading jbd.ko module”
insmod /lib/jbd.ko
echo “Loading ext3.ko module”
insmod /lib/ext3.ko
insmod /lib/scsi_mod.ko
insmod /lib/sr_mod.ko
insmod /lib/sd_mod.ko
insmod /lib/ehci-hcd.ko
insmod /lib/ohci-hcd.ko
insmod /lib/uhci-hcd.ko
echo Sleeping 10secs…
sleep 10
insmod /lib/usb-storage.ko
echo Sleeping 12secs…
sleep 12
/sbin/udevstart
echo Creating root device
mkrootdev /dev/root
#/sbin/sfdisk -R /dev/sda
echo Mounting root filesystem
mount -o defaults –ro -t ext3 /dev/root /sysroot
echo Switching to new root
switchroot –movedev /sysroot
[root@nasse ~]#

lspci from my mythbackend

January 8, 2008

[root@hippo ~]# lspci
00:00.0 Host bridge: VIA Technologies, Inc. PT880 Host Bridge
00:00.1 Host bridge: VIA Technologies, Inc. PT880 Host Bridge
00:00.2 Host bridge: VIA Technologies, Inc. PT880 Host Bridge
00:00.3 Host bridge: VIA Technologies, Inc. PT880 Host Bridge
00:00.4 Host bridge: VIA Technologies, Inc. PT880 Host Bridge
00:00.7 Host bridge: VIA Technologies, Inc. PT880 Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
00:09.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)
00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
00:0c.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)
00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)
00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1)
[root@hippo ~]#

Howto get Apache to respond on ports 80 and 8080 on same Linux server

January 8, 2008

Since httpd needs to run as user backuppc and my server already runs httpd as user apache on port 80 here are instructions how to get httpd to run on port 8080 also.

To be continued…