Running OpenWrt on the IB-NAS4220

Check out OpenWRT port for Raidsonic IB4220 and IB4210

OpenWrt images to download

Getting started

Setting up the disks

Partitioning and RAID

ssh root@yak
parted -s $dev mktable gpt
parted -s $dev mkpart primary 2MiB 512MiB
parted -s $dev mkpart primary 512MiB 100%
parted -s $dev set 1 raid on
parted -s $dev set 2 raid on
parted -s $dev unit MiB print

mdadm --create --verbose --level=1 --metadata=1.2 --raid-devices=1 --force /dev/md0 /dev/sda1
mdadm --create --verbose --level=1 --metadata=1.2 --raid-devices=1 --force /dev/md1 /dev/sda2

mdadm /dev/md0 -Gb internal
mdadm /dev/md1 -Gb internal

mkfs.xfs /dev/md1

Set up the mount point in the web interface at System -> Mount Points. You can mount /dev/md1 to /mnt/md1, for example.

Then set up identities and share via SMB. Restart the service nslcd via /etc/init.d/nslcd restart (or in the web interface) and check if your new user shows up via getent passwd. Connect via SMB or FTP.

Enable IPv6

opkg update && opkg install kmod-ipv6 ip
sysctl -w net.ipv6.conf.eth0.accept_ra=2
sysctl -w net.ipv6.conf.all.accept_ra=2
sysctl -w net.ipv6.conf.default.accept_ra=2

It may take a couple of seconds to get an IPv6 via RA. Check status with ip addr and ping6 You can make it permanent by adding the following to your WAN section in /etc/config/network:

option accept_ra  1
option send_rs  0

Setting up NFS (German)

# /etc/exports

Load the new /etc/exports using exportfs -ra or restart nfsd: /etc/init.d/nfsd restart.

Use showmount -e to show nfs mounts on a client pc.

Checking Spin-Down

Hdparm - Checking if a drive is spun down

smartctl -i -n standby /dev/sda
# or
hdparm -C /dev/sda