# Repurposing old hardware



## dopeelf (Mar 13, 2014)

Hey all,

I am reporpusing a Mac Mini Core 2 Duo and a Drobo Gen 2 for a offsite backup server. It's been a struggle to gettting it all to work. First I tried with a Mac Mini G4 but that didn't work because there was a difference between big and little endian which made ext2fs not work (need hardlinks for BackupPC or I would have gone with fat32 and been done a lot faster).

Then I started looking at my other Mac Mini. I couldn't boot of the newly installed harddrive when I did an automated disk setup (bsdlabel works fine though!), putting together a "dummy vga" adapter for the mac mini to boot headless and format the drobo to something I can work with (Had to boot into Linux and use linux-utils to setup the drobo as ext3 using drobo-utils,). I need to figure out how to make FreeBSD see it as ext3 and not ext2, I am not sure but I guessing FreeBSD sees it as a ext2 filesystem.

So, now I am nearing a final solution, just verified that I can move the Drobo between my main server (which is going to handle onsite backup) and the offsite server and that the Drobo firmware understands the filesystem, can recover from pulling a drive and putting another one in it's place etc.

The last little quirk I have left is that I get error messages from the USB system. Seeing as I am a more of a pupil than administrator/developer/guru I have no idea where to start looking for a solution. The errors I get are:

```
Mar 13 22:29:47 mia kernel: (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 44 7b f3 4a 00 00 80 00 
Mar 13 22:29:48 mia kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Mar 13 22:29:48 mia kernel: (da0:umass-sim0:0:0:0): Retrying command

Mar 13 22:38:32 mia kernel: (da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 47 2a 04 b2 00 00 80 00 
Mar 13 22:38:32 mia kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Mar 13 22:38:32 mia kernel: (da0:umass-sim0:0:0:0): Retrying command

Mar 13 23:03:56 mia kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 36 84 0f 52 00 00 48 00 
Mar 13 23:03:56 mia kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Mar 13 23:03:56 mia kernel: (da0:umass-sim0:0:0:0): Retrying command
```

Where would be the best place to start looking for a solution? It's a lot to learn and take in when Mac OS 9/Mac OS X has been the only system I've used for the past 10 years or so.

Regards
Pasi


----------



## ralphbsz (Mar 14, 2014)

These are disk IO errors.  It's easy to decode the command: OpCode 2a is write, opcode 28 is read.  00 means no special options.  The next four bytes are the disk address, big-endian: 0x447bf34a, or 0x472a04b2, or 0x36840f52.  Those are all around the 1/2 TB mark, so reasonable for modern disks.  Next 00 is reserved.  Next two numbers are the transfer length (counting in sectors), which are 128 sectors for the writes (64 KiB) and 72 sectors for the read (36 KiB), all reasonable.  So the commands are sensible.  Then you get errors, and the kernel retries the command.  There are two options: either these are real disk errors.  In that case, they would probably have reoccured (at least the read error, disks don't magically fix themselves after a read error).  So I think the other option is a little more likely: these are USB transmission errors.  It would be nice if the kernel printed out a little more detail than "completed with an error" (which layer below returned the error? what was the error? is there sense data?), but I think all this is a flaky USB.


----------



## dopeelf (Mar 14, 2014)

I think I am closer to finding an answer to my problem.

If I setup the drobo in Linux using drobo-utils I can not copy files bigger than 2GB to the drive in FreeBSD. When I setup and format the drive in FreeBSD I noticed I got this in the log about the same time the format finished.

```
Mar 14 21:21:00 mia kernel: (da0:umass-sim0:0:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 00 00 00 
Mar 14 21:21:01 mia kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Mar 14 21:21:01 mia kernel: (da0:umass-sim0:0:0:0): Retrying command
```

I need to do some more testing but I have a sneaky suspicion that this might have something to do with ext3/GPT setup under Linux not working properly in FreeBSD.

(edited formatting code)


----------



## ralphbsz (Mar 16, 2014)

Not being able to copy files larger than 2GB doesn't have much to do with GPT.  It might have to do with something somewhere along the data path running a 32-bit file system (to be more accurate, a file system that limits file sizes to 32 bits, meaning a file >2GB gets a negative file size).  I thought those went extinct a few years ago ...

So, let's be really clear.  You have a computer, namely a Mac Mini.  What type of Mac Mini?  What OS do you run on it?  I presume it must be FreeBSD (otherwise you wouldn't be posting here), but what version are you running?  Next, you have a Drobo, and we know it is a 2nd generation Drobo.  Presumably, it is connected via USB to the computer (I'm guessing that because your disk error messages above looked like they were from the USB mass storage driver).  Next, you have some sort of file system on the Drobo.  The part I don't understand is: you seem to be running ext2 (a Linux file system) using a FreeBSD server.  While that is possible, it seems odd.  Why not run a more typical FreeBSD file system, such as UFS or ZFS?  On what machine was that ext2 file system created?  There are some hints in your original message that you disconnect the Drobo from your FreeBSD computer, and connect it to another computer.  What OS is that computer running?  What file system does that machine use?  Do you cleanly dismount the Drobo before reconnecting it?  Might it be that you are running ext3 (which really means ext2 with a journal and a few directory format changes) on one machine, and ext2 on the other machine, and the format changes are confusing one or the other machine?

Please begin by clearly explaining what computers, OSes, and file systems are involved, and who is doing what to whom.


----------

