Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disk management
#1
Disk management.

Hello everyone. This is my second "guide" in this section. I'll try to do my best as I did with the last one. Today I will tempt to tell you as much as possible about managing your disks.

Let's begin.

Data gets stored on external save-devices such as Hard drives, Cds, Dvds, USB sticks. There are used several methods to do this, most of them are based on the optical and or magnetizable properties of the item.

Before you can store data on a hard drive the HDD has to be formated and partitioned and you have to place a file managing system on it. This mostly happens in 3 phases.
  • Low-level format.
  • Splitting the Hard drive up in partitions.
  • High-level format.

Low-level formatting

Formatting is the process with which the path for the sectors on the magnetic disk gets placed. Before a disk gets formatted, the magnetic surface of the disk is just a bunch of magnetized parts. When you format, the parts get placed into order.

The term is a bit confusing. Why? Well. In MS-DOS the word formatting gets used to explain the process with which the file management system gets created. If we need to separate these 2, the actual formatting will be called low-level formatting. The creation of the file management system will be called High-level formatting.

The low-level formatting divides the disk in cylinders also known as tracks and sectors.

Tracks can be seen as concentric circles. These tracks get divided on their turn as well, into separate sectors. The smallest unit which can be processed in one action by the read/write pin.

Each sector gets a unique number allowing the disk controller (the control organ of the Hard disk which allows the permissions to/on the disk.) to get information about how the pins have to take position. Hereby a sector gets reserved with information about how the hard drive is divided, together with a table containing references to bad sectors. The current types of Hard drives contain a more complex structure with which the outern tracks contain more sectors than the intern tracks. This is the main reason why the producer of the hard disks applies this process. He has a certain routine which is written specifically for the disk.

The bad spots on a hard drive, found whilst formatting, are called bad blocks or bad sectors. The current hard drives detect and block these automatically and try to repair it. The position of these gets contained in the table mentioned above.

Partitioning

The most HDD's are ready for partitioning instantly after the low-level formatting. The places on the disk can be pointed to a certain address, but it still misses a certain organization / indexationstructure (index) in which a table containing the location of all data gets stored.

Partitions

Each partition gets approached like it is a hard drive on its own and receives his/her own partition-table. There are several reasons to divide a disk into partitions

