Linux disk partition is mounted

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/bbvjx1314/article/details/102618501

Goal: to be able to mount a new hard disk on a linux system (boot automatically mounted) from  directly start operation

  view the current system disk mounted  case:  lsblk -f (teachers do not leave)

  • sda: the current system has one physical disk sda
  • sda1: a first physical hard disk first partition

  • ext4: The format of this partition (linux commonly used formats

  • 7cc94e03-8b1a-4845-97fb-49a2c39afd8c: indicates that uniquely identifies the partition (unique ID)

  • / Boot: indicates that the partition hung directory

  • [SWAP]: Swap 

    Swap: When there are large amounts of data need to write memory, but the memory is insufficient, the remaining data is written to a swap partition

    Description swap partitions: big data cluster will close out the swap partition before installing the cluster.

 Ⓑ   [root @ node01 ~] #    fdisk the -l     view information

Ⓒ   virtual machine add a new hard disk

  • In the vm virtual machine, right - "Set -" hard disk - "add -" Next. . . .
  • Linux system reboot
  • Re-view the disk mount case
  • [root@node01 ~]#  fdisk -l

 ⓓ   对磁盘进行分区 格式化

 分区 : [root@node01 ~]#    fdisk /dev/sdb

对新分区进行  格式化

[root@node01 ~]#  mkfs -t ext4 /dev/sdb1

ⓔ   1 磁盘 永久挂载

2   cat /etc/fstab  查看 uuid    (补充 查看uuid 的另一种 方法)  ll /dev/disk/by-uuid/

     vi  /etc/fstab   编辑 文档

3 重新 挂载  :  mount -a

 ⓕ   reboot      

Guess you like

Origin blog.csdn.net/bbvjx1314/article/details/102618501