- Disk 상태 확인

lsblk
fdisk -l

 

- Disk 생성

[test@localhost ~]# fdisk /dev/sdb1
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xa536c7c6.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-209713151, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209713151, default 209713151):
Using default value 209713151
Partition 1 of type Linux and of size 100 GiB is set
w

[test@localhost ~]# fdisk -l

 

- mount 

[test@localhost ~]mkfs.xfs /dev/sdb1
[test@localhost ~]mkdir /test
[test@localhost ~]mount /dev/sdb1 /test

 

- 부팅 후에도 자동 mount

[test@localhost ~]vi /etc/fstab
/dev/sdb1 /test xfs defaults 0 0

+ Recent posts