Lsblk to View Block devices and lsblk to view

Source: Internet
Author: User

Lsblk to View Block devices and lsblk to view

Lsblk allows you to view disk partitions and attaching information.


All lsblk Parameters

-A, -- all: Display all devices
-B, -- bytes: display the device size in bytes Mode
-D, -- nodeps does not display slaves or holders
-D, -- discard print discard capabilities
-E, -- exclude <list> exclude devices (default: RAM disks)
-F, -- fs: display file system information
-H, -- help: displays help information
-I, -- ascii use ascii characters only
-M, -- perms displays permission information
-L, -- list is displayed in the list format.
-N, -- noheadings does not display the title
-O, -- output <list> output Column
-P, -- pairs are displayed in key = "value" Format
-R, -- raw is displayed in the original format.
-T, -- topology: Display topology information

Lsblk allows you to view the current partition and mounting status of a disk.


What are the differences between Block devices and character devices?

/Dev/dsk corresponds to a block device, which is used for file system operations, such as mount. /Dev/rdsk corresponds to the character device (bare device, rdsk r is raw), fsck
Newfs and so on will be involved. Generally, our operating systems and various software read and write hard disks in block mode. The block here is a logical block. You can choose to create a file system, which is called a cluster in windows. See newfs or.
Manual of mkfs. Oracle is a common character-based hard disk read/write method.

The character device or block device definition belongs to the device access layer of the operating system, which is not necessarily related to the characteristics of the actual physical device. The driver is under the device access layer, so you only need to provide the driver. That is to say, if the driver supports the stream method, you can access it in this way. If the driver also supports the block method, you can access it in any way, for example, a hard-disk bare device, both of which support block
Device): It is a random access device with a certain structure. The read and write operations on such devices are performed by block. It uses a buffer to store temporary data, write Data from the cache to the device or read data from the device to the buffer, such as a Character device (Character) such as a disk or file system.
Device): This is an ordered data stream device. The read/write operations on such devices are performed by character, and these characters form a continuous data stream. It does not have a buffer, so the read and write operations on such devices are real-time, such as terminals and tape drives.

Lsblk content

MAJ: major master device number

MIN: minor sub-device number

The two digital positioning block devices: the content in the/dev/block can be viewed.

RM: removable detachable
RO: read-only

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.