内容目录
Execute fdisk -l
to find the required disk.
As you can see, this is a blank disk.
Start executing commands to create a partition on the blank disk.
fdisk /dev/sdc
First, enter n
.
Command action <- Select the type of partition to create
e extended <- Extended partition
p primary partition (1-4) <- Primary partition
Enter p
, then enter 1
, and press Enter for the remaining options.
Enter w
, to save and exit.
Format and set the disk filesystem:
mkfs.ext4 /dev/sdc1
Mount
mount /dev/sdc1 /data/
Check the disk mount status:
df -lh
Set up automatic mounting at boot.
vim /etc/fstab
Add:
/dev/sdc /data ext4 defaults 0 2
文章评论