How to modify disk parameters in Linux system

  
                

During the process of using a Linux system, changes to disk parameters are sometimes involved. These parameters include the name of the disk, the drive letter, and the disk log and other disk runtime parameters. So how should the Linux system disk parameters be modified?

In the following we all know Linux can represent a file with a respective means, such as /dev /sdb1 sdb represents the first disk partition grooves, corresponding to the designated device in place by major and minor Device

brw-rw—- 1 root disk 8, 0 May 12 20:16 /dev/sda

brw-rw—- 1 root disk 8, 1 May 12 19: 48 /dev/sda1

brw-rw—- 1 root disk 8, 10 May 12 19:48 /dev/sda10

brw-rw—- 1 root disk 8, 11 5 Month 12 19:48 /dev/sda11

brw-rw—- 1 root disk 8, 12 May 12 19:48 /dev/sda12

brw-rw—- 1 root disk 8, 13 May 12 19:48 /dev/sda13

brw-rw—- 1 root disk 8, 2 May 12 19:48 /dev/sda2

brw-rw— - 1 root disk 8, 3 May 12 19:48 /dev/sda3

brw-rw—- 1 root disk 8, 4 May 12 19:48 /dev/sda4

Brw-rw—- 1 root disk 8, 5 May 12 19:48 /dev/sda5

brw-rw—- 1 root disk 8, 6 May 12 19:48 /dev/sda6

brw-rw—- 1 root disk 8, 7 May 12 19:48 /dev/sda7

brw-rw—- 1 root disk 8, 8 May 12 19:48 /dev/sda8< Br>

brw-rw—- 1 root disk 8, 9 May 12 19:48 /dev/sda9

root@qeesung-laptop:/media# ll /dev/sdb*

brw-rw—- 1 root disk 8, 16 May 12 20:16 /dev/sdb

brw-rw—- 1 root disk 8, 17 May 12 20:25 /dev/Sdb1

brw-rw—- 1 root disk 8, 18 May 12 20:18 /dev/sdb2

The Linux kernel knows the corresponding device through the corresponding major and minor. Br>

device namemajorminor

/dev/sdb80-15

/dev/sdba816-31

mknod command

This command is mainly used To create a device file (make block or character special files)

mknod [OPTION]. . NAME TYPE [MAJOR MINOR]

The main types are:

- b block block device

- c char character device

- p pipe pipe Device

Example of use:

Creating a new pipe file

#mknod pipeFile p

#echo this is a test line 》 pipeFile

#cat pipeFile

--------------------------------------- -----------------------------------------

Create a new block File

#mknod blockFile b 8 100

------------------------------- -------------------------------------------------< Br>

Create a new character file

#mknod charFile c 4 100

There will be three files in the end

brw-r–r– 1 root root 8, 100 May 12 21:15 blockFile

crw-r–r– 1 root root 4, 100 May 12 21:16 charFile

prw-r–r– 1 root root 0 May 12 21:12 pipeFile

Copyright © Windows knowledge All Rights Reserved