CentOS7 挂载磁盘出错mount: /dev/sdb is write-protected, mounting mount: unknown filesystem type '(null)'
报错信息如下:[root@localhost ~]# mount /dev/sdb /imagemount: /dev/sdb is write-protected, mounting read-onlymount: unknown filesystem type '(null)'解决方案:查看磁盘:[root@localhost ~]# fdisk -l格式化磁盘...
报错信息如下:
[root@localhost ~]# mount /dev/sdb /image
mount: /dev/sdb is write-protected, mounting read-only
mount: unknown filesystem type '(null)'
解决方案:
查看磁盘:
[root@localhost ~]# fdisk -l
格式化磁盘
[root@localhost ~]# mkfs.ext4 /dev/sdb
Proceed anyway? (y,n) y
mke2fs 1.42.9 (28-Dec-2013)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
32768000 inodes, 131072000 blocks
6553600 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2279604224
4000 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
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
[root@localhost ~]# mount /dev/sdb /image
查看效果
[root@localhost ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
略
/dev/sdb 493G 73M 467G 1% /image
设置开机默认挂载
[root@localhost ~]# blkid /dev/sdb
/dev/sdb: UUID="b8c4a45f-ed74-3089-fcdb-0273de904d6d" TYPE="ext4"
[root@localhost ~]# vim /etc/fstab
在最后一行增加如下信息
UUID=b8c4a45f-ed74-3089-fcdb-0273de904d6d /image ext4 defaults 1 2
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)