Buffalo Terastation Raid Recovery (PPC) under Linux (i386)
Buffalo Terastation Raid Recovery (PPC) under Linux (i386)
First off, a caveat, the data I had on my Terastation was not life or death, if this had failed the world would not have ended, in fact this had sat for 6 months un-attempted, that’s how un-important it was. Getting the data back was a ‘nice to have’, so this is not a safe or guaranteed process. If in doubt investigate using dd to backup partitions before atttempting – Don’t blame me! – But in essence Buffalo Terastation raid recovery is possible using an i386 generation donor box.
So, history, I had a Buffalo Terastation (model TS-1.0GL/R5) which is a Power PC (PPC) based NAS, fitted with 4x 250GB Western Digital drives. It went Pop đ
In my case it was configured to use all the drives as one large pot, although that’s not really important, underlying I knew it was basically software raid (mdraid) and the XFS file system.
First attempt was using a Centos 6 (32bit) box I had to hand, guess what, no XFS support under 32 bit, try again. So I used the Openfiler 2.3 install CD I had (intention was to present the recovered data as a NAS again – but never quite got that far). Importantly Openfiler supports XFS and software raid, and is in essence a minimised Linux distro with a web front end.
Once booted up (hasten to add boot / OS drive was another drive, I’ve literally added the Terastation drives as additional SATA drives and done nothing with them), I ran fdisk on the first Terastation drive and saw;
fdisk /dev/sda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 48 385528+ 83 Linux /dev/sda2 49 65 136552+ 82 Linux swap / Solaris /dev/sda3 66 30378 243481141 83 Linux /dev/sda4 30378 30401 192779 83 Linux
Which was promising, in fact all 4 drives had identical partition structures. The first partition (/dev/sda1) is actually a raw xfs partition and is the / partition of the Terastation if you want to be nosy.
/dev/sda2 is swap, if I’m honest I have no idea what /dev/sda4 is (/boot maybe? I didn’t look), but /dev/sda3 (and /dev/sdb3, /dev/sdc3, and /dev/sds3 are the big ones with my data, and the software raid). There was lots of poking, prodding, reading, giving up as a lost cause at this point. I’m more than comfortable hacking about in Linux, it’s part of my day job, but Software Raid and mdadm are not my regular toys, and whilst a Mac fan my indoctrination didn’t come till the Intel days, so am not a Power PC expert. But, end result was discovering that in essence a software raid array, created on a PPC (Big Endian) device was not going to ‘appear’ under an i386 Linux (Little Endian) appliance, so give up … or google a little more.
At this point mdadm –examine was seeing nothing, there was no hint of a software raid, it might as well have been not there, but I knew it was. Turns out that you can change the byte order (Big Endian vs Little Endian – google it if you want), you need to do this on all components of the array, so basically;
mdadm -A /dev/md0 --update=byteorder /dev/sda3 mdadm -A /dev/md0 --update=byteorder /dev/sdb3 mdadm -A /dev/md0 --update=byteorder /dev/sdc3 mdadm -A /dev/md0 --update=byteorder /dev/sdd3
At this point we can ask mdadm to have a look, and you should get something similar to;
mdadm --examine /dev/sdb3 /dev/sdb3: Magic : a92b4efc Version : 00.90.02 UUID : 39b220be:f9b75e99:849a28e5:f10c758f Creation Time : Sat Aug 29 11:09:31 2009 Raid Level : linear Raid Devices : 4 Total Devices : 4 Preferred Minor : 1 Update Time : Sun Mar 6 17:05:45 2011 State : active Active Devices : 4 Working Devices : 4 Failed Devices : 0 Spare Devices : 0 Checksum : f8cc653a - correct Events : 0.8 Rounding : 64K Number Major Minor RaidDevice State this 3 8 51 3 active sync /dev/sdd3 0 0 8 3 0 active sync /dev/sda3 1 1 8 19 1 active sync /dev/sdb3 2 2 8 35 2 active sync /dev/sdc3 3 3 8 51 3 active sync /dev/sdd3
Bingo, we’re now acknowledging the raid array components, so stich back together with;
mdadm --assemble /dev/md0 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3 mdadm: /dev/md0 has been started with 4 drives.
Then give it somewhere to mount (but read only for now, to be safe);
mkdir /mount/md0 mount -o ro -t xfs /dev/md0 /mount/md0 mount: /dev/md0: can't read superblock
Cock đ At this point you may be laughing and busy copying off your data, but not for me. Am not an XFS filesystem expert, but some more googling suggested some options, and lots of warnings that this may further corrupt your data remember, I wasn’t too concerned if it ended badly, so you’ve been warned, at least twice!
xfs_repair /dev/md0 Phase 1 - find and verify superblock... Phase 2 - using internal log - zero log... ERROR: The filesystem has valuable metadata changes in a log which needs to be replayed. Mount the filesystem to replay the log, and unmount it before re-running xfs_repair. If you are unable to mount the filesystem, then use the -L option to destroy the log and attempt a repair. Note that destroying the log may cause corruption -- please attempt a mount of the filesystem before doing this.
You have now been warned three times! Pressing on …
xfs_repair -L /dev/md0
… followed by similar output to above, confirming that the log had been zapped and recreated, but nothing else fatal, then to be sure;
xfs_check /dev/md0
Again nothing, so, try again;
mount -o ro -t xfs /dev/md0 /mount/md0
Bingo!
Openfiler saw the software raid array we’ve just re-created, but I’m assuming that because it relies mostly on LVM volume groups on top of physical disks / arrays it couldn’t do anything for me with an array of existing data, so I just fired up an SFTP client and copied everything off.
Hope this helps, please heed my warnings if your data is critical, but then if it were critical you’d have a backup, right?
Andy Flisher is a Software Developer based in the North East of England specialising in cross platform development. Mobile Development experience includes Windows Phone, Android, and iPhone Apps. Desktop Software Development includes bespoke Windows, Linux, and Mac Applications. Web Development Skills include PHP, Perl, Python, ASP (Classic and .NET) – Andy Flisher on Google+
Bupa Great North Run – 2011 – As run by Me
My run chart of the Bupa Great North Run in 2011, although am pretty sure that long downhill in the middle never existed. Can’t embed the map to click the External link;
Link – Great North Run 2011 by Flish at RunKeeper
Official Chip Time was 2hrs 16 minutes and 14 seconds and was run in aid of Butterwick Hospice, sponsorship page still available at http://www.justgiving.com…
Official Chip Timing:
Number: | 45037 | ||
Chip Time: | 02:16:14 | Position: | 21,802 |
I Found This Useful: Error message in OSX Console – Cant create kext cache under / – owner not root
Error message in OSX Console – Cant create kext cache under / – owner not root
I was getting an error in the console:
com.apple.kextd[10]: Cant create kext cache under / - owner not root
This can be fixed by doing the following command:
sudo chown root:admin /
Note, you will almost certainly be prompted for a password, normally this is your Mac login password, but it may be a specific user with Administrator privileges’ password you need to enter
via I Found This Useful: Error message in OSX Console – Cant create kext cache under / – owner not root.
Andy Flisher is a Software Developer based in the North East of England specialising in cross platform development. Mobile Development experience includes Windows Phone, Android, and iPhone Apps. Desktop Software Development includes bespoke Windows, Linux, and Mac Applications. Web Development Skills include PHP, Perl, Python, ASP (Classic and .NET) – Andy Flisher on Google+
Monitor Wi-Fi with Lion’s hidden tool | Macworld
Monitor Wi-Fi with Lion’s hidden toolÂ
by Lex Friedman, Macworld.com  Sep 5, 2011 2:00 pm
Hints reader nathanator11 discovered that Lion includes a handy app that provides all sorts of diagnostic information surrounding your wireless network. Much of the information the software generates gets pretty technical, but even Wi-Fi novices may find some of the details that the utility aggregates useful.
Wi-Fi Diagnostics is tucked away in the /System/Library/CoreServices folder. To get there, I pressed Shift-Command-G in the Finder (the equivalent of going to the Go menu and choosing Go to Folder), and then typed in the /System/Library/CoreServices path and pressed Return. Once in the folder, I found Wi-Fi Diagnostics and double-clicked it. Alternatively, you could launch the Terminal and type open “/System/Library/CoreServices/Wi-Fi Diagnostics.app”, and then press Return.
However you find and launch it, Wi-Fi Diagnostics gives you four options: Monitor Performance (which shows you signal strength, noise level, transmit power, and data rate); Record Events (which can keep a log of network happenings); Capture Raw Frames (which records everything coming and going on your Mac’s wireless connection); and Turn on Debug Logs.
If youâre at all interested in whatâs going on with your Mac’s Wi-Fi connection or your wireless network, Wi-Fi Diagnostics is freely included with your copy of Lion, and you canât break anything by poking around the appâso enjoy!
via Monitor Wi-Fi with Lion’s hidden tool | Networking & Wireless | Mac OS X Hints | Macworld.
Andy Flisher is a Software Developer based in the North East of England specialising in cross platform development. Mobile Development experience includes Windows Phone, Android, and iPhone Apps. Desktop Software Development includes bespoke Windows, Linux, and Mac Applications. Web Development Skills include PHP, Perl, Python, ASP (Classic and .NET) – Andy Flisher on Google+
Middlesbrough 10k – 2011
The Middlesbrough Tees Price 10k – 2011 – As run by Flish
The embbedded route map is currently broken (Take note please Runkeeper, embedded maps still broken), so here’s a link to the actual page – Middlesbrough 10k 2011 Race
Official Chip Timing:
Number: | 692 | ||
Gun Time: | 00:56:50 | Position: | 1138 |
Chip Time: | 00:54:14 | Position: | Unknown |
Category: | Vet Men 35-39 | Position: | Unknown |
Gender: | M | Position: | Unknown |
Age Grading: | 47.46% |
Avoid Bristol Cameras
Avoid Bristol Cameras
Update 27/11/11
I note that the returns page has now removed the non-existent / functional email address I refer to below, so *something* has fed back and been achieved – not that anyone has been in touch to get any more detail, ask for a right of reply, or work out what they could have done to be better. I also note that googling for ‘Bristol Cameras’ brings this page in at number two, so hopefully at least I’m helping you guys make an informed purchasing decision
I have deliberately left this a month from complaining (ranting?) at Bristol Cameras to give them every opportunity to fix, resolve, and generally be better, but they haven’t. As of now if you’re thinking of buying a new digital camera or accessories online then Bristol Cameras may not be for you, avoid Bristol Cameras.
Background, I was in the market for a decent wrist strap and a spare battery for my Canon G12, not surprisingly I wanted the best deal, so a Googling I went. The end result was with me at Bristol Cameras website where they had listed (not specifically claiming in stock) what I wanted, adding in carriage was a fair price, and my background checks showed no horror stories (till now?) and they seemed legit. This was the 10th May 2011.
I received my order confirmation email from a ‘no-reply@’ address (not unusual) and got on with life.
On the 16th May I had heard and recieved nothing and wanted to query the ETA, spotting the email address I went hunting over at the Bristol Cameras website, nothing obvious, the contact us page was empty other than an 0844 number and snail mail, but thankfully the Bristol Cameras returns page (http://www.bristolcameras…) offered me [email protected] so an email was sent asking for an update. Edit: Image removed as host where image lived no longer exists, thank you Skitch / Evernote!The next day I got an email back stating that the wrist strap was out of stock. Knowing that I would have to purchase elsewhere (and incur another shipping charge) I replied asking them to cancel the entire order as I didn’t want to split with another vendor and loose money.
They ignored this email, shipped the battery, and charged me for it anyway. Now, I have no idea if they have *ever* read or replied to any of my emails, certainly none ever bounced back, and seems a co-incidence that I got the out of stock email a day after I contacted them.
I didn’t complain, assumed they had mis-interpreted my email and just cancelled the out of stock element.
On the 21st June I got another email with an order up date, wrist strap still out of stock đ Annoyed, I pinged another email back to [email protected] making it quite clear I did not want the wrist strap and to cancel the remaining order.
All quiet until the 7th July, Good News! The wrist strap is in stock and will be shipped shortly, **not amused**. Especially as it’s gone 5pm when I read this and they could have shipped already, no choice but premium rate 0844 with an impressive ire on me.
Which gets worse, they don’t answer, well their phone system does, but a human doesn’t, so I’m on hold and paying for it. Looking at the Bristol Cameras contact page doesn’t help, ‘the shop’ is open till 5, ‘mail order’ till 5.30′ there’s only one mind, the 0844 one. At this point I’m still paying, so I google some more for alternative numbers and dial them all on my mobile (still on hold on land line), but at this point it’s gone 5.30 so assuming all gone home, not that their phone system seems to know, it’s still suggesting someone will answer, at 5pm. I’m pretty sure the won’t, and after half an hour hang up, spin off a vitriolic email, and wait till morning.
In fact I wait till late morning to give them a chance to respond, they don’t, so I call (at 5pm again). To sum up, they don’t care, no apology, only a grumble that an email address is actually published on their own site, that apparently is a mistake! They are an E-commerce trader and actually admit to not wanting to communicate electronically? Daft thing is I’ve given them a month and it’s still there đ But then the key revenue stream for Bristol Cameras seems to be from 0844 call share, and you guessed it, no apology for a phone system that keeps you on hold even when there’s no one to pick up, probably disappointed that I didn’t hang on longer.
This isn’t the worst case of Customer Service ever, but it’s bad and it’s a sad fact that these days people only seem to learn the hard way once we the disgruntled consumer start shouting, hence am typing. Bristol Cameras clearly have no respect for their customers, 0844 only and no published (working) email address just doesn’t cut the mustard for an online trader, it’s against all best practice. So if you where thinking of placing an order with Bristol Cameras then don’t, in my opinion Avoid Bristol Cameras
Rant Over
iOS 5 Beta 2 has bricked my iPhone – Updated
Updated 28/6/2011 – See below for a solution to avoid bricking in the first place
And I’ve just bricked my pants, thankfully I think as I type (gives me something to do as I wait the process out), there is a solution.
I was already running iOS 5 on a non jailbroken iPhone 4, legit route (am a registered developer so downloaded and updated via xcode etc), all good, got to the ‘Waiting for Iphone’ message, and stayed there. Â So I waited, and waited, but nothing.
Screen was black, so went to power on, and nothing, holding down power and home button, nothing, not a glimmer, one dead iphone. Â Bricked.
On a whim I killed Xcode and fired up iTunes, and a glimmer of hope, a dialogue box appears, we have detected in restore mode, still nothing on the screen, no connect to itunes diagrams, but still, who am I to argue, if you can see my iphone I’ll work with it.
Clicking through the process it offered me iOS 4.3 as the last ‘released’ version, so I cancelled out, Alt+Clicked the Restore button and browsed to the v5 beta 2 .ipsw file, and waited, and am still waiting, but it’s restoring and as I type there’s an Apple logo and a progress bar on the screen so something’s alive.
Looking about I did find this link (Apple Dev forums so needs a Dev logon I think) Iphone 3gs dead after IOS 5 beta2 update which pretty much echoes my process, and I can verify the success now as iTunes is offering to restore from backup, and the phone is showing the new activation screen.
Phew, I think, and thanks Apple, that was seamless.
Caveat: Apple warn you not to install Developer releases on your primary / sole device, but I know best, blah, blah, yes, all my fault if it goes wrong I know đ
Update: Â Have installed iOS 5 Beta 2 on 3 Devices now, first two I did normally via Xcode and both showed bricked symptomks of an entirely black screen and lifeless after Xcode finished restoring. Â Thankfully both came back to life by re-restoring through iTunes as per above.
The third I’ve learnt from (only 2 failures to learn, I’m getting there!), plugged device into Xcode and clicked the ‘Use for Development’ link in Organiser (it was a new device and UUID so necessary) and let it install the debug symbols etc. Â And then quit out, into iTunes and immediately Alt+Clicked Restore, browsed to the firmware and off we go, basically bypassing the wasted and aborted Xcode restore process. Â All good, and straight into the new Activation process after a reboot.
Andy Flisher is a Software Developer based in the North East of England specialising in cross platform development. Mobile Development experience includes Windows Phone, Android, and iPhone Apps. Desktop Software Development includes bespoke Windows, Linux, and Mac Applications. Web Development Skills include PHP, Perl, Python, ASP (Classic and .NET) – Andy Flisher on Google+
South Africa Life
Real life street photography showing the life and people of South Africa…
Taken on a a family trip encompassing the Garden Route, Cape Town and more. These are just some samples, please check out the full gallery on Flickr
No funding in the North East, at least not for websites
I’m a web developer, in the North East, my customers (rightly) want to pay as little as possible, so funding and grants is a popular question. ‘Can I get funding towards my website’, and the answer is, am not allowed to talk about it. It’s like Fight Club, ‘The First rule of Website Funding is …’
Ok slight distortion of the truth, but today have been threatened with suspension from the North East England Service Providers Register (NEESPR – You all know what that is right?) because I used the word ‘funding’ on our website. Apparently it was against the rules and not allowed, ok, it’s been removed, but after much discussion as to why, and what the alternative information we could offer was (there isn’t any) it’s just not allowed. We basically cannot even say that if you are interested in funding we’ll direct you to the correct people, at least not on our website – And there’s no route to feedback how unhelpful this is to the end client, it’s the rules, do it.
Most people have heard of Business Link, and the key phrase is ‘Business Link Funding’, and to be a provider for a project that is funded by Business Link (the funding isn’t actually from Business Link, it’s from a range of fund sources co-ordinated by the Investment Centre) the provider must be listed on the NEESPR (I have been in it’s various guises for about 10 years now), you get vetted, show references, and obey the rules etc (which is why we removed the word funding). The rules state that all we can say is ‘As listed on the North East England Service Providers Register (NEESPR) so I asked if we could link to their site if visitors wanted information on funding, we can, but because the NEESPR don’t provide funding, there is actually no mention of funding their either.
So, what to do? I get that they have to monitor the unscrupulous, but we’ve never even bent the rules on this topic, it’s always frustrated me that I can’t offer clients any real information on web site funding, I can but guess at the eligibility criteria, the funding rates available, all from feedback from previous clients, I’m not really allowed to even guess in a face to face, just direct them to Business Link. This doesn’t help me as if not careful it looks like I’m being dis-interested or not trying to help my clients, when in reality I want to help, I want to make the funding process as informed and as simple as possible, but I can’t. ‘Go talk to Business Link’ as good as it gets, and that’s face to face. Now, I can’t even offer a link to Business Link on our website because we’re honestly not allowed to use the word funding, cannot even allude to whether funding is even available.
There will be no funding on our website. I cannot help but think this is not useful to Joe Public, this is not in their best interest, and it certainly doesn’t help me help my clients đ
As of writing a Google UK search for website funding north east returns 466,000 results, mostly my competition. Let’s see if the rules are evenly applied
Andy Flisher is a Software Developer based in the North East of England specialising in cross platform development. Mobile Development experience includes Windows Phone, Android, and iPhone Apps. Desktop Software Development includes bespoke Windows, Linux, and Mac Applications. Web Development Skills include PHP, Perl, Python, ASP (Classic and .NET) – Andy Flisher on Google+
Mac Appstore exit code: 173 issues
I just love an IT issue where I’m almost the only one that has it, means no fix, and a small group of people tearing hair out (thankfully I have none). Well my issue c/o the new shiny Mac App Store is purchased apps dieing with nothing more than an ‘exit code: 173’ logged, which seems to be part of the DRM / copy protection process. Shame is they’re legitimate purchases!
[···]