Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos手动挂载磁盘 #42

Open
dalaolala opened this issue Feb 17, 2022 · 0 comments
Open

centos手动挂载磁盘 #42

dalaolala opened this issue Feb 17, 2022 · 0 comments

Comments

@dalaolala
Copy link
Owner

挂载磁盘命令

fdisk -l
fdisk  /dev/sdb

然后依次输入

n->p->1->回车->回车->w

初始化磁盘

mkfs.xfs /dev/sdb

如果挂载失败是用强制格式化命令

mkfs.xfs -f /dev/sdb

对磁盘进行挂载

cd /
mkdir data
mount /dev/sdb  /data

挂载的目录自动启动

#查询磁盘分区的uuid 
sudo blkid

#设置开启自动挂载时使用
sudo vim /etc/fstab

加入:
UUID={uuid} /data xfs defaults 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant