Computer lessons

What is a hard drive for? What is a computer hard drive? Preventing and troubleshooting hard drives


Hard drive: why do we need partitions? People often ask me the question: why do we need two, three or more sections and on what basis should we choose their number and size? There is probably no universal answer to this question, but some recommendations can be given. Let's consider two options:
Option 1. There is one logical partition for everything.
Pros:
- Free space is used as efficiently as possible (severely swelling FAT tables can be neglected).
- If a friend comes to you with his hard drive, then after connecting his first partition will not “interfere” between your C and D, changing your D to E, E to F..., creating software problems on all logical drives except first.
Minuses:
- Restoring deleted files becomes extremely problematic (the main problem is the OS and, especially, its paging file), because Windows constantly resizes the page file and creates and deletes temporary files, which causes the sectors occupied by the deleted file to be physically overwritten.
- Very quickly (especially thanks to an OS or multiple OSes) files and folders become extremely fragmented.

Let's consider an example task: We need to determine how many times (let's call it k) the reading speed drops if the file is fragmented. Solution: There is a logical partition with a cluster size of 32 KB and a file of 20 MB with fragmentation of 20%.
Let's also assume that the sequential read speed is 20 MB/s and the positioning time is 10 ms (in reality this time is much longer, which increases k, but this time is convenient for calculations). Accordingly, the file occupies 640 clusters, of which 128 are fragmented and to read them you need to spend time on positioning: 1280 ms in total.
It turns out that reading such a file will take 1 + 1.28 seconds (sequential reading time + positioning time), which is 2.28 times more than when reading an unfragmented file.

On a note(!):
- With a cluster size of 16 or 8 KB, the total search time increases by 2 or 4 times, respectively (due to an increase in the number of sectors, including those that require positioning to access).
- As linear reading speed increases, the performance loss factor increases (when moving from unfragmented to fragmented reading), although the total performance increases.
In other words, the faster the linear read speed, the more you can benefit from unfragmented reads.
- With fragmentation of 40(10)%, the total search time increases (decreases) by 2 times.
- In general, when estimating speed parameters within reasonable limits, you can use the following formula:

k is the reduction factor for the read/write speed of a fragmented file compared to a non-fragmented one.
Option 2: There are multiple logical drives.
Minuses:
If you partition and use logical drives incorrectly, at best you gain nothing compared to option 1.
It becomes more difficult to fully utilize all available space.

Let's look at an example. There are 4 logical drives and each has 180 MB free. There is a total of 720 MB, but it is impossible to record a 650 MB movie.
Pros: (when broken down and used correctly!)
- Low rate of system fragmentation and, as a result, maximum HDD performance is maintained much longer than in the case of a single partition.
- High speed defragmentation(!) of the system. System defragmentation can be divided into several parts.
- It becomes possible to correctly use programs to recover deleted files. Those. The rollback file (and the version of the recovered file) is written to another partition. A program that fails to recover a file will at least not make the situation worse. The probability of recovery is approaching 100%.
- Each operating system can (and should) be installed on a separate partition.
So, the consideration of the pros and cons is over.
I will give a possible option for partitioning into logical disks, which anyone can remake “for themselves”.

Disk C: Partition for the 1st operating system. If this is Windows 98, then 1 GB is more than enough, even if you set the minimum page file size to 256 MB. With 128 MB of RAM, it is extremely difficult to imagine a situation where Swap (swap file) will become larger than 256 MB. It is useful (and highly desirable) to defragment it and place it at the beginning of the C drive.
The system will be faster if you switch from FAT32 to FAT (FAT16).
When using FAT on a 1 GB partition, you can make better use of the disk space if you set the cluster size to 16 KB, which requires setting the C drive size to just under 1 GB, for example 988 MB.

