博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
挂载磁盘出错
阅读量:6990 次
发布时间:2019-06-27

本文共 2286 字,大约阅读时间需要 7 分钟。

最近工作中遇到一个问题,在linux mount /dev/sdb 到 /mnt 分区时报错:

[root@centos6 ~]# mount /dev/sdb /mnt/
mount: you must specify the filesystem type
报错主要是因为没有指定文件系统格式。

1、查看磁盘设备

[root@centos6 ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0004cd37   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *           1          26      204800   83  LinuxPartition 1 does not end on cylinder boundary./dev/sda2              26          91      524288   82  Linux swap / SolarisPartition 2 does not end on cylinder boundary./dev/sda3              91        2611    20241408   83  LinuxDisk /dev/sdb: 105 MB, 105906176 bytes64 heads, 32 sectors/track, 101 cylindersUnits = cylinders of 2048 * 512 = 1048576 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000

2、先执行:mkfs.ext4 /dev/sdb

[root@centos6 ~]# 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=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
25896 inodes, 103424 blocks
5171 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1992 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Writing inode tables: done                            Creating journal (4096 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 34 mounts or180 days, whichever comes first.  Use tune2fs -c or -i to override.

3、再mount 即可:

mount -t ext4 /dev/sdb /mnt
[root@centos6 ~]# mount /dev/sdb /mnt

[root@centos6 ~]# df -h

4、查看挂载后状态。

[root@centos6 ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext4 19G 2.2G 16G 13% /
tmpfs tmpfs 238M 0 238M 0% /dev/shm
/dev/sda1 ext4 190M 40M 141M 22% /boot
/dev/sdb ext4 94M 1.6M 88M 2% /mnt

转载于:https://blog.51cto.com/gotoo/2095833

你可能感兴趣的文章
我的友情链接
查看>>
Mysql的服务无法启动的1067错误解决
查看>>
我的友情链接
查看>>
我的友情链接
查看>>
dubbo-thrift
查看>>
Spring Boot整合Mybatis实例
查看>>
Redis各种数据类型操作
查看>>
政府站群:基层生产内容,群众的力量是伟大的
查看>>
添加dependencies
查看>>
地图与定位
查看>>
我的友情链接
查看>>
Java培训-ORACLE数据库学习【2】用户权限
查看>>
Git使用详细教程
查看>>
Soap开发(二)——SOAP协议解析
查看>>
2018-04-24 Linux学习
查看>>
Java基础学习总结(6)——面向对象
查看>>
使用内存文件系统后系统内存统计方法
查看>>
YUM CentOS 7 64位下mysql5.7安装配置
查看>>
python 爬虫获取文件式网站资源(基于python 3.6)
查看>>
Java Web学习总结(15)——JSP指令
查看>>