centos7 add new disk


[root@localhost ~]# mount /dev/sdb /image
mount: /dev/sdb is write-protected, mounting read-only
mount: unknown filesystem type ‘(null)’

GOGOGO~

[root@localhost ~]# fdisk -l

[root@localhost ~]# mkfs.ext4 /dev/sdb

Proceed anyway? (y,n) y

[root@localhost ~]# mount /dev/sdb /image

Set the default mount at startup
[root@localhost ~]# blkid /dev/sdb
/dev/sdb: UUID="b8c4a45f-ed74-3089-fcdb-0273de904d6d" TYPE="ext4"

[root@localhost ~]# vim /etc/fstab

#LAST ADD
UUID=b8c4a45f-ed74-3089-fcdb-0273de904d6d /image ext4 defaults 1 2

:wq

Or

mount /dev/sdc1 /data

Set the default mount at startup

  1. vi /etc/fstab
  2. add
  3. /dev/sdc1/data xfs defaults 00
Categories:

Leave a Reply

Your email address will not be published. Required fields are marked *