Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Disk and file system management

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

one。 Disk base

Hard disk (Hard Disk Drive, HDD) is one of the commonly used storage devices in computers.

1. The structure of hard disk

(1)。 Data structure:

Sectors: each track on the disk is equally divided into several arc segments, which are the sectors of the hard disk (the first sector of the hard disk is called the boot sector) with a capacity of 512 bytes

Track: when the disk rotates, if the head remains in one position, each head will draw a circular track on the surface of the disk. These circular tracks are called tracks.

Cylinder: in a group of disks, a cylinder consisting of faces of different plates but multiple tracks in the same radius circle.

(2)。 Physical structure

Disk: a hard disk has multiple disks, each with 2 sides

Magnetic head: one magnetic head per side

(3)。 Storage capacity

Hard disk storage capacity = number of heads * number of tracks (cylinders) * number of bytes per sector

two。 Interface of hard disk

ATA: full name Advanced Technology attachment, parallel data cable connects the motherboard and hard disk, the anti-interference is too poor, and the wiring takes up a large space, which is not conducive to the internal heat dissipation of the computer, and has been gradually replaced by SATA.

(2) .SATA: full name Serial ATA, strong anti-interference, support hot-swappable function, high speed, strong error correction ability

(3). SCSI: full name Small Computer System Interface (minicomputer system interface), data transmission CPU occupancy rate is low, fast speed, support hot plug and other functions.

(4) .SAS: the full name is Serial Attached SCSI, which is a new generation of SCSI technology, which is the same as SATA hard disk. It uses sequential technology to achieve higher transmission speed and can reach 6G/s.

two。 Disk partition representation

1.MBR

MBR is the master boot record (Master Boot Record), which is located in the first physical sector of the hard disk. The MBR contains the main boot program of the hard disk and the hard disk partition table. The partition table has four partition recording areas, each of which occupies 16 bytes.

two。 Representation of disk partitions

(1). / dev: device file

(2) .hd: interface

Type of interface:

IDE (represented by hd)

SCSI (represented by sd)

(3) .a: how many hard drives (indicated by a.b.c.d)

(4) .5: which partition

3. Disk partition structure

(1)。 There are only 4 primary partitions on the hard disk.

(2)。 The serial number of the primary partition is 1x 4

(3)。 Extended partition is logical partition.

(4)。 The serial number of a logical partition always starts at 5.

4. File system Typ

(1) .XFS file system

a. A partition that stores file and directory data

b. High performance journaling file system

File system used by default in c.Centos 7 system

(2) .swap file exchange system

Used to establish a swap partition for a Linux system

(3) other file system types supported by .Linux

FAT16,FAT32,NTFS,EXT4,JFS et al.

three。 Manage disks and partitions

1. Detect and confirm new hard drive-fdisk

Fdisk-l [disk device] or fdisk [disk device]

two。 Common instructions in interactive mode

(1) m help information

(2) .n: create a new partition

(3) .d delete partition

(4) .p displays a list of partitions

(5)。 T convert partition type

Type code: EXT4/XFS 83

SWAP 82

FAT b

(6) .w save and exit (different from Q exit do not save)

3. Create a file system (formatted)-mkfs

Mkfs-t file system type partition device or mkfs. Type partition device

Mkswap partition device mount point directory (format swap file system)

Cat / proc/menifo view system memory information

Swapon virtual memory device turns on virtual memory device

Swapoff virtual memory device shuts down virtual memory device

4. Mount file devices-mount (only one directory can be mounted on a device, processes are queued)

Mount [- t type] storage device mount point directory

Mount-0 loop ISO image file mount point directory

5. Uninstall the file device-umount (the current path cannot be in the mount point directory when uninstalling)

Umount storage device location or umount mount point directory

6. Set up automatic file system mount

Vim / etc/fstab

Mount-a (automatically reads fstab for mounting)

Add:! Vim directly edits the file last edited by vim

7. View disk usage-df

Df-h

Df-hT (shows the type of the corresponding file system)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report