linux挂载硬盘报错(you must specify the filesystem type)

今天自己的虚拟机磁盘用完成,于是想加一磁盘,当挂载时发现报错you must specify the filesystem type。(注:我的系统环境是lcentos6.3装在virtualbox的虚拟机)

原来是因为该磁盘没有格式分区导致的于是有了以下操作:

1)先查看一下当前的系统情况,新加的盘是sdb

[root@test ~]# lsblkNAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTsr0                          11:0    1  1024M  0 rom  sda                           8:0    0     8G  0 disk ├─sda1                        8:1    0   500M  0 part /boot└─sda2                        8:2    0   7.5G  0 part   ├─VolGroup-lv_root (dm-0) 253:0    0   6.6G  0 lvm  /  └─VolGroup-lv_swap (dm-1) 253:1    0   992M  0 lvm  [SWAP]sdb                           8:16   0     8G  0 disk

?2)尝试挂载,报错

[root@test ~]# mount /dev/sdb /diskmount: you must specify the filesystem type

?3)格式化该磁盘

[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 blocks524288 inodes, 2097152 blocks104857 blocks (5.00%) reserved for the super user第一个数据块=0Maximum filesystem blocks=214748364864 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock 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 or180 days, whichever comes first.  Use tune2fs -c or -i to override.[root@test ~]#

?4)挂载成功

[root@test ~]# cd /disk/[root@test disk]# lslost+found

?5)增加开机启动

[root@test disk]# vim /etc/fstabtmpfs                   /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
linux挂载硬盘报错(you must specify the filesystem type)

相关文章:

你感兴趣的文章:

标签云: