Linux Disk Management (1)--Disk Mount

Source: Internet
Author: User

The standard computer system is 1024, but the hard disk storage factory is 1000, and the memory is 1024. The units stored are in bytes.

1. View Linux hard disk partitions

To view the partition of the hard disk under Linux:

[Email protected] notepad]# fdisk-l

DISK/DEV/SDA: 16.1 GB, 16106127360 bytes
255 heads, Sectors/track, 1958 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal)
: bytes/512 bytes
Disk IDENTIFIER:0X000275B5

Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 204800 Linux


(1)/DEV/SDA1 is the partition name, generally in order for SDA,SDA1,SDB,SDB1,SDC and so on. Default hard disk is divided into main points

partition, the primary partition has a maximum of 4, and 4 ID numbers. If you are building a logical partition, the primary partition is up to 3, and the logical partition occupies a primary partition ID.

The asterisk is the default startup item, which represents the active partition, 1 for the cylinder, 26 for the end face, blocks for the block, and an ID of 16 for the partition type;

(2) Fdisk common operation

Fdisk-partition table manipulator for Linux

N--> Adding a new partition
P--> a table for printing partitions
d--> Deleting a partition table
W--> write to disk partition table
(3) format, Mount disk

After the computer joins the disk, it is recognized by the system/dev/sd*. We need to use this disk to partition the disk. partitions need to give disk a file format, common with FAT32, NTFS, EXT3, EXT4.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/83/04/wKiom1dov8TAv8soAACPIeCkB9s321.png-wh_500x0-wm_3 -wmp_4-s_3066570689.png "title=" Mkfs.ext4.png "alt=" Wkiom1dov8tav8soaacpieckb9s321.png-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/83/03/wKioL1dov_Oy_kcMAACVJ3pRmVc194.png-wh_500x0-wm_3 -wmp_4-s_3674167323.png "Title=" Mount succeeded. png "alt=" wkiol1dov_oy_kcmaacvj3prmvc194.png-wh_50 "/>

Df-h shows that the/DEV/SDB has been mounted successfully. But this mount mode is temporary, restart disk mount disappears, edit/etc/fstab

Add the last line in/etc/fstab, uuid=/sdb ext4 defaults 1 1, and then restart the machine.

[Email protected] notepad]# Vim/etc/fstab

You have new mail in/var/spool/mail/root

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/83/04/wKiom1doyb2iFq6RAAEJOC6d9p4133.png-wh_500x0-wm_3 -wmp_4-s_2644272314.png "title=" Fstab.png "alt=" Wkiom1doyb2ifq6raaejoc6d9p4133.png-wh_50 "/>

(4) Verify Touch 123.txt

[Email protected] desktop]# Cd/sdb

[[email protected] sdb]# ls

Lost+found

[[email protected] sdb]# Touch 123.txt

[[email protected] sdb]# ls

123.txt Lost+found

[Email protected] sdb]#


This article is from the "unrestrained" blog, please be sure to keep this source http://keep11.blog.51cto.com/1443840/1791347

Linux Disk Management (1)--Disk Mount

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.