Disk D: Even if you are not going to install a 2nd operating system, it is advisable to provide space for it right away, because then you will have to tinker a lot with Partition Magic. If the second partition is not allocated for Windows XP, then 1 GB will be enough even for Windows 2000.
Naturally, this is subject to the condition that its paging file is placed on another partition.
It is extremely useful to combine it with the Windows 98 page file, for which you need to set the same minimum size and rename (D:\)pagefile.sys (Swap Windows 2000) to (C:\)Win386.Swp (Swap Windows 98).
This can be done using Regedit.exe in Windows 2000. I will not talk about the technology of working with the registry, I will only say that you will need to rename in 4 places in the registry if this is done immediately after installing Windows 2000, and in 6 places if this operation will be carried out later.
As with drive C, you can make the disk size 988 MB and use FAT.

Disk E: If two operating systems are enough for you, then disk E can be used for various programs that you use. It should be emphasized that the sizes of system disks were chosen based on the fact that you will not install anything on them except the OS itself.
Because additional programs will be installed on a separate partition, then when Windows is demolished and all programs are subsequently reinstalled, they will all be defragmented (if, of course, they were in this state before demolition). Moreover, many (but not all) programs will not need to be kept in two copies: for Windows 2000 and Windows 98.
Some programs will work without reinstallation. With this approach, the most commonly used programs fit into 1 GB + programs specific to you.
If you don’t install games here, you can add no more than 1–1.5 GB. If two operating systems are not enough, then Disk E, F... is reserved for the required systems, and what is said about Disk E will apply to the next section (i.e. for all system systems).

Disk F, G... then you can make a disk for games and movies. A game disk will contain an average number of files, so it is not advisable to make clusters of 16 or 32 KB in size there. On the partition for movies (and music), on the contrary, it is advisable to force the cluster size to 32 KB.
If you take a 20 GB hard drive, then after creating the partitions listed above, you will have about 16–17 GB left for these two partitions. It is unlikely that you simultaneously play so many games that cannot fit into 1–3 GB.
Therefore, 14-16 GB can be allocated for movies. Defragmentation of all created partitions, with almost any degree of fragmentation, will take about 10-15 minutes, with the exception of the largest partition, however, if you store only large files there (and this is what everything was going towards), then defragmentation there, if necessary, will be very not soon.
Moreover, it will take no more than an hour to complete.
In principle, you don’t have to create separate sections for games and movies (large files), but still, when changing games often, it would be nice to be able to quickly defragment them.
The latter can be used to create a partition for a large number of very small files, which also often change their size (for example, for documents or programs). It is unlikely that you will need more than 100–120 MB for these needs.
When using FAT, the cluster size can be set to 2 KB, and when using FAT32 - 512 Bytes (for more complete use of disk space). The advantage of placing this partition last in this configuration is that you can very quickly increase the size of this partition at any time.
- Remember that there are many more utilities for FAT recovery than for FAT32 recovery.
- You can estimate the loss of disk space due to the fact that the file size is not a multiple of the cluster size using the formula:

- Already when using a 6-15 GB disk, the efficiency of the above partitioning option becomes significantly less effective.
When using hard drives with a capacity of 30, 40 or more GB, the situation is the opposite. Additional capacity can be spent on increasing the partition for large files.
On disks of such sizes, having one partition is extremely ineffective (since the OS keeps in memory FAT XX of the partitions it works with; in the case of one large partition, a very “swollen” FAT32 will be constantly present in memory).

About utilities for manipulating partitions. You can use the DOS program FDisk.Exe, which can be found in the C:\Windows\Command or Partition Magic directory (the minimum version I know is 5.0, currently there is version 7.0).
To use the second program, you need to install Windows.

How to use these utilities. Those who have had to partition and format disks of 20 GB or more know how much faster Partition Magic does it with the bad sector check disabled (to equalize the working conditions with FDisk).
Further, FDisk works with complete loss of all data, and Partition Magic allows you not to lose anything (it all depends on your hands).
So if you already have any partitions, use Partition Magic. If the hard drive is “brand new,” then you first need to create one large partition using FDisk.Exe.
Format it using Format.com, install Windows 9X/Me/NT/2000 (not all of them, of course, but the one you choose) and Partition Magic and literally instantly create partitions in Windows, because... The less data there is to lose, the faster Partition Magic works.
In conclusion, I would like to say that the main goal of the article is to propose an option for partitioning a hard drive into partitions and show why this is needed and what it gives.
That is why I paid much less attention to the questions “how” to do this, in contrast to the questions “what” and “what” to do, because This is a topic for a separate article.

Vadim Shutko,

Every computer has a hard drive or, as it is often called, a hard drive, which is the main storage location for all information used by the computer and its user. The hard drive stores the installed operating system, all programs used by the user, and data. The processor takes the information necessary for processing from the hard drive and then writes it back to the media. The amount of information stored on a hard drive depends on its size.

The very first models of hard drives allowed storing up to 10 MB of data on their disks, which was a lot in those days. Nowadays, modern storage devices allow you to store thousands and tens of thousands of megabytes. The memory capacity on modern models is calculated in gigabytes and terabytes. This makes it possible to store a huge amount of films, music, videos, games and other data. A significant increase in the amount of memory on a HDD is associated with the progressive development of computer technology, as a result of which movies, games and other data take up more and more free space.

Design features of hard drives

A modern hard drive consists of several metal disks on which information is recorded. The discs are coated with iron oxide or another special compound that can store the effects of a magnetic field. The number of disks depends on the volume of the media and usually ranges from 1 to 3. Metal disks are ideally even, smooth and balanced, due to which they can rotate at high speed; according to the standard, it can be 5400, 7200 or 10000 rpm.

Special heads move along the disks with the highest positioning accuracy. Each disk has 2 magnetic heads. Reading data from the surface of disks is carried out by installing special magnetoresistive heads; they work depending on how the magnetic field on the surface of the disk changes. Data is transferred to a computer as a result of receiving an analog signal that turns into digital form.

On disks, information is located in tracks located around a circle. To work with data stored on media, magnetic heads move along tracks. The heads are moved using a special solenoid drive. Such heads can access any location on the disk due to their high rotation speed. The heads are located on both sides of the disks, so each of them carries out work on one side and is fully responsible for it.

A sector on a hard drive allows you to store 512 bytes of information, and each track on a hard drive consists of many sectors. The maximum amount of information that can be stored on a hard drive depends on the number of sectors, heads and cylinders. HDDs may have the same number of disks, but their memory capacities will be completely different. This is due to the fact that to increase capacity, it is more convenient to increase the density of sectors on each of the disks than to increase their number, which will lead to a significant increase in the size of the media. The development of computer technology leads to the fact that each PC component becomes smaller in external dimensions, and, on the contrary, the capabilities increase.

There are such concepts as physical and logical disk placement. Physical is how the storage medium is structured inside, and logical is how the computer sees it. In reality, the physical and the logical are completely different. If physically, for example, 3 disks can be installed inside a hard drive, then logically there can be any number of them and of any size; one logical disk can be the size of two or more physical ones and vice versa.

During the production of hard drives, it is almost impossible to avoid damage to sectors or tracks, but they are not used and are not taken into account by the media due to markings.

There are hard drives designed for use in home PCs, and others for use in servers. The latter are subject to much greater requirements, because they work with a significant load and must provide high productivity and speed.

Characteristics of hard drives

In order to choose the right hard drive suitable for a specific purpose, you need to understand a large number of characteristics. The first thing you should pay attention to is the form factor. On desktop PCs, 3.5-inch hard drives are installed, and on laptops, 2.5-inch ones. There are also other less common form factors. The second important parameter is the interface through which the device is connected to the computer. PCs use various variations of the SATA interface.

One of the important parameters is capacity, which determines the amount of data stored on the device. The rotation speed of the shaft on which the disks are located affects the speed of working with information.

When choosing a hard drive, you should pay attention to the buffer size, which directly affects the speed of the device’s processing of information.

Each hard drive makes noise during operation, like any other mechanical device. During operation, noise can cause significant inconvenience, so you need to pay attention to its level when choosing a suitable model for your PC.

If you plan to frequently move the device from one computer to another, then such a parameter as shock resistance is important. The higher it is, the less likely it is to lose information during an impact or damage the hard drive.

