New Server Build

Well this is going to be good fun. It’s time for a new server build. Here’s the current home server, which is looking a bit dated now:

  • RAID1 Western Digital Caviar Black 640GB x2
  • 2x Samsung 2TB Hard Drives
  • 4GB DDR2 800Mhz RAM
  • Intel Quad Core Q8300 2.5Ghz
  • Windows Server 2008 R2

My biggest fear here was the 2TB hard drives as they are not in a RAID configuration. In April, one of my 2TB hard drives died (I subsequently replaced it). However this setup is not ideal, even if my TV can be re-encoded easily.

Furthermore, the Windows Server 2008 R2 box is getting a little slow, and I’ve had to fix some broken ‘roles’ with some ugly registry hacks and use of Scheduled Tasks to restart services periodically.

The new build:

  • Ubuntu 12.04 LTS x64. I do indeed prefer Debian – but Squeeze looks like it is going to be around for a very long time, and as much as I don’t like some things about Ubuntu, I do like a 5-year LTS cycle.
  • RAID1 Samsung 2 TB (x2) – I want to get these from the server, and will use these as my OS drive, however, I wish to preserve my data.
  • RAID6 3TB (x6) – 5 Seagate drives (different batches), and one Western Digital drive (just for a bit more security), I will use this array to store music, TV shows and films. XBMC’s treat.
  • 32GB DDR3 1600Mhz RAM — I’m planning to virtualise Windows Server 2012 in it so I can still have a nice, natively integrated, Windows Domain; amongst other virtual machines.
  • Intel Core i3 3220 – this new Ivy Bridge CPU is extremely low power. As this server will be constantly on, that’s a good idea. With hyper-threading, it shows up as 4 threads, which should be good enough for virtualisation.

Plan of attack

I installed Ubuntu 12.04 onto a USB stick to boot from. The plan was to setup the RAID6 array, move all the stuff off the two drives onto it, configure the RAID1 array and boot.

So, here’s how I set up the RAID6 array. Note some commands here are precautionary and unnecessary.

mdadm --create /dev/md/md1 --chunk=512 --assume-clean --verbose  --level=6 --raid-devices=6 --spare-devices=0 /dev/sda /dev/sdb /dev/sde /dev/sdf /dev/sdg /dev/sdh

I have 32GB of RAM, and so I want good speeds and can afford to in terms of cache size. Thus, I changed the stripe size (this was a temporary method, I fixed this later with an upstart script)

echo 32768 > /sys/block/md127/md/stripe_cache_size

I then formatted the RAID6 array as follows and configured it as a logical volume:

 parted -s /dev/md/md1 mklabel gpt 
 parted -s /dev/md/md1 -a optimal mkpart primary ext4 4M 100% 
 pvcreate /dev/md/md1p1 vgcreate -s 1024M vg01 /dev/md/mdp1 
 lvcreate -l 11777 -n TV vg01 mkfs.ext4 -b 4096 -E stride=128,stripe-width=512 /dev/mapper/vg01-TV

Obviously, the less physical extents the better, so that’s why I set them to a size of 1GB.

Now, I just mounted the RAID6 array and in turn, both old TV drives and used rsync to transfer the data.

Here is a basic speedtest for writing a 10GB file:

I setup RAID1′s mdadm and LVM too manually, as I find the Ubuntu installer to be a bit limiting in its options. I then booted Ubuntu’s ‘netboot’ installer for a nice minimal install. My installation was not without its woes though:

  • Kernel’s mkinitramfs post script would not work unless the modules included were specified as ‘generic’, not ‘targeted’.
  • grub-install failed. After chvting and chrooting into the target and running dpkg-reconfigure grub-pc and selecting my boot drives, GRUB played nice and I had no issue. Had to remember to mount -t proc proc /proc though

Nightmares

I was getting a horrible “FPDMA_QUEUED” error in /var/log/syslog constantly, but this turned to be just a slightly unplugged SATA cable. Well. That was the first time.

