Linux formatted hard drive __linux

Source: Internet
Author: User

A formatted hard disk is the file system that initializes the hard disk. The file is stored on the hard disk and the smallest storage unit of the hard disk is called a "sector" (sector). Each sector stores 512 bytes (equivalent to 0.5KB).
Common file systems on Linux ext2 ext3 ext4. 1 Inode

Each file corresponds to an inode, the file attribute information is stored in the Inode, and the file itself is stored in the block. The file system is divided into the Inode area and block area, the number of inode can limit the number of files created, and the size of a single inode limits the maximum value of a single file.
The Ext file system is a file system that stores data using the Inode form. 2 partition, format, Mount

Basically, the steps to add new disks to a Linux system are 3, partitioning, formatting, and mounting
fdisk can view hard disk, hard disk partition information, partitioning fdisk-l

First you need to look at the disks available on the current operating system and use Fdisk-l to view all of the attached devices.
It is only possible to partition a specified physical disk on a Linux system if the partition is the wrong disk. The FDISK-L directive can view all available disks, with their details and partition information (if the disk is not partitioned, then there is no partition list information behind the disk information).
In addition, the Linux system in the allocation of device names to the hard disk has a certain standard format, such as IDE hard disk,/dev/hda,/dev/hdb ... The last ABCD ... is based on the discovery order of the hard disk. such as SATA/SCSI hard drive, is to/DEV/SDA,/dev/sdb ... Named. fdisk/dev/xxx

After you find the disk you want to manipulate by using the fdisk-l above, use the Fdisk operation to specify the disk.
The operation of Fdisk is relatively simple, many instructions have a display description.
Here you need to pay attention to the concepts of primary, logical, and extended partitions, just like Windows installed. Disk partitions are divided into: primary (primary partition), extended (extended partition), Logical (logical partition). The primary partition plus the number of extended partitions is less than or equal to 4, and the extended partition has at most one. An extended partition cannot write data directly in it, and a new logical partition within an extended partition can read and write data. “
Capacity of hard disk = Primary partition + Extended partition
Expand the partition capacity = each logical partition and partition

Mkfs-t Fstype/dev/part Mount Mount

Mount View all disk partitions that have been mounted
Mount/dev/part Mydir Mount/dev/part to the directory Mydir /etc/fstab start automatic mount

/etc/fatab records to start automatically mounted files, if our hard drive needs to start automatic mount, you need to modify this file.

Related Article

Contact Us

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.

Tags Index: