Disk and File System Management (III)

Source: Internet
Author: User

A. Swap partition

1.free command--View the current system's swap partition and physical memory usage

-M: Displayed in m (default in bytes)

Fdisk command, adjust the partition type to 82

To create a swap partition:

Mkswap/dev/sda2

-L LABEL

SWAPON/DEV/SDA2 switching on swap partition

-A: Enable all switching devices defined in the/etc/fstab file

SWAPOFF/DEV/SDA2 switching off swap partition

2. Loopback devices

Loopback, using software to simulate the implementation of hardware

DD command: Convert and copy a file the same as copy, DD can copy only part of the file data, copy the bits and copy of the duplicate is not the same

if= Data sources

of= Data storage target

Bs=1

count=2

seek=#: The size of skipped space when creating a data file

Usage: DD if= data source file of= Target storage directory bs= file size per copy count= copy several times

DD IF=/DEV/SDA of=/mnt/usb/mbr.backup bs=512 count=1 copy MBR table

Three./etc/fstab file system automatically mount file system after boot

1. There are 6 fields in the file

A. Devices to be mounted

B. Mount point

C. File system type

D. Mount Options

E. Dump frequency (make a full backup every few days)

F. File system detection order (only the root can be 1)

/dev/sda5/mnt/testext3defaults 0 0

Mount-a: Mount all file systems defined in the/etc/fstab file

2.fuser: Verifying that a file or socket file is in use by the process

-V: View running processes on a file

-K: Kill Process

-M: Specify mount point

FUSER-KM Mount_point: Terminates all processes that are accessing this mount point

This article is from "Luo Chen's blog" blog, please be sure to keep this source http://luochen2015.blog.51cto.com/9772274/1641889

Disk and File System Management (III)

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.