Linux storage device Representation Method-general Linux technology-Linux technology and application information. The following is a detailed description. IDE interface hard disk, Two Representation Methods for the entire hard disk
One is that the entire hard disk in the IDE interface is expressed as/dev/hd [a-z] in Linux.
Another representation method is hd [0-n], where n is a positive integer, such as hd0, hd1, hd2 ...... hdn
If there is only one hard disk in the machine, whether/dev/hda or/dev/hdb are listed through fdisk-l, hd0 is used;
If there are two or more hard disks in the machine, the first hard disk/dev/hda is represented as hd0, the second Hard Disk/dev/hdb, and the other is hd1.
The hard disk partition can also be expressed in two ways.
The first hard disk partition representation method/dev/hd [a-z] X
One is/dev/hd [a-z] X, which indicates a, B, c ...... z and X are positive integers starting from 1. For example,/dev/hda1,/dev/hda2 .... /dev/hda6,/dev/hda7 ...... it is worth noting that/dev/hd [a-z] X. If the value of X is between 1 and 4, it indicates the primary partition of the hard disk (including the extended partition ); logical partitions start from 5. For example,/dev/hda5 must be logical partitions;
The second representation of Hard Disk partitioning (hd [0-n], y)
The value of y is the X-1 in/dev/hd [a-z] X;
/Dev/hda1 equals (hd0, 0)
/Dev/hda2 equals (hd0, 1)
/Dev/hda5 equals (hd0, 4)
/Dev/hda6 equals (hd0, 5)
/Dev/hda7 equivalent (hd0, 6)
/Dev/hda8 equals (hd0, 7)
......
/Dev/hda10 (hd0, 9)
If there is only one hard disk on the machine, no matter whether it is in Linux Through/dev/hda or/dev/hdb, hd0 is represented by hd [0-N; therefore, if the hard disk is listed;
/Dev/hdb1 equals (hd0, 0)
/Dev/hdb2 equivalent (hd0, 1) Note: As you can see, this is an extended partition, which cannot be mounted in Linux or Windows;
/Dev/hdb5 equivalent (hd0, 4)
/Dev/hdb6 equals (hd0, 5)
/Dev/hdb7 equivalent (hd0, 6)
/Dev/hdb8 equivalent (hd0, 7)
......
/Dev/hdb10 equivalent (hd0, 9)
Note: if there are two hard disks on the machine, the other representation of/dev/hda is hd0, and another representation of/dev/hdb is hd1; in this way, we can understand (hd [0-N], y). In this way, machines only have one or more hard disks, and we all know how to write them;
Two methods to express SATA and SCSI hard disks
The solution is the same as the hard disk of the IDE interface, except that hd is replaced with sd;
For example, if one hard disk is/dev/hda or another hard disk is/dev/sda, the hard disk of/dev/sda should be sd0; the Representation Method (sd [0-n], y) for each partition is the same as the algorithm in the IDE interface. For example,/dev/sda1 is (sd0, 0 );
Usb and 1394 Interface storage devices and drive devices;
Usb storage devices are also currently in the kernel in two driving methods, one is to simulate the SCSI hard disk, through fdisk-l is/dev/sd [0-N]; to simulate a SCSI device. Another representation of the usb storage device in Linux is the same as that of the SCSI and SATA mentioned above;
However, in the latest kernel version, we want to discard the simulated SCSI. The/dev/uba is similar when we use the storage settings of the fdisk column system. However, this driver is not mature at present, for example, the performance of large data volumes is unstable; in fact, the performance of USB interface storage devices in Linux is still relatively poor;
1394 Interface storage for backup and Simulation of SCSI in Linux. After fdisk-l is passed,/dev/sd [0-n] appears. for more information about the other representation method (sd [a-z], y), see the previous description. The storage devices with the 1394 Interface have excellent performance in Linux, if the USB storage performance is relative to the storage performance of the 1394 Interface, it should not be worth mentioning. We recommend that you purchase the 1394 Interface storage device;
In Linux, the drive is a/dev/fd0 device. This is a general situation, and the other is fd0;
CDROM, DVDROM, and COMBO are usually/dev/hdc. See the following example, whether it is/dev/cdrom or/dev/dvd, finally, it points to/dev/hdc;
(Hd0, 2, a): used for FreeBSD. FreeBSD has a concept of slice, which further divides a partition into several slice, this indicates slice a in the third partition of the first hard disk. You can also use (hd0, a), so that GRUB will find the slice a in the first FreeBSD partition on the first hard disk.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.