Peter Coyne
UL Digital Media Design 2015
Skynet member since 2011
Notes from admin workshop 3
System info
/proc/mdstat - raid info
/proc/cpuinfo
df -h
screen
ctrl-a +...
* d - detach
* k - kill
* w - list windows
* shift-a - rename window
* esc - scroll mode
* s - split vert
* | - split horiz
* 0-9 - switch window
vi
i - insert mode
esc - exit insert
:w - write
:q - quit
/ - search
Admin workshop 4
phpbb with ldap auth
Admin workshop 5
RAID/LVM:
2 partitions per disk:
200MB for /boot, rest for swap+root
RAID1 each pair of partitions
ext2 /boot bootable 0 reserved
LVM for the other
Make a vol group and 2 logical vols on the LVM part
1 swap (2x ram)
other / ext3
RAID restore:
(optional/vague) fdisk/cfdisk/parted: make a new msdos partition table
(copy the partition table to new drive. fdisk is fiddly with cylinders etc, dd of mbr doesn't work) sfdisk - d /dev/sda | sfdisk /dev/sdb
(for each partition) mdadm --add /dev/md0 /dev/sdb1
reinstall grub on new disk just in case
Network:
grab net config details from skynet or caro (except ip of course)
Open questions:
How to get ifconfig to renew settings
How to rehash resolvd with new dns
Xen 101
Usage
xm list list vms
xm top cpu usage/mem
xm shutdown _vm-name_ controlled shutdown, do xm list to see if it disappears
xm destroy _vm-name_ pull the plug
xm console _vm-name_ get into the console. to exit: ctrl + ]
cd /etc/xen/
xm create vm01.cfg (no cfg in < xen 3, -c flag puts you straight into console.
/etc/xen/auto contains symlinks of .cfg files, auto starts when the host reboots.
Install
http://wiki.debian.org/Xen. Install xen-linux-system. Dom0 is the host (<256 ram). DomU is guests. Manual creation in Dom0:
lvscan show linux logical volums
lvscreate -n _disk1-name_ --size 10g vg1 vg1 name can be found with pvscan (physical volume scan)
same for swap etc. with e.g. 512m
mkfs.ext3 /dev/vg1/_disk1-name_
mkfs.swap for swap, no params
mount /dev/vg1/_disk1-name_ /mnt
debootstrap --arch amd64 sqeeze /mnt http://ftp.debian.org/ (from /etc/debootstrap)
umount /mnt
have to create /etc/xen/vm01.cfg etc sets vcpus, memory, the vm root dev, hostname, name for xm list.
Automatic:
Install xen-tools. Main conf: /etc/xen-tools/xen-tools.com
xen-create-image --hostname eve-01 --ip 193.1.99.100
xm create etc to start
xen-delete-image eve-01
Random Grub stuff
/etc/default/grub
# update-grub
reboot
Handy rsync flags
rsync -avPi --delete /var/lib/mysql 193.1.99.113:/var/lib/
About me
Main machine is a 13" macbook air 2010. Apps I use include:
Sparrow - imap client used to access my gmail, google apps, studentmail and skynet mail.
Terminal
Transmit - sftp client
SublimeEdit 2 - text editor
Espresso - html/css workflow
Pixelmator - amazing little photoshop replacement
Reeder - Google reader client
Other machines I use are an i7 windows/hackintosh desktop for games and photoshop work, a 2011 mac mini HTPC and download server, a g4 mac mini for audio stream and print server, shared hosting for important websites and a dedicated CentOS server hosted in the uk for downloads, minecraft server and experimenting. Some of the server-side stuff I'm familiar with:
FreeBSD, CentOS, Ubuntu server, OS X server
Apache and nginx webservers
PHP&mysql with a little python, rails and some nosql experimentation
SABNzbd, rtorrent, rutorrent, Sickbeard, Couchpotato and plex media server
Processwire CMS
Samba, afpd
several ircds, irc services and bots
I'm also a bit of an AV Geek, home AV, pro audio, sound engineering etc. My big passion is interaction design/UX.