Important (If you would like to dual-boot : CHECK!
  • When disks with a high capaticity you can maintain the overview. When you have e.g. : A partition for your O/S, one for your programs, one for your data. This avoides trouble when you back-up your files or when you tempt to reformat your hard drive
  • When you use multiple OS's, each OS needs a separate partition. Different OS's tend to not be compatible.
  • The more efficient use of disk-space.
  • Partitions can be hidden, meaning that all the data on that partition gets hidden as well.

On a hard drive there can be maximum 4 partitions. 4 primary partitions or 3 primary partitions and one extended partition.

A primary partition can contain a OS and/or data. A primary partition is boot-able. When you chose to dual-boot both of the partitions which you will use have to be primary partitions.

An extended partition can be divided in multiple logical partitions, which can serve as a unique partition on their own. OS's can be booted from logical partitions as well (depending on your HDD)

A system can contain max 24 volumes or partitions. The reason is that the alphabet only contains 24 letters. Simple hu?

Note : You can only have one primary partition running at a time. You can request information about your partitions at the following location on your system :

Code:
All configuration parts -> System management -> computer management -> disk-management.

You can chose to activate a partition with FDisk, PartitionMagic or a similar program.

Master Boot Record

During the partitioning of the first disk (sector 1, track 0, pin 0) a MBR (Master Boot Record) gets created.

The most important parts of the MBR are the Initial Program Loader (IPL, 446 B) and a partition table (4 x 16 B).

The MBR contains a partition-table containing information about each partition on the disk.
  • Track, ping, sector/begin of the partition.
  • From which partition the system can boot.
  • Where the BIOS has to search for the OS.

The MBR is platform independent meaning that the OS still has to be chosen. The OS can change the IPL eventually.

The MBR is an important part of the disk. If the MBR gets damaged the disk can no longer be used. You can back-up your MBR by the use of some tools so that you can replace it if your MBR is damaged.

  • If the first sector of your hard disk is damages physically, the disk cannot be split up in partitions anymore.
  • The MBR isn't the same as the starting sector or the boot-record, created by the High-level formatting in each partition. The MBR doesn't contain any data about the OS. The MBR contains just enough information to let the BIOS acces some elemantary disk manipulations.


High-level formatting

High-level formatting takes care of the exchange of data between the HD and the OS.

A file system (file management system) gets created on the disk. This is the more common name for logical structures and software procedures which are getting used in order to give the system access to the data on the disk. The logical structures contain information about e.g. the place where the data-files are saved, the software procedures take care of the management : copy, past an the request of the files.

FAT - FAT32 - NTFS

[Image: file.png]

In Windows there are 3 file systems : NTFS, FAT32 and FAT(16).

Windows 7 formats the system-partition from "standard" to NTFS.

FAT(16) :
  • Originally designed for DOS.
  • The name of the file cannot be longer than 8 characters, devided by a (.) and the file extension.

FAT32 : This is an improved version of FAT, the file name can now contain 256 characters before the (.) file extension.
Some disadvantages when you compare to NTFS :
  • Writing errors cannot be repaired automatically
  • No station compression.
  • No disk-indexing to allow a quicker search.
  • No coding.
  • You can't adjust disk-quote.
  • No Active-X directory.
  • Maximum file size : 4GB.

Volume Bootsector (FAT - FAT32)

Every DOS-partition has an own bootsector. (There is only one MBR/HD) This Bootsector contains 2 important aspects.
  • The disk-parameterblock : A data table containing specifical information such as the size of the disk, the amount of sectors, the name.
  • The volume-bootcode : Depending on the OS. This is a code with which primary, activated partitions gets summoned by the MBR at start-up.

MFT (Master File Table) = NTFS.

When you format the HD to the filesystem NTFS a Master File Table gets created. This object-orientated relational database consists out of tables (rows and columns). For each folder or file a row gets created. In the columns the attributes abut the files/folders get maintained.

The writing of the database gets contained in meta datafiles. Because this are files as well, a row gets reserved for all of these in the MFT. The first 26 rows (+/- 16KB) get reserved for this files. NTFS v3x (For Windows 7 aka NTFS v7) uses just 15 of the 26 reserved rows.

Conclusion : The MFt contains information about itself. The meta datafiles can be recognized by the "$" at the beginning of the filename. Each file has at least one rowi n the MFT. Each row starts with a Standard header and ends on 0xFF.

I'm not giving any further explanation about FAT/FAT32 because nearly no one uses it anymore, and if you do ; NTFS is way better.

Clusters
A file which gets written to the disk doesn't always take the contiguous space. When the file is to big for the place which got assigned first; the file gets split into clusters which can be spread over the whole partition.

A cluster or FAB ( = File Allocation Block) is the minimal space used by a file on the disk. This is the minimal amount of sectors assigned to a file once it gets saved. If the file is bigger then it'll be placed somewhere else on the disk 1, 2, .. cluster(s) assigned, depending on the file size. In the ideal case these clusters will form unbroken chains or atleast be on the same track in order for the write/read pin has to make less movements to write away the file.

Table of Clusters :

Code:
Volume Size  Sectors  Clustersize
0 MB - 32MB    1  512 bytes
33 MB - 64 MB    2  1K
65 MB - 128 MB    4  2K
129 MB - 255 MB     8    4K
256 MB - 511 MB    16    8K
512 MB - 1023 MB     32  16K
1024 MB - 2047 MB    64  32K
2048 MB - 4095 MB  128  64K

Thanks for reading. I hope that you have learned something new.

Kind regards, Volenar.
Reply
#2
Can't argue, Great information mate!
Reply
#3
Another detailed and extremely HQ thread/tutorial by Volenar. I went through the whole thread and finally realized that it was so easy to understand. You have explained everything that needs to be explained.
I hate sex in the movies. Tried it once, the seat folded up, the drink spilled and that ice,
well it really chilled her mood.

[Image: 506243.png]
Reply
#4
Year this is really nice and HQ guide Volenar. You can follow it easy step by step and understand it. Keep on great work dude.
[Image: haloabtractc4d.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  RAID's & Disk Management Volenar 2 2,539 05-29-2011, 09:39 PM
Last Post: Lulz

Forum Jump:


Users browsing this thread: 1 Guest(s)