Linux hard disk usage, mounts, SSD mounts (view volumes not seen by Df-h)

Source: Internet
Author: User
Tags disk usage

Resolve issues such as AWS mounting, resolving hangs, and disappearing

There is a difference between a disk on Linux and a window, which must be mounted on a directory, otherwise useless

The actions on the new hard disk, SSD, and Mount to Linux are as follows :

Df-h #显示目前在Linux系统上的文件系统的磁盘使用情况统计.

lsblk # list block device information (volumes that df-h cannot see)

Mount #挂载命令

Now we have a new hard drive, 450G without mount

1. View the space and use space of the hard disk mounted under Linux

Use the following command to format a volume that is attached, but df-h cannot see

Use command: df-h

Filesystem File System

Size File sizes

Used using space

Mounted on Mount Directory

Don't see the 450G disk, now we're going to mount

2. Check if no mounted hard drive is detected in the system

To view the system-detected hard disk commands:lsblk

See indeed NvmeOn1 without a mount, but there

3, Mount (Mount the load , to configure the Mount information under/etc/fstab or restart the mount will disappear)

Use the following command to format a volume that is attached, but df-h cannot see

sudo mkfs-t ext4/dev/nvmeon1  #备注  nvmeOn1 are present in/dev below

Create a directory to mount

Mkdir/data

Mount Command put space on/data mount the formatted volume to a directory

Mount/dev/nvmeon1/data

Check with Df-h again for normal

/dev/nvme0n1/data Auto Defaults,nofail,comment=cloudconfig 0 2

After you add it, you can try the Fstab file to see if it works correctly.

sudo mount-a test for Mount success (do not restart if wrong, otherwise GG)

Haha, see this and you're done.

Linux hard disk usage, mounts, SSD mounts (view volumes not seen by Df-h)

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.