国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux格式化分區 Could not start /dev/sda No such file or directory 錯誤

2024-08-27 23:59:55
字體:
來源:轉載
供稿:網友

今天在Linux系統中格式化新分區的時候,提出錯誤:Could not stat /dev/sda7 --- No such fileor directory,下面來記錄我是如何解決這個錯誤的.

Linux查看已經分好的區:

  1. [root@linuxidc ~]# fdisk -l /dev/sda 
  2.  
  3. Disk /dev/sda: 21.5 GB, 21474836480 bytes 
  4. 255 heads, 63 sectors/track, 2610 cylinders 
  5. Units = cylinders of 16065 * 512 = 8225280bytes 
  6. Sector size (logical/physical): 512 bytes /512 bytes 
  7. I/O size (minimum/optimal): 512 bytes / 512bytes 
  8. Disk identifier: 0x7d57cb1f 
  9.  
  10.   Device Boot      Start        End      Blocks  Id  System 
  11. /dev/sda1              1        2610  20964793+  5  Extended 
  12. /dev/sda5              1        128    1028097  83  Linux 
  13. /dev/sda6            129        256    1028128+  83  Linux 
  14. /dev/sda7            257        384    1028128+  83  Linux 

格式化新分區的時候,報錯,提示下面的錯誤,沒有這個文件或目錄.

  1. Could not stat /dev/sda7 --- No such fileor directory 
  2. The device apparently does not exist; didyou specify it correctly? 
  3.  
  4. [root@linuxidc ~]# mke2fs -t ext4 /dev/sda7 
  5. mke2fs 1.41.12 (17-May-2010) 
  6. Could not stat /dev/sda7 --- No such fileor directory 
  7. //Vevb.com 
  8. The device apparently does not exist; didyou specify it correctly? 

解決方法:執行partprobe 命令

partprobe包含在parted的rpm軟件包中,partprobe可以修改kernel中分區表,使kernel重新讀取分區表,因此,使用該命令就可以創建分區并且在不重新啟動機器的情況下系統能夠識別這些分區.

查看是否安裝過該命令:

  1. [root@linuxidc~]# rpm -q parted 
  2. packageparted is not installed 

提示沒有安裝過,則需要安裝parted

安裝命令:#yum install parted #前提是保證你的虛擬機可以上網,要從網絡下載安裝包.

  1. [root@linuxidc~]# yum install parted 
  2.  
  3.  Loadedplugins: fastestmirror 
  4. 1234567 Loadingmirror speeds from cached hostfile 
  5.  * base: mirrors.skyshe.cn 
  6.  * extras: mirrors.skyshe.cn 
  7.  * updates: mirrors.skyshe.cn 
  8. base                                                | 3.7 kB    00:00      
  9. extras                                                |3.3 kB    00:00      
  10. updates                                              | 3.4 kB    00:00 
  11.  
  12. Settingup Install Process 
  13. ResolvingDependencies 
  14. -->Running transaction check 
  15. --->Package parted.i686 0:2.1-25.el6 will be installed 
  16. -->Finished Dependency Resolution 
  17.  
  18. DependenciesResolved 
  19.  
  20. ============================================================================= 
  21.  Package          Arch          Version                Repository      Size 
  22. ============================================================================= 
  23. Installing: 
  24.  parted          i686          2.1-25.el6            base          595 k 
  25.  
  26. TransactionSummary 
  27. ============================================================================= 
  28. Install      1 Package(s) 
  29.  
  30. Totaldownload size: 595 k 
  31. Installedsize: 2.1 M 
  32. Isthis ok [y/N]: y 
  33. DownloadingPackages: 
  34. parted-2.1-25.el6.i686.rpm                            | 595 kB    00:16      
  35. Runningrpm_check_debug 
  36. RunningTransaction Test 
  37. TransactionTest Succeeded 
  38. RunningTransaction 
  39.   Installing : parted-2.1-25.el6.i686                                    1/1 
  40.   Verifying : parted-2.1-25.el6.i686                                  1/1 
  41.  
  42. Installed: 
  43.   parted.i686 0:2.1-25.el6                                                  
  44.  
  45. Complete! 

安裝完成后,再進行查詢一次,已經安裝成功.

  1. [root@linuxidc~]# rpm -q parted 
  2. parted-2.1-25.el6.i686 

執行一下該命令:

  1. [root@linuxidc~]# partprobe 
  2. Warning:WARNING: the kernel failed to re-read the partition table on /dev/sda (Deviceor resource busy).  As a result, it maynot reflect all of your changes until after reboot. 
  3. Warning:WARNING: the kernel failed to re-read the partition table on /dev/sdb (Deviceor resource busy).  As a result, it maynot reflect all of your changes until after reboot. 
  4. Warning:Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only. 
  5. Warning:Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only. 
  6. Error:Invalid partition table - recursive partition on /dev/sr0. 

然后執行格式化,就OK了,如果還提示出錯,重啟之后再執行格式化就可以了.

  1. [root@linuxidc~]# mkfs -t ext4 /dev/sda7 
  2. mke2fs1.41.12 (17-May-2010) 
  3. Filesystemlabel= 
  4. OStype: Linux 
  5. Blocksize=4096 (log=2) 
  6. Fragmentsize=4096 (log=2) 
  7. Stride=0blocks, Stripe width=0 blocks 
  8. 64384inodes, 257032 blocks 
  9. 12851blocks (5.00%) reserved for the super user 
  10. Firstdata block=0 
  11. Maximumfilesystem blocks=264241152 
  12. 8block groups 
  13. 32768blocks per group, 32768 fragments per group 
  14. 8048inodes per group 
  15. Superblockbackups stored on blocks:  
  16.     32768, 98304, 163840, 229376 
  17.  
  18. Writinginode tables: done                          
  19. Creatingjournal (4096 blocks): done 
  20. Writingsuperblocks and filesystem accounting information: done 
  21.  
  22. Thisfilesystem will be automatically checked every 35 mounts or 
  23. 180days, whichever comes first.  Use tune2fs-c or -i to override.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 措美县| 临江市| 浏阳市| 南丰县| 和顺县| 尚义县| 延川县| 宁安市| 称多县| 铁岭县| 黄浦区| 瑞昌市| 荆门市| 濉溪县| 黎城县| 文水县| 兴仁县| 金川县| 嘉善县| 丰宁| 临桂县| 和林格尔县| 济宁市| 吴桥县| 哈巴河县| 龙川县| 民勤县| 闵行区| 司法| 白河县| 锦屏县| 黎川县| 沙雅县| 宜君县| 乐业县| 延川县| 乐业县| 彭泽县| 富锦市| 紫云| 河西区|