==Introduction.==
After a recent crash that caused some loss of data (not Linux), I decided to look at the possibility of an external USB back-up drive, in order to back up on a more regular basis; I lost about a weeks worth of data plus some email records. The thinking behind it was to have a drive that would back-up from both Windows® and Linux machines and therefore, the file system had to be recognised by both systems. I already had a 250GB hard drive purchased recently for a different project that has been shelved and so it seemed the answer was to look at one of the many external cases, as a suitable build project.
==Case selection.==
You need to be aware, not all cases are equal!
There are cases that are specific to only '''IDE''' hard drives, or specific to '''SATA''' hard drives. Some will accommodate both types, but tend to be more expensive. You need to determine the hard drive size too. Is it '''3.5"''', the standard desktop size, or '''2.5"''', the laptop equivalent? Do you want data transfer at '''USB 1.0''' speeds, '''USB 1.1''' or '''USB 2.00'''? Looking at the specifications for each version will show that USB 1.0 provided data transfer rates of 1.5 Mbps (Mega bits per second), while version 1.1 offers 12 Mbps, while version 2.0, offers 480 Mbps. So really, it's a no brainer as version 2.0 is backwards compatible with the others.
With the above understood, my hard drive was IDE and 3.5", so I went looking for a case for a 3.5" IDE drive with a USB 2.0 port connection and came up with this:

