Archive for the ‘Boring Stuff’ Category

Changing Linux Mint to boot off an mdadm raidset

Sunday, October 14th, 2012

I installed Linux Mint on a machine, but, wanted to use Raid 1 for the drive. However, even through the custom installation with both drives in place, I saw no way to configure Raid on installation. Since we do this sort of thing quite frequently, I figured I would write a quick guide detailing the proces.

apt-get install mdadm
cfdisk /dev/sdb

When you install mdadm, it’ll ask you if you want to boot if the primary boot partition is degraded, i.e. one of the primary drives has failed. You will want to answer Yes to this now, but, can change this later. Since we are creating a Raid-1 partition that is already degraded, it’ll prevent your system from booting. Create your partitions

mdadm --create --run --metadata=0.90 --force --level=1 --raid-devices=1 /dev/md127 /dev/sdb1

We create the raid partition using the old metadata 0.9.0 just in case you ever use a kernel that doesn’t have an initrd.

mkfs -t ext4 /dev/md127
mount /dev/md0 /mnt
rsync -aplx / /mnt/
rsync -aplx /dev/ /mnt/dev/
vi /etc/default/grub

Uncomment the line that says: GRUB_DISABLE_LINUX-UUID=true so that it is enabled.

dpkg-reconfigure grub-pc

Make sure grub is written to the second drive.

vi /mnt/etc/fstab

change reference from /dev/sda1 to /dev/md127

Halt the machine, remove the primary drive, make sure grub boots into the raid volume properly. sdb will now become sda. If on boot, grub complains that it cannot find the root disk, or, goes into rescue mode:

insmod normal

Then, it should boot. You might need to hit e to edit the command line to set the linux kernel option for root to root=/dev/md127

After the system comes up, run

dpkg-reconfigure grub-pc

to get everything reconfigured properly. It’ll say that it detected a drive that wasn’t in the boot sequence and prompt to rewrite grub. Why mint changes the device to md127, I don’t know.

After you’ve done that, halt, reconnect the old ‘sda’ as ‘sdb’ and bring the system up.

At this point, you are booting off the raid set and we just need to make a few changes to the raid configuration, then, add the other drive to the raid set.

cfdisk /dev/sdb

Change the partition type from 83 to FD. You might need to reboot if your controller doesn’t properly handle the ioctl change and/or tells you that /dev/sdb1 is too small to join the array.

mdadm --grow /dev/md127 --raid-disks=2 --force
mdadm --add /dev/md127 /dev/sdb1
echo 40000 > /proc/sys/dev/raid/speed_limit_min
echo 100000 > /proc/sys/dev/raid/speed_limit_max
watch cat /proc/mdstat
/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
dpkg-reconfigure mdadm

The last command will show you the progress as the partition is being mirrored. Once this finishes, you should be set.

Reboot your machine and it should come up running Raid 1 on the boot drive.

Google Groups Captcha 404

Thursday, December 8th, 2011

The other day I was reading a thread on google.groups and wanted to add the user to my Google+ circles as we work on a number of projects that are somewhat related. A search of his name came up with too many results to be helpful, so, I figured I would try searching by his email address.

I mistyped the first captcha:

Properly typed the second captcha:

and received a 404 page:

It is completely repeatable and I’ve tested it numerous times. You can of course go back to the original page, click the … and get a new captcha, but, make sure you solve it on the first try! Note that the topic is also set to “” on the 2nd captcha.

Now if only there was a place to report bugs on google.groups. A fifteen minute search of the sparse FAQ didn’t turn up anything.

AT&T Local Phone Service woes

Thursday, November 17th, 2011

Earlier last week I received a call that had a lot of static. Last Saturday morning I received a few phone calls in the morning, but, later calls started coming through to my mobile phone – busy/ring no-answer forwarding from the house line to my mobile.

That afternoon, I placed a Trouble Ticket with AT&T using their online system. Today, still no dialtone, line is dead at the Network Interface Jack. Attempted to check status yesterday, couldn’t figure out how, reopened a ticket, but, in Chrome, got to last step, told me that session timed out and I needed to reenter. Decided to try again this morning. Again, last step, Session timed out, reenter. Tried in Safari, Session timed out, reenter. The ‘reenter’ link points to a 404.

Called the phone number listed, went through their automated process, it told me there was no problem on the line and it must be my equipment. Went out to the box outside, unplugged the line at the Network Interface Jack again, tested again, left it unplugged. Called in again, it tells me that there is no problem, I must have a phone off the hook, would I like to schedule an $85 service call since I don’t have inside wire maintenance?

Hit 0 for about 2 minutes, kept getting tossed back to the troubleshooting instructions. Called back in, didn’t enter any prompts, got transferred to a person, he said they had no record of last Saturday’s ticket, but, online tickets often get lost. Saw that I entered one through the automated system, said that it would cost $85 to have someone come out. I said, I have the phone line unplugged at the Network Interface Jack, the problem is outside the house.

He said:

“Well, if that isn’t plugged in, you aren’t going to get a dialtone. Would you like us to schedule a call for $85?”