While working with information, the disk provides the requested information at a certain speed. This indicator is called “Random Access Time” and the lower it is, the faster the request will be transmitted.

Having an understanding of all the parameters, characteristics and design of modern hard drives, you can quickly select the appropriate hard drive to perform your tasks on your PC.

This article will only talk about hard drives (HDD), that is, magnetic disk media. The next article will be about SSDs.

What is a hard drive

By tradition, let's look at the definition of a hard drive on Wikipedia:
A hard drive (screw, hard drive, hard disk drive, HDD, HDD, HMDD) is a random access storage device based on the principle of magnetic recording.
They are used in the vast majority of computers, and also as separately connected devices for storing backup copies of data, as file storage, etc.
Let's figure it out a little. I like the term "hard disk drive". These five words convey the essence. HDD is a device whose purpose is to store data recorded on it for a long time. The basis of HDDs are hard (aluminum) disks with a special coating, onto which information is recorded using special heads.
I will not consider the recording process itself in detail - essentially this is the physics of the last grades of school, and I’m sure you have no desire to delve into this, and that’s not what the article is about at all.
Let’s also pay attention to the phrase: “random access” which, roughly speaking, means that we (the computer) can read information from any section of the railway at any time.
An important fact is that the HDD memory is not volatile, that is, no matter whether the power is connected or not, the information recorded on the device will not disappear anywhere. This is an important difference between the computer's permanent memory and temporary memory (RAM).
Looking at a computer hard drive in real life, you will not see either disks or heads, since all this is hidden in a sealed case (hermetic zone). Externally, the hard drive looks like this.
I think you understand what HDD is. Go ahead.

Why does a computer need a hard drive?

Let's look at what a HDD is in a computer, that is, what role it plays in a PC. It is clear that it stores data, but how and what. Here we highlight the following functions of the HDD:
- Storage of OS, user software and their settings;
- Storage of user files: music, videos, images, documents, etc.;
- Using part of the hard drive capacity to store data that does not fit in RAM (swap file) or storing the contents of RAM while using sleep mode;
- As you can see, a computer’s hard drive is not just a dump of photos, music and videos. The entire operating system is stored on it, and in addition, the hard drive helps cope with the load on the RAM, taking on some of its functions.

What does a hard drive consist of?

We partially mentioned the components of a hard drive, now we will look at this in more detail. So, the main components of the HDD:
- Case - protects the hard drive mechanisms from dust and moisture. As a rule, it is sealed so that moisture and dust do not get inside;
- Disks (pancakes) - plates made of a certain metal alloy, coated on both sides, on which data is recorded. The number of plates can be different - from one (in budget options) to several;
- Engine - on the spindle of which the pancakes are fixed;
- Head block - a structure of interconnected levers (rocker arms) and heads. The part of the hard drive that reads and writes information to it. For one pancake, a pair of heads is used, since both the upper and lower parts are working;
- Positioning device (actuator) - a mechanism that actuates the head block. Consists of a pair of permanent neodymium magnets and a coil located at the end of the head block;
- Controller - an electronic chip that controls the operation of the HDD;
- Parking area - a place inside the hard drive next to the disks or on their inner part, where the heads are lowered (parked) during idle time, so as not to damage the working surface of the pancakes.
This is a simple hard drive device. It was formed many years ago, and no fundamental changes have been made to it for a long time. And we move on.

How does a hard drive work?