Then, this error appeared systematically across all my Seagate RAID6 drives, and it was obvious that they had not all failed. A quick Google found me a single, and unconfirmed bug in 12.04. Not much to go on, but I tried the Quantal (3.5.x series) kernel instead. Problem solved.

And we’re up and running. Yes, I could document everything I did setting it up, but, I haven’t fully finished setting it up yet, and, also, I’d like to split different bits into other blog posts!

Shamazon: why Amazon UK suck

Amazon UK have been in the news lately for tax reasons, and while I’ll agree they should be chipping their fair share in, it is not the reason I’m mad at them.

It’s the fact that they’ve violated a UK and EU law, and don’t seem to care at all. Allow me to start from the beginning.

On the 15th August, I purchased a Samsung Series 9 laptop from Amazon. I sent it back, because it was damaged, but I got my replacement a week later and was happy with it.

Now, one thing annoying me, was that it came with Windows 7 Home Premium 64-bit. Something I did not want or need, as you’ll see in my review here. When buying it, I was not too bothered. I knew my rights as a consumer entitled me to a refund of the underlying operating system.

I contacted Amazon UK via their online chat and received no joy. They told me that I could send back the entire unit for a full refund. Thinking I was perhaps speaking to someone who was not aware of the laws, I recited them. These are follows:

  • EU directive 2005/29/CE
  • UK’s Consumer Protection of Unfair Regulations Act 2008

No such luck. So I called Amazon and spoke to a chap on the phone, who did not seem to understand the laws either. He said that Amazon did not have to follow EU law as I knew it came with Windows when I purchased it. I pointed out briefly, that his argument was flawed, and that I only purchased the item with the impression that I could in fact get a refund. I also mentioned that Amazon have issued refunds in the past, and so I thought there would be no exception.

This guy was not having any of it. I offered to send him the license key sticker, prove it had never been activated, and send back the Windows recovery CD. He stated that he suggest I return the entire unit. He told me to buy a device without Windows installed, such as “an Android tablet”. I told him that an Android tablet was not suitable for my needs, and in fact, I needed a high-spec laptop. I was told by this rep to deal with it, put simply, he told me I was aware of it having Windows when I bought it. I told him that these very laws existed because consumer choice is important: if I am not able to purchase hardware of a certain calibre without purchasing unneccessary software, then this was illegal and the very reason this law exists. After a little bit of persuasion, he refused to put me on to a supervisor but promised me he would get one to call me back in 30 minutes.

30 minutes passed, and I got no call. I called back and was told ‘there is no supervisor available’, but that I’d get called back in 2 hours. 2 hours later, nada.

So, I took to email and had no joy. Take two, pushing stronger, with the threat of legal action:

Hello,

I am writing to you yet again as I have experienced no luck in previous emails, which were ignored, Amazon’s online chat which did not yield a desirable outcome, and by telephone, in which a supervisor was meant to call me back, but never did. I purchased a Samsung Series 9 NP900X3C which ships with Windows 7 Home Premium. I do not wish to use Windows 7 Home Premium and am entitled to a full refund

Unfortunately, all of your staff thus far are convinced I must return the entire device for a refund.   However, I am fully satisfied with the unit itself, and EU directive 2005/29/CE and the UK’s Consumer Protection of Unfair Regulations Act 2008 say that I am entitled to a partial refund of just the Windows license.

That is, I am entitled to return just the Windows license.

Unfortunately, it seems you staff are convinced that these EU and UK laws do not apply, and that I should return the whole unit. The problem is the laws specifically allow a partial refund, as the act of returning a laptop would be anticompetitive.

