The system has the following disk space information, indicating a boot partition and an lvm:[Root @ gtlions mapper] # df-hFile System capacity in use available % mount point/Dev/mapper/vg_gtlions-lv_root2.2 T 19G 2.1 T 1%/Tmpfs 32G 0 32G 0%/dev/shm/Dev/sda1 485 M 59 M 401 M 13%/bootYou can use fdisk to view the disk. There are two disks: 16 GB sda and 2336GB sdb. Note that both/dev/sda and/dev/sdb display physical information, then/dev/mapper/vg_gtlions-lv_root and/dev/mapper/vg_gtlions-lv_swap
Disk mounting in Linux and disk mounting in Linux
The company's hard disk is not enough. A new storage needs to be mounted to the current system. I won't talk about the previous steps. O M is all done. It is nothing more than a set of hardware and networks. Here I will only talk about how to mount it in Linux after it is assigned to me.
The procedure is as follows:
1. Check whether the resource has been allocated.
[Root @ localhost home] # fdisk-l Disk/dev/sda: 64.4 GB, 64424509440 bytes, 12582
smaller than the number below. (This rule is to be observed, in addition to note that this is a mirror symmetry, for the sake of convenience, I will directly take the upper left corner as an example, the following rule description is the same)Rule 2) All squares in the first column have numbers. (This rule may not always be maintained.) In the course of the game, it is possible to be destroyed, but to restore this rule as soon as possible)such as Shape 1 and shape 2. Where shape 1 is satisfied
hard disk (in fact, the compatibility with the hard disk is indeed considered at the beginning of the design of the nand flash memory), its performance is also similar to the hard disk: the operation of small data blocks is very slow, the speed of big data blocks is very fast. This difference is far greater than that of other storage media. This performance feature deserves our attention.
Technical Features of nand flash memory
The basic storage unit of memory and nor flash memory is bit. Users
To create an extended partition:[Email protected] init.d]# Fdisk/dev/sdbWarning:dos-compatible mode is deprecated. It ' s stronglyrecommended toSwitch off the mode (command ' C ') and change display units toSectors (Command ' u ').Command (M for help):Command (M for help): Pdisk/dev/sdb:5368 MB, 5368709120 bytes255 heads, Sectors/track, 652 cylindersUnits = Cylinders of 16065 * 8225280 bytesSector size (logical/physical): bytes/512 bytesI/O size (mini
Liunx Adding a new hard drive is actually the same as windows, but one is graphical and the other is command-line action, but the steps are the same, and the following is a hands-on demonstration and explanationLinux mount new Hard drive 1, view hard disk information
Command: Fdisk-l
[[emailprotected] ~]# fdisk -lDisk /dev/vda: 21.5 GB, 21474836480 bytes #第一块硬盘的信息和分区信息255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 *
so on.
Listing 1. Memory sample (test1.c)
# Include
# Include
# Include "memwatch. h"
Int main (void)
{
Char * ptr1;
Char * ptr2;
Ptr1. = malloc (512 );
Ptr2 = malloc (512 );
Ptr2 = ptr1;
Free (ptr2 );
Free (ptr1 );
}
The code in Listing 1 allocates two 512-byte memory blocks, and the pointer to the first memory
. Update-AzureDisk-DiskName "vfldev-vfldev-0-201503091934500547"-Label "ResiZedOS"-ResizedSizeInGB 100 # Replace the DiskName with the name of the OSdisk obtained in step 1 and enter the disk size you want to resize.
Start the VM through the Azure portal.
Log on to the virtual machine and switch to the root user to view the root file system capacity of the current virtual machine.[root@resizeSDA chpaadmin]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda1 30G 1.1G 27G
. It is my hobby and my job, because I have been a system and network administrator for many years while studying computer science. I had to sort out software every week, so I established a hierarchical directory structure to store various software packages:
Code:
Drwxrwxr-x 2 netsw users 512 Aug 3 Audio/Drwxrwxr-x 2 netsw users 512 Jul 9 Benchmark/Drwxrwxr-x 12 netsw users
1. view the new disk [root @ brief top61desktop] fdisk-culdevsdcDiskde I. view the new disk
[Root @ mongotop61 Desktop] # fdisk-cul/dev/sdc
Disk/dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/
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.