I thought using the automated system would be quicker. I tried to use their IVR system and it told me it wasn’t a fault on their side. I realize not everyone has 20+ years of telecom/datacom experience, but, I have to wonder if the pressure is to get the person to accept it as a billable call then to later sell inside wire maintenance as a way to defray the $85, i.e. sign up for the $4.95/month plan and we won’t bill you the $85, knowing that you’ll be a client for more than 17 months.

The first UX problem is dealing with their Web site. It is not easy to find how to place a trouble ticket for people that know what they need. It does have a lot of helpful information that you need to go through – all troubleshooting that I had already bypassed by checking the Network Interface Jack first. But, finding the link to actually place a ticket takes you to a page where you have to again tell it what type of service, put in the phone number, run through a number of screens where you’re able to enter 160 characters of text to describe the problem, then, if the process is successful I guess it creates a ticket. It is obvious while I was doing it that it did try to reset the line as the line-use indicator did blink a few times right after I entered the number.

But, what takes the cake is the IVR system. There was no way to schedule a ticket without accepting the $85 charge. It did run me through the same tests the online system prescribed, but, you couldn’t proceed without accepting the liability. Additionally, I could not give the phone number I was reporting as the trouble number. Even though the line had a hard fault, calls are transferred to my mobile automatically – allowing me to keep a single phone number to give out for people to contact me. I debated giving my Google Voice number, but, wanted to see how the system worked. The person I spoke to never asked for a contact number.

All in all, I think the customer service experience here from a web usability standpoint needs to be looked at. I tried two modern browsers, and did attempt to use Firefox while writing this and each one ends up with the same problem. I’d bet if I had Internet Explorer it would work.

Remember… customer metrics. Know what pages should be getting hit, know what your expected volumes are. And when you see abnormally low numbers, investigate.

Credit cards, recurring payments, client upgrades

Monday, October 24th, 2011

After some code wrangling late last night, I solved a conundrum regarding payment plan upgrades and wrote the code to support it. Our goal is to avoid partial credits and prorated charges. While that means we are delivering service we may not be charging for, in the long run, the number of customer service calls regarding small incremental charges will probably eat that revenue.

If a user has a free plan, and upgrades to a paid plan, they get charged immediately and their billing period is set.

If a user has a paid plan and upgrades to a more expensive pay plan, they are upgraded to the plan, but, not charged for the upgrade through the end of their current billing period.

If a user has a paid plan and downgrades to a cheaper plan, they are given until the end of the current billing period with their current ‘services’, at which point the system may have to selectively deactivate accounts if they haven’t disabled the extra features.

If a user has a paid plan and downgrades to free, billing profile is removed, plan downgraded on billing period end date.

The issue I ran into here was one I’ve dealt with for years – what do you do about service increases and decreases in price? Prorating ends up with a tiny charge or credit applied to the next invoice, but, usually results in a phone call from someone that doesn’t understand why they got charged $5 and $2.72 last month and $10 this month.

User Experience doesn’t end with the web page design.

These are issues that you need to think about when deploying a paid service that recurs because people will adjust their plan based on features, etc. You can’t immediately downgrade the account as they have paid through the end of the period assuming you billed in advance. If you bill after the fact, you face the possibility that you’ve delivered service for a month before you collect any money.

This gets trickier as you expand to longer term payments, i.e. quarterly or bi-annual payments. Based on the merchant service agreement, annual agreements are usually not allowed since you only have 6 months to contest a charge, if your vendor disappears after that 6 months and you have a remaining 6 months left, you have no recourse with your credit card company.

In any case, it wasn’t really a showstopper for this app, but, I certainly spent more time thinking about how to handle and automate a portion of the business that is currently done manually with my existing business.

What is going on with Google’s Pagination in the Chrome Web Store?

Friday, December 10th, 2010

I’ve used Chrome for quite a while. It is quick, runs well, handles 20 open tabs and doesn’t have the memory leak I always had with Firefox. With Chrome, 20-30 days between restarts aren’t uncommon – Firefox would get a week or so before it was too sluggish and required a restart.

However, while I was looking at the Chrome Web Store I was a little confused about some of the pagination issues I ran into. I went to the Productivity Apps to see what was new, and the pagination at the bottom was confusing.

These first three are looking at the top applications. As you go through the pages, the pagination string just changes the endpoint so that on the first page, you see pages 1 through 9 and next. By the time you get to Page 9, you are presented with pages 1 through 17.

However, when we look at Most Popular Utilities Apps, pagination breaks in a much different manner:

I tried to think of a logical explanation for it breaking in different manners in different places. Perhaps the pagination code was written by different groups which explains why the start point is not incremented as the endpoint is on the Top Applications. However, as you page through the Utilities, pagination works, the itemset count changes, at one point you only have Prev/Next, then mysteriously the pagination works again. The only real theory I could come up with here was the fact that http is stateless and I’m being shuffled to a different data center or node, but, the pagination issue is repeatable which might throw that theory into the wind.


Entries (RSS) and Comments (RSS).
Cluster host: li