Sunday, 22 January 2017

Mount USB disk to server

I want to add some USB disks to my server (CentOS7) but need them to always be the same device.

Use udev to identify the disks:



udevadm info --attribute-walk --path /sys/class/block/sdd | grep model
    ATTRS{model}=="Backup+  Desk   "

Add lines to /etc/udev/rules.d/custom

SUBSYSTEMS=="scsi", ATTRS{model}=="Backup+ Desk ", SYMLINK+="Seagate%n"


udevadm control --reload-rules
udevadm trigger

This should add some symlinks in /dev

Sunday, 22 February 2015

Playing with ceph

Setting up Ceph

To play about with ceph I created some Centos7 nodes on OpenStack, then followed the quickstart.

http://docs.ceph.com/docs/master/start/quick-ceph-deploy/

Had a couple of issues.

Install failed with dependency issues

[admin-node][WARNIN] Error: Package: 1:python-rbd-0.80.7-0.4.el7.x86_64 (epel)
[admin-node][WARNIN]            Requires: librbd1 = 1:0.80.7
[admin-node][WARNIN]            Available: 1:librbd1-0.86-0.el7.centos.x86_64 (Ceph)
[admin-node][WARNIN]                librbd1 = 1:0.86-0.el7.centos
[admin-node][WARNIN]            Installing: 1:librbd1-0.87-0.el7.centos.x86_64 (Ceph)
[admin-node][WARNIN]                librbd1 = 1:0.87-0.el7.centos




Due to some different packaging in the ceph and epel repos - fix found in http://tracker.ceph.com/issues/10476 :


On all nodes:
echo "check_obsoletes=1" >> /etc/yum/pluginconf.d/priorities.conf



Failed adding extra monitors

[node2][ERROR ] admin_socket: exception getting command descriptions: [Errno 2] No such file or directory

I should have set up  'public network', even though the instructions seem to say I don't need it unless I have two networks.

Redoing the install with 'public network' in the ceph.conf fixed this.

No data pool by default

Only had a rbd pool initially. Not sure if this is a problem (the docs say there should be a data and metadata pool by default).

Saturday, 14 February 2015

World of Warcraft on Fedora 21

Instructions copied from
https://blog.mavjs.org/world-of-warcraft-on-f20-via-wine.html

Install wine:

# sudo yum install wine

Download World of Warcraft Setup Installer from https://us.battle.net/account/download/?show=wow.

Run the installer with wine:
 
# cd ~/Downloads/
# wine World-of-Warcraft-Setup-enGB.exe

After the installation completes, it will ask you to login to your Battlenet Account. Instead, quit the application. Then tell it to use software rendered OpenGL by executing (it has a bug where the interface is just black canvas on some intel cards):
 
% export LIBGL_ALWAYS_SOFTWARE=1
% wine ~/.wine/drive_c/Program\ Files\ (x86)/Battle.net/Battle.net\ Launcher.exe

Battlenet actually allows you to play even though it hasn't finished downloading if it has reached a certain downloaded size. Either wait to finish or open the game. When you run it the first time it will take a while and FPS is not that great. Quit the game. Modify SET gxApi "D3D9" to SET gxApi "Opengl" in the following file:
 
$ ~/.wine/drive_c/Program\ Files\ (x86)/World\ of\ Warcraft/WTF/Config.wtf

Friday, 14 March 2014

Get all tables with columns 'columnA' or 'ColumnB' in the database

To get all tables with columns 'columnA' or 'ColumnB' in the database 'YourDatabase'
SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('columnA','ColumnB')
        AND TABLE_SCHEMA='YourDatabase';

Wednesday, 12 March 2014

Fedora 20 on Dell XPS 13

A few notes on setting up a Dell XPS 13 with Fedora 20.


Put Fedora 20 on a flash drive
Change to UEFI boot

Boot from flash (F12 to choose boot device)


Some settings for laptop SSD disks and power saving


TRIM for SSD disk: add discard to disc options (or replace defaults) in /etc/fstab

installed tuned and switch it on

yum install tuned
systemctl start tuned.service
systemctl enable tuned.service
tuned-adm list
tuned-adm profile powersave

yum list powertop
yum install powertop


Touchpad on kernel > 3.11.10

There is currently a minor problem with the touchpad on higher kernels. It seems that the touchpad initialises incorrectly because of i2c and PS2 interfaces.
Blacklisting the i2c-hid module

1. Open /etc/modprobe.d/blacklist.conf in your favorite text editor.
2. Add the line 'blacklist i2c-hid' (no quotes)
3. Save and reboot

See: https://bugzilla.redhat.com/show_bug.cgi?id=1048314

RPM Fusion

su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'


yum install gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg xine-lib-extras-freeworld



Sunday, 9 March 2014

Rebuild VM host with bigger disks

Disk partitioning

/boot - 500MB
swap - 18GB
/ - 30 GB
/usr - 30GB
/tmp - 10GB
/home - 100GB
/var - the remaining space

3 disks - 2x2TB + 1x1TB

Setup the 2TB disks as a RAID 1 pair - two md devices - md0 for /boot and /md1 for LVM Physical Volume

Put swap on the 1TB disk (no raid) and mounted the rest of the 1TB as /single

OS Install

Installed CentOS 6.5 - software selection - Virtulization Host

Install EPEL:
rpm -Uvh http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

yum install ntp ntpdate
chkconfig ntpd on

OpenStack Install


The following instructions are from  RDO Quickstart : http://openstack.redhat.com/Quickstart

yum install -y http://rdo.fedorapeople.org/rdo-release.rpm

packstack --allinone

xymon

Add my local basetwo yum repo (or the http://terabithia.org/rpms/xymon/ repo)

yum install xymon-client

Set XYMONSERVERS in /etc/default/xymon-client

service xymon-client start

Add br0 bridge

This is for non-openstack kvm images




Remember to remove this server from known_hosts on any client running virt-manager, otherwise you get a 'is libvirtd running' error.

Create /etc/polkit-1/localauthority/50-local.d/50-libvirt-remote-access.pkla
With something like

[libvirt Management Access]
Identity=unix-user:markd
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes






 

Monday, 3 March 2014

Playing with Openstack

Threw together a fedora 20 VM in order to play with http://devstack.org/ gave it 4G Ram and 60G disk and 4 cpus

Install Fedora 20 Basic Web Server

Make selinux permissive

Make sure /etc/hosts is correct (and does not have hostname on 127.0.0.1)

Add a stack user:

useradd stack

Make the stack user a sudoer:

cat <<EOF >/etc/sudoers.d/stack
stack ALL=(ALL) NOPASSWD:ALL
Defaults:stack !requiretty
EOF

Get the devstack scripts and setup a simple local.conf

cd /home/stack
git clone https://github.com/openstack-dev/devstack.git
cd devstack
echo '[[local|localrc]]' > local.conf 
echo ADMIN_PASSWORD=password >> local.conf 
echo MYSQL_PASSWORD=password >> local.conf 
echo RABBIT_PASSWORD=password >> local.conf 
echo SERVICE_PASSWORD=password >> local.conf 
echo SERVICE_TOKEN=tokentoken >> local.conf

Then run the stack.sh as the stack user

./stack.sh


Open up firewall

firewall-cmd --add-service http
firewall-cmd --add-service https

consoles
firewall-cmd --add-port 6080/tcp

keystone
firewall-cmd --add-port 5000/tcp



Friday, 29 March 2013

Adding a new linux disk:

Find the device (use dmesg)

Delete any partitions on the new disk:

fdisk /dev/sde

And add a new linux partition.

The use mkfs - in this case to create a ext4 filesystem

mkfs.ext4 /dev/sde1

Then tune the filesystem a little:

tune2fs -m 0 /dev/sde1
tune2fs -L backup2 /dev/sde1

-m 0 removes the reserved blocks
-L xxxx labels the filesystem
I've really got to remember to post some things here. It would be useful if there was a link to www.blogger.com to remind me how to post...

Friday, 26 October 2012

Grub problem while rebuilding my server as a virtual host


Installing Centos6.3 and setting up software raid

Disk setup:
500Mb software raid partition for /boot (on sda and sdb)
Create LVM raid partitions for the rest (and left over make ext4 partition)
In the LV - about the same swap as memory and the rest as /

Had a problem with grub (error 15), this fixed it:

grub> device (hd0) /dev/sda
grub> device (hd1) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)
grub> root (hd1,0)
grub> setup (hd1)
grub> quit

Friday, 2 December 2011

First stage of Reprap build

Got the first package of bit from tvrrug.
This is what it made.

Friday, 11 November 2011

TV RepRap

I've been looking at the RepRap project on and off for a while now. This time I noticed that a group had set up locally to help members build their RepRaps.

So, I have joined the Thames Valley RepRap User Group