Friday 23 September 2011

7. Data Storage and Disc Partitioning

Data storage in PCs comes mainly in two forms. The memory in a PC is known as RAM (Random Access Memory) and is used for temporary storage of program instructions and the data necessary to carry out those instructions (word processing or spreadsheet data for example). This is volatile storage and it is emptied when the PC is turned off completely. The other main type of storage is that found on HDDs (Hard Disc Drives) and this storage to all intents and purposes is permanent until erased. You can add to this storage by using everything from a simple USB stick to an external HDD and on to Network Attached Storage devices containing hundreds of Terabytes of storage.

Other devices exist such as CDs, DVDs, PROMs, EPROMs etc. but this article concerns the HDDs in or attached to our PCs.

Your starting point is the HDD in your PC and this will contain your Operating System (OS), Applications, and some of your data. Other articles will follow regarding data-safety but for now I am explaining about data storage on your HDDs. The HDD in your PC is the most important one to start with and you should take all steps possible to protect it and its data either from malicious attack from viruses etc. and from human error.

An HDD consists of several round platters which spin at several thousand rpm. The platter is coated in a magnetic media (something like the surface of a cassette tape) and hovering some microns above it is the read/write head which as the name suggests reads from the platter or writes data to it. HDDs in notebooks are quite robust but you should never shake or bump an HDD whilst it is in use. The distance between the read/write head and the platter is smaller than the diameter of a smoke particle and any severe movement can cause the head to touch the platter and damage it beyond repair. This has always been known as a "Head Crash" and you may have heard the term.

Each platter is divided into concentric tracks and each track is further divided into sectors. A sector can hold a file or part of a file but cannot contain data from two or more different files. If only part of a sector is used for a part of a file the remainder is dead space until the sector is freed by deleting the file. In this way you can have a collection of files using up more space on the HDD than their total number of bytes because of the part sectors used.

Here you can see that the total amount of space used
by this set of files is 102Mb whereas the actual files total to only 101Mb.
This peculiarity is caused where you have partially full sectors and so
the empty space in the sectors is counted as used and is not available.
This usually occurs when you have lots of small files which occupy only part-sectors.

When the PC writes data to the HDD it does not necessarily write it in a contiguous space but may spread it all over the disc using up spare sectors, especially if the disc is quite full. There are tools for cleaning up data and this will be covered in another post.

You should always try to keep your data organized neatly on your PC and one measure which can help this is Disc Partitioning.

Disk partitioning is the act of dividing a hard disk drive into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks. A partition editor software program can be used to create, resize, delete, and manipulate these partitions on the hard disk. An HDD may be partioned at any time using a partition editing application, even after years of use. You could split the HDD into two parts then move across the actual data into folders in the new partition and leave the OS and applications on the original partition. Once you have done this you may manipulate the sizes to suit.

I have downloaded Easus Partition Master Home Edition which is free to download and use for non-commercial use. With this you can create, delete, or resize partitions on the hard drive in your PC. It is particularly useful in a laptop as one generally only has one drive in that type of PC.

There are lots of technical pros and cons for dividing the HDD in a PC into more than one partition. The one outstanding advantage for me however is that if your operating system goes belly-up on a partioned disc, and you have to reload Windows, you only need to format the primary partition at installation time, and you do not lose your collection of data on any other partition you may have created.

When I partition an HDD in a laptop I allow enough room on the main partition, which will become the C: drive, for the OS and all applications which I intend to install. I never worry about losing applications such as MS Office, or Nero etc. as I have the installation media and can always re-install them after a crash. My data however may not have been backed up and if left on the C: drive it is vulnerable. For this reason I do not use the supplied libraries which are set up in Windows, My Documents My Pictures My Videos etc., but prefer to save all data onto either the second partition or an external drive.

The following graphic shows how my drive is partioned. The HDD in the laptop is a 500Gbyte drive and at set up I created a primary partition of about 100Gbyte and left the balance for data storage.

The single HDD in this laptop has been partitioned to allow
approximately 100GBytes for the OS and applications software,
and the balance forms another partition which
I use for data storage.

A word about disc sizes. Going back to basics in computing terms, 8 bits make a byte and for the sake of argument 1 byte stores 1 character of information. Originally a megabyte was actually 1024 bytes calculated in the old base 2 method. This led to confusion as mega in the scientific and mathematical world, means 1000 so by 2007, all the world standards bodies adopted the "mega = 1000" rule and HDD manufacturers strangely adopted this standard. So a megabyte = 1000 bytes, and a gigabyte = 1000 megabytes.

The result is that when you buy a 500Gbyte HDD you are actually buying 500x1000x1000 bytes (500,000,000) from the manufacturer. Confusion still exists because file management programs use the old base 2 standard where mega = 1024. Windows Explorer reports it as only 477 true Gbytes. Allow for other bits and pieces of system storage and you are left with about 450 true Gbytes of storage.


It is important to understand this because of the two standards in use. You are not being "done" when after installing and formatting a 1 Terabyte drive you have only 930 Megabytes of space available. This is the true figure to use, especially if you are using Windows Explorer to view your available disc space. (There is lots more detailed information about this to be found in Wikipedia).


-------------