After power is supplied to the HDD, the motor, on the spindle of which the pancakes are attached, begins to spin up. Having reached the speed at which a constant flow of air is formed at the surface of the disks, the heads begin to move.
This sequence (first the disks spin up, and then the heads start working) is necessary so that, due to the resulting air flow, the heads float above the plates. Yes, they never touch the surface of the disks, otherwise the latter would be instantly damaged. However, the distance from the surface of the magnetic plates to the heads is so small (~10 nm) that you cannot see it with the naked eye.
After startup, first of all, service information about the state of the hard disk and other necessary information about it, located on the so-called zero track, is read. Only then does work with the data begin.
Information on a computer's hard drive is recorded on tracks, which, in turn, are divided into sectors (like a pizza cut into pieces). To write files, several sectors are combined into a cluster, which is the smallest place where a file can be written.
In addition to this “horizontal” disk partition, there is also a conventional “vertical” partition. Since all the heads are combined, they are always positioned above the same track number, each above its own disk. Thus, during HDD operation, the heads seem to draw a cylinder.
While the HDD is running, it essentially performs two commands: read and write. When it is necessary to execute a write command, the area on the disk where it will be performed is calculated, then the heads are positioned and, in fact, the command is executed. The result is then checked. In addition to writing data directly to the disk, the information also ends up in its cache.
If the controller receives a read command, it first checks whether the required information is in the cache. If it is not there, the coordinates for positioning the heads are calculated again, then the heads are positioned and the data is read.
After completion of work, when the power to the hard drive disappears, the heads are automatically parked in the parking zone.
This is basically how a computer hard drive works. In reality, everything is much more complicated, but the average user most likely does not need such details, so let’s finish this section and move on.

Types of hard drives and their manufacturers

Today, there are actually three main hard drive manufacturers on the market: Western Digital (WD), Toshiba, Seagate. They fully cover the demand for devices of all types and requirements. The remaining companies either went bankrupt, were absorbed by one of the main three, or were repurposed.
If we talk about the types of HDD, they can be divided as follows:

1. For laptops, the main parameter is the device size of 2.5 inches. This allows them to be compactly placed in the laptop case;
2. For a PC - in this case it is also possible to use 2.5″ hard drives, but as a rule, 3.5″ are used;
3. External hard drives - devices that are separately connected to a PC/laptop, most often serving as file storage.
There is also a special type of hard drive - for servers. They are identical to regular PC ones, but may differ in connection interfaces and greater performance.

All other divisions of HDD into types come from their characteristics, so let’s consider them.

Hard drive specifications

So, the main characteristics of a computer hard drive:

Volume is an indicator of the maximum possible amount of data that can be stored on a disk. The first thing they usually look at when choosing a HDD. This figure can reach 10 TB, although for a home PC they often choose 500 GB - 1 TB;
- Form factor - the size of the hard disk. The most common are 3.5 and 2.5 inches. As mentioned above, 2.5″ in most cases are installed in laptops. They are also used in external HDDs. 3.5″ is installed in PCs and servers. The form factor also affects the volume, since a larger disk can fit more data;
- Spindle rotation speed - at what speed the pancakes rotate. The most common are 4200, 5400, 7200 and 10000 rpm. This characteristic directly affects the performance, as well as the price of the device. The higher the speed, the greater both values;
- Interface - method (connector type) of connecting the HDD to the computer. The most popular interface for internal hard drives today is SATA (older computers used IDE). External hard drives are usually connected via USB or FireWire. In addition to those listed, there are also such interfaces as SCSI, SAS;
- Buffer volume (cache memory) - a type of fast memory (RAM type) installed on the hard drive controller, designed for temporary storage of data that is most often accessed. The buffer size can be 16, 32 or 64 MB;
- Random access time - the time during which the HDD is guaranteed to write or read from any part of the disk. Ranges from 3 to 15 ms;

In addition to the above characteristics, you can also find such indicators as:

Data transfer rate;
- Number of I/O operations per second;
- Noise level;
- Reliability;
- Impact resistance, etc.;
That's all about HDD characteristics.

What is HDD, hard drive and hard drive - these words are different widely used terms for the same device that is part of the computer. Due to the need to store information on a computer, information storage devices such as a hard drive appeared and became an integral part of a personal computer.

Previously, on the first computers, information was stored on punched tapes - this is cardboard paper with holes punched in it; the next step in the development of a computer was magnetic recording, the principle of operation of which is preserved in today's hard drives. Unlike today's terabyte HDDs, the information to be stored on them numbered tens of kilobytes, which is insignificant compared to today's information.

Why do you need a HDD and its functionality?

