美文网首页
扩充阿里云磁盘,格式化分区报错Could not stat /d

扩充阿里云磁盘,格式化分区报错Could not stat /d

作者: dming1024 | 来源:发表于2019-08-28 16:31 被阅读0次

参考文章:
阿里云ECS云服务器数据盘分区及挂载到指定目录
Linux 格式化分区 报错Could not stat /dev/sda3 --- No such file or directory

在阿里云上进行磁盘挂载,出现了这个问题:

fdisk /dev/vda
The number of cylinders for this disk is set to 3002.
 There is nothing wrong with that, but this is larger than 1024,
 and could in certain setups cause problems with:
 1) software that runs at boot time (e.g., old versions of LILO)
 2) booting and partitioning software from other OSs
 (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

 Default number (2-4): 2
 First sector (41929650-48234495, default 41929650):
 Using default value 41929650
 Last sector or +size or +sizeM or +sizeK (41929650-48234495, default 48234495):
 Using default value 48234495

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
 The kernel still uses the old table.
 The new table will be used at the next reboot.

百度了以下找到一位大神给出的解决方案:Linux 格式化分区 报错Could not stat /dev/sda3 --- No such file or directory
需要partprobe命令加载:

#查看是否安装partprobe
[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024] rpm -q parted
parted-3.1-29.el7.x86_64
[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024] partprobe
[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024] mkfs.ext3 /dev/vda2
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
5251072 inodes, 20972800 blocks
1048640 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
641 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

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

格式化分区完成后,再进行挂载

[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024]fdisk -l

Disk /dev/vda: 128.8 GB, 128849018880 bytes, 251658240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b2d99

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    83875364    41936658+  83  Linux
/dev/vda2        83875840   251658239    83891200   83  Linux

[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024]echo "/dev/vda2 /data ext3 defaults 0 0" >> /etc/fstab
[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024]mount a

或者这样挂载

[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024]mkdir /data
[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024]mount /dev/vda2 /data                                         
#查看挂载情况
[root@iZm5e7unwrg8d8byylz6dfZ xiaozhou1024] df -h 

相关文章

  • 扩充阿里云磁盘,格式化分区报错Could not stat /d

    参考文章:阿里云ECS云服务器数据盘分区及挂载到指定目录Linux 格式化分区 报错Could not stat ...

  • linux运维学习

    每天学习一节阿里云linux运维 学习至课时 2 阿里云linux运维(一) 系统安装分区 磁盘选择 分区原则 l...

  • 阿里云Centos7挂载数据盘

    1、查看分区 图中红框内的磁盘未被使用,开始分配。2、磁盘分区 3、查看分区 4、格式化刚分区的磁盘,格式成ext...

  • 磁盘挂载

    一、查看磁盘挂载情况 二、查看所有磁盘 三、创建磁盘分区 四、格式化分区磁盘 五、挂载 六、卸载 七、查看挂载权限

  • 磁盘管理(一)

    进行磁盘格式化 分区 查看相关文件占用情况。主要用到以下几个命令。 fdisk 删除分区参数说明 m 获取帮助d ...

  • 阿里云磁盘挂载扫盲

    阿里云磁盘挂载 在阿里云控制台购买并挂载好后的操作 1.检查服务器磁盘情况 2.格式化磁盘 3.创建一个目录挂载进...

  • centos7挂载硬盘.md

    [TOC] 查看未分配硬盘 查看磁盘信息 fdisk -l 查看磁盘格式 df -T 新建分区 格式化分区 新添加...

  • Linux系统分区步骤

    分区-->格式化-->分区设备文件名-->挂载-->完成 磁盘分区 将硬盘分为几个小硬盘,分区类型:-- 主分区:...

  • Linux挂载磁盘空间

    Linux挂载磁盘空间 (1)查看磁盘空间 (2)查看硬盘及分区信息 (3)格式化新分区 (4)将磁盘挂载在/po...

  • Gradle报错Could not resolve all de

    将gradle.build仓库更换为阿里云仓库后报错Could not resolve all dependenc...

网友评论

      本文标题:扩充阿里云磁盘,格式化分区报错Could not stat /d

      本文链接:https://www.haomeiwen.com/subject/lompectx.html