banner
破影岚歌

破影岚歌的博客

bilibili
twitter
github

6. Memory Management in CentOS 7

Storage Management in CentOS7#

External Storage#

  1. Mobile storage devices: CD, USB flash drive
  2. Fixed storage devices: Hard drive

Using CD: Install CD (Prepare CentOS7 installation CD)#

Experimental Steps (Core Idea: Mounting)#

  1. Insert the ISO image into the virtual machine's optical drive
  2. Create a mounting directory (It is recommended to create the mounting directory under the media directory or mnt directory)
  3. Mount the CD to the specified mounting directory: mount device name usually under /dev mounting directory
  4. Access the mounting directory to access the CD
  5. After use, you can unmount the CD:
umount device name
or
umount mounting directory

Using Hard Drive: Static Disk (Basic Disk)#

Knowledge Point: Understanding partition types

  1. Primary partition: Numbered 1-4
  2. Extended partition: Numbered 1-4
  3. Logical partition: Numbered greater than 5

Characteristics:

  1. Primary partition + Extended partition <= 4
  2. 0 or 1 Extended partition
  3. The space of the Extended partition cannot be used directly. If you want to use it, you need to create a logical partition on it
  4. The number of logical partitions is unlimited

For example:

  1. Partition (Partition file: /dev/sdb)
    Subcommands of fdisk: n create partition; p view partition, w save partition, q exit partition
  2. Create file system (fat32, ext4): mkfs.ext4
  3. Create mounting directories mnt/disk1; /mnt/disk2; /mnt/disk3
  4. Use mount command to mount the partition

To check the mounted devices, simply enter mount

mount is "temporary": when the host restarts, the system automatically unmounts the device

How to make the device permanently mounted? Solution: Modify the configuration file /etc/fstab

How to make the /etc/fstab file take effect
Method one, restart the system
Method two, execute mount -a

Format of /etc/fstab file

Device file Mount point File type Read-write mode (rw,ro) 0 0
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.