28 zpool create -f 2TB-RAIDZ raidz /dev/sdc /dev/sdh /dev/sdi
29 zpool status datastore
30 mkdir /media/zfs
31 zfs create -o mountpoint=/media/zfs/ datastore/zfs
32 zfs list
Scan for new Hard Disks
ls /sys/class/scsi_host/ | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan ; done
zpool status -x datastore
647 zpool status -v datastore
667 zpool status -f datastore
833 zpool health
834 zpool list
835 zpool history
zfs get compressration
zfs list
December 08, 2014
August 25, 2014
Raspberry Pi SeedBox
Installed Deluge 1.3.6 as per this post:
http://www.onepitwopi.com/raspberry-pi/installing-deluge-1-3-6-on-a-raspberry-pi/
Find External Hard Drive:
http://www.onepitwopi.com/raspberry-pi/installing-deluge-1-3-6-on-a-raspberry-pi/
Find External Hard Drive:
- dmesg | grep sd
- [ 4.487833] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
Delete existing partitions with cfdisk
- cfdisk /dev/sda
and create a single primary partition. Then format:
- mkfs.ext4 /dev/sda1
Mount it and setup automount:
- mkdir /media/usbhdd
- mount /dev/sda1 /media/usbhdd/
- echo "/dev/sda1 /media/usbhdd ext4 defaults 0 0" >>/etc/fstab
Move /var/log to external HDD
- /etc/init.d/rsyslog stop
- mv log /media/usbhdd/
- ln -s /media/usbhdd/log
- /etc/init.d/rsyslog start
#! /bin/sh
/etc/init.d/deluge-daemon stop
oldIP=`cat /etc/network/eth0.ip`
newIP=$(ip -f inet -o addr show eth0|cut -d\ -f 7 | cut -d/ -f 1)
logger "DELUGE Updating Deluge IP Address, $oldIP -> $newIP"
sed -i -e 's/listen_interface": "'$oldIP'"/listen_interface": "'$newIP'"/g' /root/.config/deluge/core.conf
if [ $? = 0 ]; then
echo $newIP >/etc/network/eth0.ip
logger "DELUGE IP BINDING SUCCESS"
/etc/init.d/deluge-daemon start
else
logger "DELUGE IP BINDING FAILUE"
fi
Setup folder for Deluge stuff:
- mkdir /media/usbhdd/media
- ln -s /media/usbhdd/media/
Install FlexGet
- apt-get install python-pip
- pip install flexget
July 02, 2014
Rasplex - Restricting section access at certain times
In case anyone is interested, as this is rasplex and I want to keep the auto updates, I wrote a script that runs on a different box:
I have enabled 'Require authentication on local networks" on the local media server. Would be nice to restart services instead of reboot, but will work on that later.
sshpass -p 'rasplex' ssh -v root@192.168.1.120 'sed -i -e s/OLDTOKEN/NEWTOKEN/g /storage/.plexht/userdata/guisettings.xml'
sshpass -p 'rasplex' ssh -v root@192.168.1.120 'sed -i -e "s/Signed in (OLDUSERNAME)/Signed in (NEWUSERNAME)/g" /storage/.plexht/userdata/guisettings.xml'
sshpass -p 'rasplex' ssh -v root@192.168.1.120 'reboot'
I have enabled 'Require authentication on local networks" on the local media server. Would be nice to restart services instead of reboot, but will work on that later.
GPS on Pi
AdaFruit Ultimate GPS Module v3
Wiring:
GPS RPi GIOP
VIN 5V
GND GND
RX TX
TX RX
VIN 5V
GND GND
RX TX
TX RX
——-
nano /boot/cmdline.txt
# Remove these in cmdline.txt:
# `console=ttyAMA0,115200`
# and `kgdboc=ttyAMA0,115200`.
# Mine looks like this:
# `console=ttyAMA0,115200`
# and `kgdboc=ttyAMA0,115200`.
# Mine looks like this:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
—–
Comment out the line “T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100″ at the end of /etc/inittab
nano /etc/inittab
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
—-
apt-get install gpsd gpsd-clients
gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
cgps
Subscribe to:
Posts (Atom)