Category Archives: Uncategorised

Updating ZFS with new, bigger, disks

Replacing a disk

First prepare the new disk

Clean Up – will fail with a completely new disk

mdadm --zero-superblock --force /dev/disk/by-id/ata-WDC_WD10JFCX-68N6GN0_WD-WXA1AA7DL40E

More Clean Up

sgdisk --zap-all /dev/disk/by-id/ata-WDC_WD10JFCX-68N6GN0_WD-WXA1AA7DL40E

Partition

sgdisk -a1 -n2:34:2047 -t:EF02 /dev/disk/by-id/ata-WDC_WD10JFCX-68N6GN0_WD-WXA1AA7DL40E
sgdisk -n1:0:0 -t1:BF01 /dev/disk/by-id/ata-WDC_WD10JFCX-68N6GN0_WD-WXA1AA7DL40E

See what we’ve now got

fdisk -l

Replace the old ST disk with the new WD disk

zpool attach rpool ata-ST3160023AS_5MT13JAS-part1 /dev/disk/by-id/ata-WDC_WD10JFCX-68N6GN0_WD-WXA1AA7DL40E-part1

Check it’s OK, resilvering will take place at this point

zpool status

Sort out the boot sector

update-grub
grub-install /dev/disk/by-id/ata-WDC_WD10JFCX-68N6GN0_WD-WXA1AA7DL40E

Check to see if the resilver has completed

zpool status

Physically remove the remove the other disk from the system and reboot to check that the boot loader works OK

reboot

Assuming it’s all gone well, now resize the pool to onboard the new, bigger, disks

zpool status
zpool online -e tank /dev/disk/by-id/ata-WDC_WD10JFCX-68N6GN0_WD-WXA1AA7DL40E-part1
zpool online -e tank and whatever the other disk is called

Christmas List 2017

  • Soft woolly socks – 39-41 – Migros has very dark grey ones which I like
  • Abrasive rubber to clean the ceramic knife sharpener
  • Double walled mug for tea which works properly
  • Inexpensive fitbit – smallest with no display
  • Small woodworking clamps – Sliding part with turn handle top – about 30 cm internal size
  • A new belt
  • A ‘straight edge’ about 1 meter long – DE: Richtlineal maybe?
  • An analogue dial gauge caliper – https://www.artsupport.ch/en/shop?aid=4293 for example

Bypassing 8.8.8.8 DNS Lookups on the Internal Network

  1. Create an alias
    Goto Firewall > Aliases
    Add a new alias
    Name  – LocalResolver (anything will do)
    Type – Host(s)
    Now in Host(s) add IP 127.0.0.1 so it always uses the local DNS resolver
    Save this
  2. Change the route
    Goto Firewall > NAT
    Add a  Port Forward ( the first tab )
    protocol: TCP/UDP
    Interface: LAN
    Destination: select DNS
    Source: any
    Redirect Target IP: LocalResolver ( or the name you gave to the alias )
    Redirect port – DNS (53)
    Save this
  3. Apply the changes
  4. Test using nslookup
    steve@goat ~/Videos/Dance/Salsa $ nslookup www.bbc.co.uk 8.8.8.8
    Server: 8.8.8.8
    Address: 8.8.8.8#53
    Name: www.bbc.co.uk
    Address: 104.250.101.87
    steve@goat ~/Videos/Dance/Salsa $ nslookup www.bbc.co.uk
    Server: 127.0.1.1
    Address: 127.0.1.1#53
    Non-authoritative answer:
    Name: www.bbc.co.uk
    Address: 104.250.101.87

    So you can see that there is no difference between the local resolver (which uses a Smart DNS lookup) and 8.8.8.8

Fixing the Damned Linux Brightness Bug

Switch to using the nvidia driver in the driver control

Then execute:

sudo nvidia-xconfig
sudo vi /etc/X11/xorg.conf

Make the screen section look like:

Section “Screen”
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Depth 24
EndSubSection
Option “RegistryDwords” “EnableBrightnessControl=1”
EndSection

Finally reboot:

 sudo reboot now