[root@app-01 ~]# file /dev/sdb1 /dev/sdb2: cannot open (No such file or directory) [root@app-01 ~]# partprobe [root@app-01 ~]# partprobe [root@app-01 ~]# file /dev/sdb1 /dev/sdb1: block special
2.格式化分区
--格式化普通分区
mkfs.ext4 /dev/vdb1 mkfs.ext4/dev/vdb3
--格式化swap分区
[root@app-01 ~]# mkswap /dev/vdb2 Setting up swapspace version1, size =12583364 KiB no label, UUID=5f48bdfe-81a8-43a1-b9dc-45ed9b21124f
3.挂载分区
--建立挂载目录
[root@app-01 ~]# mkdir /u01 [root@app-01 ~]# mkdir /u02
--挂载普通分区
[root@app-01 ~]# mount /dev/vdb1 /u01 [root@app-01 ~]# mount /dev/vdb3 /u02
--挂载swap
[root@app-01 ~]# swapon /dev/vdb2 [root@app-01 ~]# free -m total used free shared buffers cached Mem:78727747097086482 -/+ buffers/cache:2057666 Swap:12288012288
4.设置开机自动挂载
/dev/vdb1 /u01 ext4 defaults00 /dev/vdb3 /u02 ext4 defaults00 /dev/vdb2 swap swap defaults00
5.查看磁盘的UUID
方法一:
[root@app-01 jdk1.7.0_80]# ll /dev/disk/by-uuid/ total0 lrwxrwxrwx1 root root10 Feb2211:02 0ac3b66b-c