HDD is a computer's permanent storage device, that is, its main function is long-term data storage. HDD, unlike RAM, is not considered volatile memory, that is, after turning off the power from the computer, and then, as a result, from the hard drive, all information previously stored on this drive will certainly be preserved. It turns out that the hard drive serves as the best place on the computer for storing personal information: files, photographs, documents and videos will obviously be stored on it for a long time, and the stored information can be used in the future for your needs.

ATA/PATA (IDE)- this parallel interface serves not only to connect hard drives, but also disk reading devices - optical drives. Ultra ATA is the most advanced representative of the standard and has a possible data usage speed of up to 133 megabytes per second. This method of data transfer is considered very outdated and today is used in outdated computers; IDE connectors can no longer be found on modern motherboards.

SATA (Serial ATA)- is a serial interface, which has become a good replacement for the outdated PATA and, unlike it, it is possible to connect only one device, but on budget motherboards there are several connectors for connection. The standard is divided into revisions that have different data transfer/exchange rates:

  • SATA has a data transfer speed of up to 150 Mb/s. (1.2 Gbit/s);
  • SATA rev. 2.0 - in this revision, the data exchange speed in comparison with the first SATA interface has increased 2 times to 300 MB/s (2.4 Gbit/s);
  • SATA rev. 3.0 - data exchange for the revision has become even higher up to 6 Gbit/s (600 MB/s).

All of the above-described connection interfaces of the SATA family are interchangeable, but if you connect, for example, a hard drive with a SATA 2 interface to a SATA motherboard connector, data exchange with the hard drive will be based on the highest revision, in this case SATA revision 1.0.

Many of you know that all information on a computer, presented in the form of files and folders, is stored on the hard drive. And here, what is a hard drive and what it is intended for, not many will answer correctly. It is very difficult for people far from programming to imagine how information can be stored on some piece of hardware. This is not a box or a piece of paper on which this very information can be written down and hidden in the box. Yes, a hard drive is not a box with a letter.

A hard disk (HDD, HMDD - from the English hard (magnetic) disk drive) is a magnetic storage medium. In computer slang it is called a “Winchester”. It is designed to store information in the form of photographs, pictures, letters, books of various formats, music, films, etc. Externally, this device does not look like a disk at all. Rather, it looks like a small rectangular iron box.

The internals of a hard drive are similar to an old vinyl record player.

Inside this metal box there are round aluminum or glass disk plates located on the same axis, along which the reading head moves. Unlike a player, the hard disk head does not touch the surface of the platters during operation.

For ease of use, the hard drive is divided into several sections. This division is conditional. This is done using the operating system or special programs. The new partitions are called logical disks. They are assigned the letters C, D, E or F. Usually installed on the C drive, and files and folders are stored on other drives so that if the system crashes, your files and folders are not damaged.

Watch a video about what a hard drive is:

Basic characteristics of hard drives

  • Form factor is the width of the hard drive in inches. The standard size for a desktop computer is 3.5 inches, and for laptops it is 2.5 inches;
  • Interface– modern computers use different versions of SATA connections to the motherboard. SATA, SATA II, SATA III. Older computers use the IDE interface.
  • Capacity– this is the maximum amount of information that a hard drive can store, measured in gigabytes;
  • Spindle speed is the number of spindle revolutions per minute. The higher the disk rotation speed, the better. For operating systems, you need to install disks of 7,200 rpm and higher, and for storing files you can install disks with lower speeds.
  • MTBF– this is the average time between failures calculated by the manufacturer. The larger it is, the better;
  • Random access time is the average time required for the head to position itself on an arbitrary section of the wafer. The value is not constant.
  • Impact resistance is the ability of a hard drive to withstand pressure changes and shocks.
  • Noise level, which the disk emits during operation is measured in decibels. The smaller it is, the better.

Now there are already SSD drives (solid-state drive in simple translation - solid-state drive), which have neither a spindle nor platters. It is a storage device based on memory chips.

SSD drives are completely silent and have very good read and write speeds. But they are still very expensive and not very reliable, so they are installed only for operating systems, and IDE and SATA hard drives are used to store files.