阿里云数据盘挂载遇到的一些问题总结
来源:互联网 发布:自己开淘宝店赚钱吗 编辑:程序博客网 时间:2024/06/02 23:05
在上一篇文章《阿里云数据盘/硬盘挂载流程(CentOS)》中提到了阿里云主机挂载的基本流程,但在挂载的过程中也遇到一些奇葩的问题!
1、首先看一下系统信息:
[root@iZ28afd0manZ /]# fdisk -lDisk /dev/xvda: 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: 0x00073f45 Device Boot Start End Blocks Id System/dev/xvda1 * 1 2611 20970496 83 LinuxDisk /dev/xvdb (Sun disk label): 255 heads, 63 sectors, 65270 cylindersUnits = cylinders of 16065 * 512 bytes Device Flag Start End Blocks Id System/dev/xvdb1 0 65264 524233080 83 Linux native/dev/xvdb2 u 65264 65270 48195 82 Linux swap/dev/xvdb3 0 65270 524281275 5 Whole disk2、格式化数据盘/dev/xvdb
[root@iZ28afd0manZ /]# mkfs.ext3 /dev/xvdbmke2fs 1.41.12 (17-May-2010)/dev/xvdb is mounted; will not make a filesystem here![root@iZ28afd0manZ /]# mkfs.ext3 /dev/xvdb1mke2fs 1.41.12 (17-May-2010)/dev/xvdb1 is apparently in use by the system; will not make a filesystem here!3、提示/dev/xvdb已经挂载,/dev/xvdb1已经在使用中,都不允许格式化,参考https://zhidao.baidu.com/question/81665433.html的提示,需要先清除挂载才能继续格式化;
4、清除挂载1分区
[root@iZ28afd0manZ /]# fdisk -lDisk /dev/xvda: 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: 0x00073f45 Device Boot Start End Blocks Id System/dev/xvda1 * 1 2611 20970496 83 LinuxDisk /dev/xvdb (Sun disk label): 255 heads, 63 sectors, 65270 cylindersUnits = cylinders of 16065 * 512 bytes Device Flag Start End Blocks Id System/dev/xvdb1 0 65264 524233080 83 Linux native/dev/xvdb2 u 65264 65270 48195 82 Linux swap/dev/xvdb3 0 65270 524281275 5 Whole disk
准备清除分区/dev/xvdb1
[root@iZ28afd0manZ /]# fdisk /dev/xvdbCommand (m for help): mCommand action a toggle a read only flag b edit bsd disklabel c toggle the mountable flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)Command (m for help): dPartition number (1-8): 1Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 22: Invalid argument.The kernel still uses the old table. The new table will be used atthe next reboot or after you run partprobe(8) or kpartx(8)Syncing disks.[root@iZ28afd0manZ /]# fdisk -lDisk /dev/xvda: 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: 0x00073f45 Device Boot Start End Blocks Id System/dev/xvda1 * 1 2611 20970496 83 LinuxDisk /dev/xvdb (Sun disk label): 255 heads, 63 sectors, 65270 cylindersUnits = cylinders of 16065 * 512 bytes Device Flag Start End Blocks Id System/dev/xvdb2 u 65264 65270 48195 82 Linux swap/dev/xvdb3 0 65270 524281275 5 Whole disk
5、至此,可看见/dev/xvdb1分区已经去除挂载,同理操作去除/dev/xvdb2和/dev/xvdb3;
6、最后得到如下情况:
[root@iZ28afd0manZ /]# fdisk -lDisk /dev/xvda: 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: 0x00073f45 Device Boot Start End Blocks Id System/dev/xvda1 * 1 2611 20970496 83 LinuxDisk /dev/xvdb (Sun disk label): 255 heads, 63 sectors, 65270 cylindersUnits = cylinders of 16065 * 512 bytes Device Flag Start End Blocks Id System
7、再次格式化
[root@iZ28afd0manZ /]# mkfs.ext3 /dev/xvdbmke2fs 1.41.12 (17-May-2010)/dev/xvdb is mounted; will not make a filesystem here![root@iZ28afd0manZ /]# mkfs.ext3 /dev/xvdb1mke2fs 1.41.12 (17-May-2010)/dev/xvdb1 is apparently in use by the system; will not make a filesystem here!8、再次对/dev/xvdb进行解除挂载
[root@iZ28afd0manZ dev]# umount /dev/xvdbumount: /dev/xvdb: not mounted
9、至此,没有任何办法。重启吧。。。。。[root@iZ28afd0manZ dev]# reboot
10.再次查看,居然奇迹般的好了,果然是万能的重启啊![root@iZ28afd0manZ ~]# dfFilesystem 1K-blocks Used Available Use% Mounted on/dev/xvda1 20641404 8464512 11128368 44% /tmpfs 8165556 0 8165556 0% /dev/shm/dev/xvdb 516061624 202652 489644572 1% /mnt
0 0
- 阿里云数据盘挂载遇到的一些问题总结
- 使用阿里云服务器遇到的一些问题及解决办法
- 阿里云ECS(ubuntu16.04)安装mysql遇到的一些问题
- 阿里云配置遇到的一个问题
- 自己遇到的一些问题的总结
- 总结:遇到的一些小问题
- 安装linux遇到的一些问题总结
- 最近遇到的一些小问题总结
- ubuntu 遇到的一些问题和总结
- boost::python 遇到的一些问题总结
- 总结学习遇到的一些问题
- 自己总结遇到的一些问题
- 最近遇到的一些问题总结
- 更新Xcode8遇到的一些问题总结
- Qt中遇到的一些问题总结
- Android ListView的中的数据更新时遇到的一些问题的总结
- 阿里云的一些奇怪问题
- 阿里云Linux Ubuntu服务器上配置Java web项目过程(遇到的一些问题及要点)
- POJ 3304
- Python3.6连接MySQL
- Intent传递数据与Activity启动模式singleTask的关系。
- easyui datagrid 相同列合并/编辑行后保存
- 学生选课抽签管理系统设计(二)
- 阿里云数据盘挂载遇到的一些问题总结
- 轻量级的测试工具:ContiPerf
- JavaScript 帧动画
- volatile详解
- 第一章 Spring简史
- 安卓开发入门篇:Android Studio导入ApiDemos
- Bean property 'interceptorDao' is not writable or has an invalid setter method. Did you mean 'interc
- 如何开启Ubuntu的SSH服务
- android 滑动监听