Linux mount hard Drive error (you must specify the filesystem type)

Source: Internet
Author: User

Today's own virtual machine disk is completed, so I would like to add a disk, when mounted to find an error you must specify the filesystem type. (Note: My system environment is lcentos6.3 installed in VirtualBox virtual machine)

It turns out that the disk does not have a format partition resulting in the following actions:

1 First look at the current system situation, the new disk is SDB

  code is as follows &nbs P;

[root@test ~]# lsblk
name      & nbsp;                 MAJ:MIN RM    SIZE RO TYPE mountpoint
sr0                           11:0    1   1024m  0 rom 
sda                            8:0    0      8g  0 Disk
├─sda1                         8:1&NBsp;   0   500m  0 part/boot
└─sda2                         8:2     0   7.5g  0 part
 ├─volgroup-lv_root (dm-0) 253:0    0   6.6G& nbsp 0 lvm /
 └─volgroup-lv_swap (dm-1) 253:1    0   992m  0 lvm  [SWAP]
sdb                            8:16   0     8g  0 disk

2) try to mount, error

The code is as follows
[Root@test ~]# Mount/dev/sdb/disk

Mount:you must specify the filesystem type

3) Format the disk

  code is as follows &nbs P;
[root@test ~]# mkfs.ext3/dev/sdb
mke2fs 1.41.12 (17-may-2010)
/dev/sdb is entire device, not just one partition!
Do you want to continue anyway? (y,n) y
File System label =
Operating system: Linux
Block size =4096 (log=2)
chunking size =4096 (log=2)
stride=0 blocks, stripe width=0 blocks 524288 inodes, 2097152 blocks
104857 blocks (5.00%) reserved for the Super user
the first block of data =0
Maximum filesystem blocks=2147483648
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
 
is writing to the Inode table: Completing                             
Creating journal (32768 Blocks): Completing
Writing superblocks and filesystem accounting information: Completing
 
This filesystem is automatically checked every mounts or
180 days, whichever comes and first.  use Tune2fs-c Or-i to override.
[root@test ~]#

4) Successful Mount

The code is as follows


[Root@test ~]# cd/disk/
[Root@test disk]# ls
Lost+found

5) Increase boot boot

  code is as follows &nbs P;
tmpfs          & nbsp;       /dev/shm                 tmpfs   defaults        0 0
devpts                 / dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                     sysfs   Defaults        0 0
proc                    /proc                    proc    defaults         0 0
/dev/sdb                /disk                    ext3    defaults        0 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.