Monday, March 26, 2012

mdadm administration and maintenance

check status of a raid:
root@server:/home/markp# mdadm --query --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Wed Jun 16 11:12:17 2010
Raid Level : raid1
Array Size : 732571904 (698.64 GiB 750.15 GB)
Used Dev Size : 732571904 (698.64 GiB 750.15 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Mon Mar 26 08:37:54 2012
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

UUID : a796fd2c:740124f9:01f9e43d:ac30fbff (local to host server)
Events : 0.7867161

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 0 0 1 removed


the two disks of my md0 are sdb1 and sdc1. Add back whichever is degraded:
root@server:/home/markp# mdadm --add /dev/md0 /dev/sdc1
mdadm: added /dev/sdc1
root@server:/home/markp# mdadm --query --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Wed Jun 16 11:12:17 2010
Raid Level : raid1
Array Size : 732571904 (698.64 GiB 750.15 GB)
Used Dev Size : 732571904 (698.64 GiB 750.15 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Mon Mar 26 08:53:20 2012
State : clean, degraded, recovering
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1

Rebuild Status : 0% complete

UUID : a796fd2c:740124f9:01f9e43d:ac30fbff (local to host server)
Events : 0.7867463

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
2 8 33 1 spare rebuilding /dev/sdc1

Monday, March 19, 2012

notes for Circuit Website

the images for staff team:


Used gimp to resize img to 300x400. (feathered edges and rounded corners nice, but showed up a white border against the blended 'fade background' of the content section background.) gimp crop settings saved as 'website portrait'.

On site: set image size as 200 width (height scales proportional)

Sunday, March 11, 2012

headers using showtime for Circuit website

To specify which showtime banner show to use: edit the template (main is: Trinity: ShadowMenu Tab + 2 columns: showtime banner ) and insert the tag in the header section:
{* Start Header, with logo image that links to the default start page. Logo image is changed in the stylesheet "Trinity Layout: Top menu + 2 columns + showtime banner" *}

{* End Header *}


To edit the padding around the banner edit the parameters in the associated 'layout' stylesheet:
div#header {
/* adjust according your image size */
height: 60px;
margin: 0px;
padding: 0.5em 0 0.2em 0;
/* you can set your own image here, will go behind h1 a image */
/* background: #f4f4f4 url([[root_url]]/uploads/ngrey/bg_banner.png) repeat-x left top; */
/* border just the bottom */
border-bottom: 1px solid #D9E2E6;
}

Saturday, March 03, 2012

We're so frustrated about the DDOS effect - and apparently some of you are VERY ANGRY. We're really sorry; it's out of our hands. -- Raspberry_Pi (@Raspberry_Pi)

Friday, March 02, 2012

backup and updating of cmsms

go into control panel of webhost, use phpmyadmin and do simple db backup to an sql file.

Haven't found a better way of musing ftp than nautilus in ubuntu. don't think I have ssh access (sadly), so:

  1. download a backup of the /html/urlname folder of the webserver
  2. if doing a differential upgrade (for minor releases), download the package (the 'base' version = english only, fine), then copy the individually different files from local into the correspoding folders on webspace - tedious - is this the best way??)
  3. because I'd deleted the install folder (as advised?) I had to also get a replacement copy of that folder from the 'full' version and copy that up to.
  4. then access the update page: www.urlname/install/upgrade
  5. follow instructions, which will include need to creat/make writable config.php

Friday, February 10, 2012

pfSense 2.0.1 on alix

copy nanobsd image to cf card, ensure correct /dev/sd[x] is specified!:
markp@server:~/Desktop$ sudo zcat pfSense-2.0.1-RELEASE-1g-i386-nanobsd.img.gz | dd of=/dev/sde obs=64k
1947456+0 records in
15214+1 records out
997097472 bytes (997 MB) copied, 331.56 s, 3.0 MB/s
markp@server:~/Desktop$

If you get permission denied to /dev/sdX chmod to 777 for the card. Takes a while, keep cool!

next setup an ubuntu machine to be a serial terminal (console) client. I'm using minicom:
sudo apt-get intall minicom
the usb to serial adaptor that came with the RR Diag Tool seems to be seen OK on an 11.10 machine:
markp@markp-samsung-lt:~$ dmesg | grep tty
[ 0.000000] console [tty0] enabled
[ 1119.022531] usb 2-2: pl2303 converter now attached to ttyUSB0

so ttyUSB0 is the name of my terminal. (normally ttyS0 for a 1st serial port)
In minicom Cntl-A, then choose a letter to navigate the program. O = setup options.

Serial port settings should be thus:
Baud rate: 38,400
Data: 8 bit
Parity: None
Stop: 1 bit
Flow control: None
Terminal: ANSI

Despite the above being the recommended settings, I found that I had to set both the client and the alix baud rate to 9600 to prevent ASCII gibberish showing on the terminal(?) (in minicom there are flow control settings for both hardware and software (?) I set both to none.

At this stage pfsense is booting in the terminal shell just as it would in a normal vga output. Assign the nics etc.


Everything looking perfect until I came to activate the mini-pci card that came with my 'Full N' alix bundle. The card in the bundle is an N card and after failing to get it to activate after saving settings for it (BIOS did detect it initially ok as an ath0), I learn that freeBSD 8.1 (which pfsense 2.x is based on) has no support for N wifi devices, and only provisional drivers in the newer freeBSD 9. SO WHY BUNDLE THAT CARD in my ebay package which describes the board as 'great for pfSense'?! Ho hum, got a b/g card coming instead, but looks like pfSense's ability to have a wifi AP built into the box will be fine.

Even more exciting, my USB2.0 wifi nic is spotted fine on the alix's usb socket and acts as a gateway/WAN getting adsl from my phone fine. I plan to use this as a backup WAN for when adsl goes down. pfSense's multi-wan features put it way above domestic routers.

Monday, December 26, 2011

mum's ereader

the Sunstech ereader can be used with epub files, including purchased ones.

for that use kobo. a kobo account setup using usual names.
the download links work when Adobe Digital Editions (an adobe ereader) is installed on the PC (setup on Megs HP laptop on my logon; also installed on Mum's laptop now). Adobe account settings the usual using markshop AT
plugging in Mum's sunstech makes ADE identify the device as an ereader and epub files copied across can then be authorised to accept the DRM of the kobo epub files.