A few notes about external hdd encryption

When storing your backups on an external drive you occasionally take with you it is a very good idea to encrypt your backups. Here are some personal conclusions after trying 2 different solutions. eCryptFs Advantages (reasons to choose): stacked – can be used on top of another filesystem, even on top of NTFS allocated on the fly – no need to pre-allocate your space, it will be allocated on the fly....

December 7, 2013 · len

Archive all files modified in the last 24h

find . -mtime 1 -type f -print0 | tar -czvf $SYNC_DIR/$BFILE -T - --null

October 1, 2013 · len

Checking badblocks in soft raid setup

Use case 2 hdd in raid 1 using md, smartd signals: Device: /dev/sda [SAT], 8 Currently unreadable (pending) sectors Actions 1. Run smartctl on each disk, wait and check the results smartctl -t long /dev/sda smartctl -t long /dev/sdb #wait a looong time smartctl -l selftest /dev/sda smartctl -l selftest /dev/sdb sdb is ok but sda confirms the smartd error: # 2 Extended offline Completed: read failure 60% 4832 2519297024 2....

January 22, 2013 · len

Checking badblocks with smartmontools

… and some other observations. Warning: use at your own risk! I used to keep some of my photo backups on an external Seagate 500G drive which I also use for travel. Today however as I tried to access it I noticed some problems so I quickly ran: smartctl -t long /dev/sdb #followed by smartctl -l selftest #the result Extended offline Completed: <strong>read failure</strong> 90% 109 <strong>414996448</strong> I started using this useful guide to correct the problems by repeatedly running smartctl, calculating the offset, finding the file with debugfs, forcing reallocation with dd and so on....

January 2, 2013 · len

Pride

Sometimes I look on what I have done and feel very good. This is an example :)) : <pre lang="bash"> IFS=$(echo -en "\n\b") && c=60 && for i in $(ls -1v);do let c=$c+1; name=$(echo $i | cut -c3-80); nname=$c$name; echo mv \"$i\" \"$nname\" >> mv.sh; done && chmod a+x mv.sh

October 18, 2012 · len

A bit of L2TP debuging

The problem was to connect to a L2TP server from linux, no windows available. The required packages: <pre lang="bash">apt-get install l2tp-ipsec-vpn reboot Done the needed configuration but the connection was not established. The gui said error 500. The log said much but apparently not enough. Here is what could be considered as an error: Oct 3 18:55:36 purple xl2tpd[4162]: setsockopt recvref[30]: Protocol not available Oct 3 18:55:36 purple xl2tpd[4162]: This binary does not support kernel L2TP....

October 3, 2012 · len

Timelapse videos

To create timelapse videos as the one in the previous post or this one here are some simple steps: 1. connect the camera (Canon 450d in my case) to the computer and turn it on 2. unmount it if it’s mounted automaticaly 3. run the following script (timelapse.sh) to capture images to the computer: <pre lang="bash">#!/bin/bash for i in $(seq 900); do no=$(printf "%04d" $i) gphoto2 --capture-image-and-download --filename="timelapse-$no.jpg" sleep 15s; done You can adjust the number of images or the sleep interval....

March 27, 2012 · len

Backup, backup, backup

This is a short collection of subjects related to preventing, detecting and fixing a broken hdd from a raid1 array. Which drive is broken? 1. Check for messages in dmesg [ 1040.470282] ata1.00: device reported invalid CHS sector 0 [ 1040.470287] ata1: EH complete [ 6373.208104] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 6373.214488] ata1.00: failed command: FLUSH CACHE EXT [ 6373.221215] ata1.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0 [ 6373....

December 20, 2011 · len

Change thunderbird default http browser in Xfce

Since I migrated to Xfce it seems thunderbird does not uses the default browser setting nor the /etc/alternatives/x-www-browser. The solution to change the default browser to chrome for example is to go to Preferences/Advanced/Config editor and change the network.protocol-handler.warn-external.http to true. This way next time you will open a link you will be prompted to select a browser and you can choose to remember the setting. Comments: ghantoos - Apr 1, 2012 Thanks for the share!...

November 30, 2011 · len

xubuntu

Why? After having, and not using, Ubuntu 11.10 on my laptop for some time, trying in vain to get used to it, I realized I cannot resist the urge to update so I decided to search for alternatives. One was xubuntu which has an xfce4 based interface which I could customize in about 15 mins to look and feel exactly as I was used to. As such I migrated to xubuntu 11....

November 12, 2011 · len