It's a nicely finished aluminium case, complete with its own power supply, mains kettle cable, USB connector cable, screw driver, four screws and a driver disc. Purchased via ebay for £9.98p delivered! How do they manufacture these things so cheaply?
==Assembling the drive.==
This part is only here for completeness, as depending on the case you purchase, things may vary slightly. Having said that, it seems most are fairly similar.
The main criteria is to determine (assuming it's an IDE drive) how to jumper it. You may know, a jumper(s) is used (or not) on the hard drive to set it as a '''Primary drive, Slave drive or Cable select.''' The jumper can also be used to limit the capacity of the drive for very old computers. As reports circulate around the Internet about incompatibility with various settings, I decided to tackle the problem as follows.
Using the supplied screwdriver, I removed two screws on the side of the drive adjacent to the '''power end''' of the case; in other words, where the connectors were. The end then simply slides out from the case and you will see a tiny circuit board and the main data cable and power cable all attached to the front piece you have just removed. Look at the main case and on the underside there is provision for four screws via four holes. These will line up with the fixing holes for the drive. I decided to remove the jumper from the hard drive, thereby designating it as '''Slave.''' Now the next bit I did for my convenience and '''no way am I making a recommendation you follow suit''', but in order to determine if the drive would be recognised in this form, I connected the front plate data connector and power connector to the raw drive. Making '''''very''''' sure the components were not '''shorting out''' on anything, I fired it all up and had a look at the disk manager to see if it was recognised. As luck would have it, it was (more about that later - remember at the moment it's still a new raw drive), so I stayed with that configuration, unmounted the drive and carefully powered off.
Note: had the drive not been recognised at this point, it would have been a simple event to turn it off and try configuring it as a Master or even Cable select drive to see if that worked.
It was now just a question of noting which way up the drive mounting screw holes were and when sliding the drive in the case, aligning them with the case, so the afore mentioned case holes married up. Next I used the supplied four screws to secure the drive in the case. All that remained, was to very carefully position the data and power cables so they laid nicely in the case and resecure the front panel with its two screws.
So now I had an assembled external hard drive that I knew would be recognised in the Debian machine I was using, but of course, incapable at the moment of accepting data.
==Partitioning and formatting.==
The first thing I needed to do, was to determine how Debian designated the drive. In order to do this, I used the '''Desktop --> Administration --> Disks''' application:

When you click on '''Disks,''' this is what you'll see:

Yes, as always, it requires your '''root password.''' Once you have entered your password, you will see this:

Of course, at this point, is is essential you identify the correct hard drive, as you will be partitioning and formatting it, '''''thereby destroying any previous data.''''' In my case, there are three possible drives that could be my target. Each shows as 232.89 GiB, however, by choosing the '''Partitions''' tab, we can see what has been configured. In my case, remember it's a raw drive, so there are no partitions yet written. Clicking on Partitions revealed this:

Bingo! We've got it sorted! Alternatively of course, you could simply fire up '''Disks''' prior to connecting your new drive, note the drive(s) already found, then connect your new drive and see where it appears. Either way, the important information we require is on the '''Properties''' tab and if you refer back to that now, you will see the drive is designated as '''/dev/sde''' (just by the little drive icon). That's the information we need to move forward.
Shock, horror, it's now time to move to the command line, so going to '''Applications --> Accessories --> Root terminal''', will give us what we want.

'''''Note to all users;''''' in the command boxes, '''#>''' represents the command prompt and '''is not''' part of the command. Any command typed, '''''will not''''' be activated until '''enter''' is selected.
'''''Note to the Ubuntu family users;''''' any commands indicated here should be preceded by '''sudo'''
Once we have our root terminal open, we can start the process of preparing the drive for practical use. In order to do this, we are going to use the '''fdisk''' application, to partition the drive. The command:
will provide something similar to this:

The important part to note here, is towards the bottom of the screen-shot. Just above the bottom command prompt, there is a message that says; '''Disk /dev/sde doesn't contain a valid partition table'''. This provides further confirmation, '''sde''' is the drive we have to work on.
So the next command we need, tells Linux to use the application '''fdisk''' and what to use it on '''/dev/sde'''

You can now see some warnings, that in general, it is safe to ignore. You can also see the command prompt has changed from what would be your own, to fdisks own prompt. fdisk works on a menu based system and now you are inside the system until you opt to exit. As you can see, typing '''m''' will offer help. so let's try that and see what happens.

You can now see the various options of this powerful application that are available to you. We need to create a new partition, so appropriately, the '''n''' command, sets this in motion.

In the above screen-shot, I have combined a number of the actions required to set-up the partitions. If you start at the top of the screen-shot, it is a repeat of where we were; the menu. Next, we selected '''n''' which asks for a '''Command action''';
'''e extended'''
'''p primary partition (1-4)'''
As I wanted a primary partition, I typed '''p''' and was then asked which number partition I wanted to create. Well, me being a logical sort of chap decided to start at '''1''' and so you see it typed here. Now fdisk wants to know where to position the partition on the drive '''(First cylinder)'''; again I start at '''1''' and finally where I want it to end '''(Last cylinder)'''.
This last part deserves some explanation. If I had typed in there '''30401''' as the last cylinder, fdisk would have used the whole of the drive as one large partition. However, it was my intention to split the drive into two equal parts, '''15200''' (more or less) divided it into two. Equally, I could have used the +size option, where for example, '''+125000M''' would equate to a '''125GB''' partition.
Notice now, how we have automatically been ejected from fdisks sub-menu and are now back at its command line - '''Command (m for help):'''. Therefore, referring back to the main menu, if I now type '''p''', it '''prints''' the partition table. That means, it '''''prints to screen''''' not to a printer in the conventional sense. We can now see, our first partition is specified and the next stage is to repeat exactly the same sequence of events, '''''except''''' I used the Partition number '''2''' instead of 1 to create the second partition. It should also be noted, I started the new partition at '''15201''' (the next available cylinder) and specified the last cylinder as '''30401''', thereby using all the remaining disk space. The next screen-shot shows the complete second process:

Notice, '''p''' shows both partitions specified '''/dev/sde1''' and '''/dev/sde2'''. You should also understand, I used the word '''''specified''''' as the partition table has not yet been written to disk. We'll get around to that soon.


Comments
Storage
This was a very interesting
This was a very interesting article, thanks. I have now reached the point where I need to consider a data backup option. I've been doing some research, though, and I'm not quite certain if it makes more sense to go with an external hard drive or rely on an online storage site. I understand that I am taking a risk with my private files, but I'd be more comfortable with them taking on the responsibility and liability for any damages that would result from power outages or damaged files. Could you offer an opinion on the advantages and disadvantages of online backup services vs external hard drives?
Linux recognising NTFS Formated Drives