今天本身的虛擬機磁盤用完成,因而想加一磁盤,當掛載時發現報錯you must specify the filesystem type。(注:個人系統環境是lcentos6.3裝在virtualbox的虛擬機)node
原來是由於該磁盤沒有格式分區致使的因而有了如下操做:centos
1)先查看一下當前的系統狀況,新加的盤是sdbide
代碼以下 | |
[root@test ~]# lsblk |
2)嘗試掛載,報錯操作系統
代碼以下 | |
[root@test ~]# mount /dev/sdb /disk |
mount: you must specify the filesystem typeorm
3)格式化該磁盤ip
代碼以下 | |
[root@test ~]# mkfs.ext3 /dev/sdb mke2fs 1.41.12 (17-May-2010) /dev/sdb is entire device, not just one partition! 不管如何也要繼續? (y,n) y 文件系統標籤= 操做系統:Linux 塊大小=4096 (log=2) 分塊大小=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 524288 inodes, 2097152 blocks 104857 blocks (5.00%) reserved for the super user 第一個數據塊=0 Maximum filesystem blocks=2147483648 64 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 正在寫入inode表: 完成 Creating journal (32768 blocks): 完成 Writing superblocks and filesystem accounting information: 完成 This filesystem will be automatically checked every 27 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@test ~]# |
4)掛載成功ci
代碼以下 | |
|
5)增長開機啓動it
代碼以下 | |
tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0/dev/sdb /disk ext3 defaults 0 0 |