Monthly Archives : December 2013

Presenting in the Z-Wave Pavilion at International CES 2014, Fibaro is certainly one of those hidden home automation gems that has some of the hottest sensors around.
At CEDIA 2013, we got a preview of what’s to come from Fibaro.

The company is coming out with a Z-Wave fire/smoke detector that easily challenges Nest’s in the industrial design and intelligence. Fibaro’s Rich Bira explains that the unit has a “black box” to record events such as the escalating temperature.

“Sometimes there is a fire before there’s smoke,” he says.

Beveled edges on the device makes “smoke travel in quicker compared to stamped-in holes,” according to Bira.

The other fantastic thing Fibaro showed at CEDIA was – I don’t quite know what to call it – a gesture/sensor interface device (video below) that can sit behind a wall (or not) and detect gestures without the user ever touching the unit, and then trigger Z-Wave events.

Fibaro marketplace – new place where you can download addons for your smart home!

Bira suggests the pad makes sense for aesthetic installs as in behind a mirror or for security purposes so guests don’t know there is a controller in the space.

Otherwise, Fibaro continues to build around its flagship home automation system, the Home Center 2 now available with a SIP server and open API.

Taking cues from the Chicago Transportation Authority, Bira explains, “If a train is 10 minutes away, it might mute the music and flash the lights in case you don’t have a phone handy.”

If you’re hurrying to catch the train and it’s late, an accelerometer on your smart phone can gauge your speed and let you know you can chill out.

Finally, Fibaro has some interesting wall plugs with colored LED rings that tell you at a glance the consumption of the plugged-in device. To be sure, there are other smart plugs on the market, but this is about the most discreet. One other cool thing about them: You can rotate the plugs to make them fit right in tight spaces


Author: 4 years ago

mdadm software raid Raid 1 Xen 6.2

After initial installation of Xenserver 6.2 (DO NOT configure any local storage!)

Check /dev/sda partition table
# gdisk -l /dev/sda
Number Start (sector) End (sector) Size Code Name
1 2048 8388641 4.0 GiB 0700
2 8390656 16777249 4.0 GiB 0700

Prepare second drive for GPT:
sgdisk –zap-all /dev/sdb
sgdisk –mbrtogpt –clear /dev/sdb

After listing the sdb partition with sgdisk we will get info:
sgdisk -p /dev/sdb
Disk /dev/sdb: 250069680 sectors, 119.2 GiB    –> this is DISK_SIZE !
First usable sector is 34, last usable sector is 250069646

We need to make sure the size is exactly the same as on sda:
sgdisk –new=1:2048:8388641 /dev/sdb
sgdisk –typecode=1:fd00 /dev/sdb
sgdisk –attributes=1:set:2 /dev/sdb
sgdisk –new=2:8390656:16777249 /dev/sdb
sgdisk –typecode=2:fd00 /dev/sdb
sgdisk –new=3:16779264:DISK_SIZE-34 /dev/sdb
sgdisk –typecode=3:fd00 /dev/sdb

in my case DISK_SIZE-34 is 250069680-34=16779264
Pay attention if sgdisk says the kernel is still using the old partition table. You need to reboot if that is the case.

Now it is time (REboot if needed) to create the software RAID devices.

mknod /dev/md0 b 9 0
mknod /dev/md1 b 9 1
mknod /dev/md2 b 9 2
mdadm –create /dev/md0 –level=1 –raid-devices=2 missing /dev/sdb1
mdadm –create /dev/md1 –level=1 –raid-devices=2 missing /dev/sdb2
mdadm –create /dev/md2 –level=1 –raid-devices=2 missing /dev/sdb3

Create bitmaps for each RAID device:

mdadm –grow /dev/md0 -b internal
mdadm –grow /dev/md1 -b internal
mdadm –grow /dev/md2 -b internal

Format the RAID root disk, mount it at /mnt and copy all to it

mkfs.ext3 /dev/md0
mount /dev/md0 /mnt
cp -vxpR / /mnt

Modify /mnt/etc/fstab and change root filesystem to /dev/md0
sed -i ‘s/LABEL=[a-zA-Z\-]*/\/dev\/md0/’ /mnt/etc/fstab

Create a new boot image and uncompress it:

mkdir /mnt/root/initrd-raid
mkinitrd -v –fstab=/mnt/etc/fstab /mnt/root/initrd-raid/initrd-`uname -r`-raid.img `uname -r`
cd /mnt/root/initrd-raid
zcat initrd-`uname -r`-raid.img | cpio -i

Edit init and raidautorun:
sed -i ‘s/raidautorun \/dev\/md0/raidautorun \/dev\/md0\nraidautorun \/dev\/md1\nraidautorun \/dev\/md2/’ init

Copy the new ramdisk to the /mnt/boot folder and modify boot menu

find . -print | cpio -o -Hnewc | gzip -c > /mnt/boot/initrd-`uname -r`-raid.img
rm /mnt/boot/initrd-2.6-xen.img
cd /mnt/boot
ln -s initrd-`uname -r`-raid.img initrd-2.6-xen.img

Replace in /mnt/boot/extlinux.conf string “root=LABEL=root-…” to “root=/dev/md0″ in all menu entries.

sed -i ‘s/LABEL=[a-zA-Z\-]*/\/dev\/md0/’ extlinux.conf
Set up MBR for GPT on /dev/sdb

cat /mnt/usr/share/syslinux/gptmbr.bin > /dev/sdb
cd /mnt
extlinux –raid -i boot/

Reboot (IMPORTANT: Set your server to boot from the SECONDARY HDD before booting!)
When XenServer is up again, include /dev/sda in the array with the following commands:

sgdisk –attributes=1:set:2 /dev/sda
sgdisk –typecode=1:fd00 /dev/sda
sgdisk –typecode=2:fd00 /dev/sda
sgdisk –typecode=3:fd00 /dev/sda
mdadm -a /dev/md0 /dev/sda1
mdadm -a /dev/md1 /dev/sda2
mdadm -a /dev/md2 /dev/sda3

The array needs to complete its synchronisation. That is gonna take a while. Follow its progress with:

watch -n 1 cat /proc/mdstat
When it’s done on all three arrays, copy the RAID setup to /etc/mdadm.conf

mdadm –detail –scan >> /etc/mdadm.conf

Add the md3 as the local storage:

xe sr-introduce uuid=UUID_from_section_3 type=type_from_section_3 name-label=”Local storage” content-type=user
xe pbd-create sr-uuid=UUID_from_section_3 device-config:device=/dev/md2 host-uuid=[TAB]
xe pbd-plug uuid=previous_returned_UUID

Several neat mdadm commands that might be useful to remember:
removing disk from raid:
mdadm /dev/mdX -r /dev/sdX
adding to raid
mdadm /dev/mdX -a /dev/sdX

Author: 4 years ago