Mount HDD Error in Linux (you must specify the filesystem type)

Source: Internet
Author: User
Tags reserved

The company has a server to do RAID1, due to small capacity, need to expand, the original plan to add more than two hard drives into more than a group of RAID1, composed of two groups RAID1 mixed use, but the company stingy, buy the server can only install 3 hard drives, helpless under only put more pieces into a separate mount partition use.

At the beginning of the newly added hard disk access to the RAID card, the server boot is not recognized, the solution is to add the new hard disk access to the motherboard SATA interface, the server power on the login after the successful identification.

Let's start by talking about how to do it at the beginning:

First Partition with Fdisk

# Fdisk/dev/sdb

Entire disk space to create only one partition, after the completion of the area to view

disk/dev/sdb:1000.2 GB, 1000204886016 bytes
255 heads, Sectors/track, 121601 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x0005f698

Device Boot Start End Blocks Id System
/DEV/SDB1 1 121601 976760001 Linux

You can see that a new partition has been established/DEV/SDB1

Then format and mount the partition

# mkfs-t ext4-c/dev/sdb1
MKE2FS 1.41.12 (17-may-2010)
Filesystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
61054976 inodes, 244190000 blocks
12209500 blocks (5.00%) reserved for the Super user
First Data block=0
Maximum filesystem blocks=4294967296
7453 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, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

Checking for Bad blocks (read-only test): Done
Writing Inode Tables:done
Creating Journal (32768 blocks): Done
Writing superblocks and filesystem accounting Information:done

This filesystem'll be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.

# Mount/dev/sdb1/data

# Df-h

You can see that it's been successfully mounted.

Modify the/etc/fstab, add the following line, so that the boot automatically mount

/dev/sdb1/data EXT4 Defaults 0 0

Restart Server init 6 after saving

Execution df-h found that it was not mounted successfully

Execution fdisk-l can also see the/DEV/SDB1 partition

disk/dev/sdb:1000.2 GB, 1000204886016 bytes
255 heads, Sectors/track, 121601 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x0005f698

Device Boot Start End Blocks Id System
/DEV/SDB1 1 121601 976760001 Linux

But there's no/dev/sdb1.

# LL/DEV/SDB1

Ls:cannot access/dev/sdb1:no such file or directory

Re-execute Mount

# mount/dev/sdb1/data/

Mount:you must specify the filesystem type

Plus the partition type is mounted again, indicating that no partition exists

# Mount-t ext4/dev/sdb1/data/
Mount:special DEVICE/DEV/SDB1 does not exist

According to the online God method, successfully resolved:

# Mkfs.ext4/dev/sdb
MKE2FS 1.41.12 (17-may-2010)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (Y,n) y
Filesystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
61054976 inodes, 244190646 blocks
12209532 blocks (5.00%) reserved for the Super user
First Data block=0
Maximum filesystem blocks=4294967296
7453 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, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

Writing Inode Tables:done
Creating Journal (32768 blocks): Done
Writing superblocks and filesystem accounting Information:done

This filesystem would be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.

Formatting an entire hard disk

Fdisk-l view after formatting is complete

disk/dev/sdb:1000.2 GB, 1000204886016 bytes
255 heads, Sectors/track, 121601 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000

Without the/DEV/SDB1 partition

Re-mount

# mount/dev/sdb/data/

# Df-h

Successfully mount, modify the/etc/fstab to automatically mount the boot, add the following content

/dev/sdb /data ext4 defaults 0 0

The Init 6 restarts and is found to be able to mount normally automatically, which has successfully resolved the problem

To view recognized hard disks and mounted partitions with the LSBLK command

# lsblk

Mount HDD Error in Linux (you must specify the filesystem type)

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.