It would mean I cannot purchase a laptop of this specification without Windows. Claiming that, I got what I ordered is not valid in this instance. I was reminded that when I purchased the laptop I was made aware it came with Windows. True. However, I was also aware that when I purchased the laptop these laws were in existence and applicable. These laws are just as valid as laws such as the Sale of Goods Act. I knew for example, that if I purchased my product and it arrived damaged, I would be entitled to a replacement or refund. I did not have to state such a law on replacements Ive had from any other company. Telling me to purchase a laptop with another OS is not an option I am afraid. I want this laptop as I could not find a laptop with no OS or Linux with an equivalent specification. I must inform you now that if you do not refund me this money, I will issue a chargeback on the card for the price of an OEM Windows 7 Home Premium 64bit license on my card. If this is unsuccessful I will pursue the matter through the courts, contact my local MEP and publicise your failure to comply with EU and UK laws. I will set up a website, with full transcripts of calls, emails and chats outlining Amazons failure to resolve my issue.

What I find highly interesting is Amazon UK have been known to issue refunds under these laws in the past. These refunds have been partial, i.e. the laptop has been retained by the owner, and just the Windows license refunded. Your recent reluctance to do so seems to me a new line of policy instilled by seniors who seem to believe that Amazon EU SARL is out of jurisdiction of EU directives and UK bound laws.

Both retailers Dell and eBuyer have issued refunds for Windows licenses before. Perhaps I will stick with companies that deal with computers as their mainstream business in the future.

Please do not expect future business from me again. I should not have to be fighting for a refund when the law states that I am entitled to one. How Amazon perceives itself to be above these laws, is, quite simply, beyond me.

Sam Nazarko

Amazon, engage in some bad tactics here already. Firstly, all their replies omit your original message, which I assume they use to cover themselves. You can’t actually get a recorded record of what you sent, as messages must be sent through their website

This actually, got me a response though

Hello,

Greetings from Amazon.co.uk.

We would like to advise that your query regarding return the Windows key for a partial refund from the is still being investigated.

Please accept our apologies for the delay in responding to your e-mail message.

Please be assured that all of us here are working very hard to provide a thorough, personal reply to each of our customers as quickly as possible.

Please be assured that we shall contact you shortly with further information on September 12, 2012.

Promised a reply by the 12th, I instead got this on the 14th:

Greetings from Amazon.co.uk.

We would like to advise that your query regarding return the Windows key for a partial refund from the is still being investigated.

We have already contacted the relevant department regarding the issue, unfortunately still we have not received any reply from the concern department.

Please accept our apologies for the delay in responding to your e-mail message.

Please be assured that all of us here are working very hard to provide a thorough, personal reply to each of our customers as quickly as possible.

Please be assured that we shall contact you with an update on September 21, 2012.

Noticing a pattern here?

Now, this is where I wait a long, long time. They promised me a response by the 21st.  I got a response only to tell me to wait longer (20th September)

Dear Mr. Nazarko,

My name is Darryl Atchison and I represent Executive Customer Relations within Amazon.co.uk.

I can confirm we have received your email dated September 9th and are already investigating the comments that you have mentioned in your email.

I will aim to provide you an update on the points you have raised within 1-2 business days.

Thank you for your patience whilst I investigate the matter concerned.

Kindest regards,

I was quite optimistic here, I’d actually managed to reach someone with some sense. But it had been a good two weeks. And I’d still not had any joy.

Amazon now started to push me around and just keep me waiting and waiting. Even when I threatened to issue a chargeback I was told “any day now”. I think they actually wanted to see if I’d do anything.

And I finally got a reply around one month later (I do not have the email at hand), with a generic “return it completely for a full refund”, which obviously was not what I wanted. There was no acknowledgement of whether the laws applied, or explanation rather, as to why they would not. Instead, they simply stated I had to return it. If I had more time on my hands, I really would have pursued this. Instead, I’ll just avoid them.

And there we have it. I’ll never buy anything significant from Amazon again, as I know they don’t honour consumer laws. Furthermore, I’ve managed to deter 3 friends from buying new computer components there (easily cost Amazon about £3k), and I’ll keep spreading the word about how bad they really are. I still think Amazon won. They know people are busy, and so, they try and tire them out by delaying and delaying until they concede. That’s what they did here. It’s pretty stupid though. The £50 they saved, will easily be lost over business I would have conducted with them had they been more accomodating.

I’ve been very busy, but time to write to Trading Standards.

A new blog

Hi, and thanks for visiting

This is my new blog, which will now be separate from Stm Labs. As I use Stm Labs as a name for my projects, it seems more fitting to blog personally on a separate site instead. From now on, I’ll do most of my blogging here, which will allow for more frequent updates and ramblings.

Bare with me while I set this blog up properly. Over the next few days I’ll be porting popular blog posts from Stm Labs over to here.  And stay tuned for some cool updates.

Sam

Samsung Series 9 NP900X3C: Beautiful

Purchased a Samsung Series 9 13.3 on the 15th August (as there was a cashback offer for purchases after this date, and I’m a student). It arrived two days later, with scratches on the lid. Fortunately, Amazon sent me a replacement and I got that within about 5 days.

Unwrapping it shocks the senses. So thin, light and yet powerful. The first thing I did was boot up and enter the BIOS. When Samsung say a 9 hour battery life, they rely on a 100% charge (naturally), but the BIOS recommends a Extended Life setting, which caps charging at 80%.

Booted into Windows 7, not bad speeds for a Sandisk U100 (sigh, that’s so getting ripped out) and every piece of bloatware under the sun. Within 10 minutes I PXE booted and purged the Windows 7 installation and recovery partitions with Linux. I wanted Wheezy, but it’s not released yet, and Ubuntu Precise is supposed to be a power saving beast, so I whacked on a minimal version of Ubuntu (netboot install).

I installed the very basics of packages: gdm gnome-shell dropbear.

GDM’s autologin feature is broken. Which is a bit of a pain. As for lightdm, that has issues of its own, so I put up with GDM’s lack of autologin. Not wanting Unity, or GNOME3, I stuck with GNOME Classic, which does the job.

First thing I noticed was the CPU governor changed to “ondemand” frequently. This annoyed me a little (I prefer conservative). I found the /etc/init.d/ondemand script and was able to modify it — it runs in the background and after 60 seconds kicks the governor into ondemand by default. I also adjusted the scaling frequencies. Powertop initially was not looking great, but by writing my own pm-utils scripts this improved. With good tunables, I wrote some scripts to mount CIFS, turn off KB backlight, adjust screen backlight and turn off the Bluetooth radio by default. I’m now able to get 7 hours of wireless browsing with 30% brightness and my 80% charge.

I wanted a Linux laptop, as it sure beats virtualising, and I doubted if this would make the cut. My worries were the 4GB RAM. With a Windows mindset, it’s a bit weak for a developer, but on Linux, I can have make -j4 on the kernel, Firefox open and only be consuming 700MB RAM. It’s going to be very hard to get through all this memory, and I’m glad I bought the 13″ rather than the 15″ model.

The only gripe with running it in Linux is a kernel bug where ACPI state changes are not detected properly. For example, if I put my laptop on charge, it takes a reboot before Linux will detect the battery is on charge. Likewise with removal of power. It’s a minor issue though, that doesn’t present in Windows mind, but I’m hopeful a future BIOS update will resolve this problem.

With the samsung-laptop kernel module, most FN hotkeys work, and those that don’t can be fixed quite easily. With newer packages, and by the time we hit Quantal, this laptop will likely be a perfect machine for Linux.

Gripes: Not perfect in Linux — but this will improve, and for Windows, i.e. most users, there’s no problems. The Sandisk U100 is not the best of SSDs, and a Crucial M4 SSD would have gone down a lot better. Having said that, I don’t need blazing fast speeds, and my boot is not bad, about 10 seconds (including GRUB2 3 second timeout).

All in all, a beautiful laptop, that’s only going to get better in time