Getting started with Linux disk management
Let's look at how disks are partitioned in Linux.Disk Partition:Fdisk: a common tool for operating disk partition tables in Linux:Common Format: fdisk-l lists the disk devices used
[Root @ linux ~] # Fdisk-lDisk/dev/sda: 214.7 GB, 214748364800 bytes, 419430400 sectorsUnits = sectors of 1*512 = 512 bytesSector size (logical/physical):
required ), the extended partition table is placed on a primary partition with the System ID 0x05. The primary partition is an extended partition. The extended partition can be divided into several partitions, each of which is a logical partition.
MBR, extended partitions, and logical partitions
One is the information area for storing the hard disk, which is called the master boot recorder (MBR) and the other is the place where the actual file data is stored. MBR is the most important area of t
disk Label T change a partition ' s system ID u change display/entry units v Verify the partition table W write t Able to disk and exit X extra functionality (experts only) The parameters used in the above parameters are described:Second, hard disk detailed partition and mount process complete demonstration# view partition information first [[emailprotected] hk]# fdisk-ldisk/dev/sda:42.9 GB, 42949672960 bytes, 83886080 sectorsunits = sectors O F 1 * bytessector size (logical/physical): bytes/
First, FAT12
FAT12 is the file system that started using the DOS era, and is still used on floppy disks, and the FAT12 floppy disk is formatted with two heads, 80 cylinders per head (track), 18 sectors per cylinder, and 512 byte space per sector. So the total space for the standard floppy disk is:
2 * *18 * 512=1474560b=1440k=1.44m
The following is a diagram of the FAT12 structure:
1. Boot Sector
The secret
represents a group of 512 bytes. Therefore, Sector 1 represents the first 512 bytes of a disk.
Fan Surface
A "fan" (or a fan) represents one side of the disk. Fan 0 indicates the front side and FAN 1 indicates the back side. Most disks have only one side, so there is only one fan ("fan 0 ").
Track
To understand the track, let's look at the following figure:
In this figure, the disk can represent a hard di
Scenario Description: My host is Windows 7, virtual machine is wmware, which is installed in the linux-ubuntu10.04 version.
The disk partition of the virtual machine is not enough and you want to resize it.
1) First, go to Linux in the VM and run sudo fdisk-L to list the disks.
Disk/Dev/SDA:10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track,1305Cylinders # It can be seen that the SDA hard disk has 10 GB and 1306 channels, and 1 ~ 653 and 654 ~ 1306 unused# If you have multiple hard disks, S
= cylinders of 16065*512 = 8225280 bytesSector size (logical/physical): 512 bytes/512 bytesI/O size (minimum/optimal): 512 bytes/512 bytesDisk identifier: 0x68a3c8c6
Device boot start end blocks ID system
Command (M for help): H # Help H: Unknown commandCommand actionA t
Automatically mount partitions when Ubuntu is started.
First, check the system disk code:
Fdisk-lDisk/dev/sda: 120.0 GB, 120034123776 bytes255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectorsUnits = sector of 1*512 = 512 bytesSector size (logical/physical): 512 bytes/512 bytesI/O size (minimum/optimal
Refer to the blog post: http://www.cnblogs.com/sixiweb/p/3360008.htmledit settings, modify the hard disk size, root@localhost.pdf] # Fdisk-l # View disk partitions
Reference Blog: http://www.cnblogs.com/sixiweb/p/3360008.html
Edit Settings and modify hard disk size
[Root @ localhost ~] # Fdisk-l # View Disk partitions Disk/dev/sda: 59.1 GB, 59055800320 bytes # existing Disk capacity: 255 heads, 63 sectors/track, 7179 cylindersUnits = cylinders of 16065*
;First we add a few hard drives to do the Btree file system:[[emailprotected]~]#fdisk-l disk /dev/sda:21.5GB,21474836480 bytes, 41943040 sector units= Sector of1*512=512bytes sector size (logical/Physical): 512 bytes /512 bytes i/o size (min/Best):512 bytes /512 BYTE disk l
the extended partition. the format file system is mkfs. ext4 is automatically mounted to the directory/backup31 at startup. use the fdisk Command tool to operate the disk/dev/sdb fdisk/dev/sdb2 to create a primary partition Command (m Help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 Using default value 1 Last cylinder, + cylinders or + size {K, M, G} (1-130, default 130): + 400 M Command (m for help): p Disk/dev/sdb: 1073 MB, 1073741824 bytes 255 heads, 6
C is always at the top of all disk partitions.The MBR (primary Boot Record) Partition Table (primary Partition Table) can only store four partitions. To divide more partitions, an extended partition table (EBR) is required ), the extended partition table is placed on a primary partition with the System ID 0x05. The primary partition is an extended partition. The extended partition can be divided into several partitions, each of which is a logical partition.
MBR, extended partitions, and l
detecting and identifying memory problems.MEMWATCHMEMWATCH, written by Johan Lindh, is an open-source C-language memory error detection tool. You can download it by yourself. See references later in this article ). After adding a header file in the Code and defining MEMWATCH in the gcc statement, you can track memory leaks and errors in the program. MEMWATCH supports ansi c. It provides results log records, detects double-free release), releases erroneous free by mistake, unfreed memory not rel
analyze the problem from the user's perspective and refer to the success stories to find a feasible solution.View instances The code is as follows:Copy code If (object_id (N 'syspr _ tablepaginationsearch', N 'P') is not null)Drop procedure dbo. syspr_TablePaginationSearchGoCreate procedure syspr_TablePaginationSearch(@ SelectField nvarchar (512) = '*' -- Select statement Field. Do not enter "select" when cal
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.