Linux 格式化分割槽 報錯Could not stat /dev/sda3 --- No such file or directory
執行分割槽過程如下:
[root@jyrac2 ~]# fdisk /dev/sda
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
Disk /dev/sda: 24.6 GB, 24696061952 bytes
255 heads, 63 sectors/track, 3002 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2355 18916506 83 Linux
/dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility 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): u
Changing display/entry units to sectors
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
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
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
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.
Syncing disks.
You have new mail in /var/spool/mail/root
[root@jyrac2 ~]# fdisk -l
Disk /dev/sda: 24.6 GB, 24696061952 bytes
255 heads, 63 sectors/track, 3002 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2355 18916506 83 Linux
/dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris
/dev/sda3 2611 3003 3152423 83 Linux
新的分割槽為/dev/sda3
對分割槽進行格式化:
[root@jyrac2 /]# mkfs.ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda3 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
解決這個問題可以使用partprobe 命令,partprobe包含在parted的rpm軟體包中。partprobe可以修改kernel中分割槽表,使kernel重新讀取分割槽表。 因此,使用該命令就可以建立分割槽並且在不重新啟動機器的情況下系統能夠識別這些分割槽。
檢查是否安裝了partprobe軟體包
[root@jyrac2 /]# rpm -q parted
parted-1.8.1-23.el5
[root@jyrac2 /]# partprobe
[root@jyrac2 /]# mkfs -t ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
394400 inodes, 788105 blocks
39405 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=809500672
25 block groups
32768 blocks per group, 32768 fragments per group
15776 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
You have new mail in /var/spool/mail/root
格式化分割槽成功
[root@jyrac2 /]# mkdir /u02
[root@jyrac2 /]# mount /dev/sda3 /u02
[root@jyrac2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 18G 16G 1.5G 92% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda3 4.0G 237M 3.6G 7% /u02
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-2097960/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux格式化分割槽報錯Could not start /dev/sda No such file or directory 解決辦法Linuxdev
- pg_basebackup 報錯could not create directory
- Linux 分割槽和格式化Linux
- psql: error: could not connect to server: No such file or directorySQLErrorServer
- linux fdisk 分割槽、格式化、掛載!Linux
- linux下磁碟分割槽與格式化Linux
- 學習linux分割槽/dev/shm的應用Linuxdev
- Windows分割槽報錯解決Windows
- Linux 格式化擴充套件分割槽(Extended)Linux套件
- linux磁碟分割槽格式化-fdisk命令工具Linux
- linux 中的分割槽與格式化(轉)Linux
- tar (child): bzip2: Cannot exec: No such file or directory 報錯
- go tool compile 報錯 could not import sync (file not found)GoCompileImport
- linux平臺用fdisk分割槽格式化硬碟Linux硬碟
- Linux下新增硬碟,分割槽,格式化詳解Linux硬碟
- Virtualbox中Linux新增一個新磁碟->建立分割槽->格式化->掛載分割槽Linux
- LINUX中的分割槽,格式化,掛載安全(中)Linux
- 在Linux中,如何格式化一個磁碟分割槽?Linux
- ssh-add 報錯:Error connecting to agent No such file or directoryError
- Linux分割槽方案、分割槽建議Linux
- Linux主分割槽,擴充套件分割槽,邏輯分割槽Linux套件
- linux掛載新硬碟並進行分割槽格式化Linux硬碟
- LINUX中的分割槽,格式化,掛載安全(上)薦Linux
- 呼叫torchtext報錯OSError: libtorch_cpu.so: cannot open shared object file: No such file or directoryErrorObject
- 大盤分割槽格式化及掛載
- Linux 錯誤:fatal error: uuid/uuid.h: No such file or directoryLinuxErrorUI
- 自定義容器啟動指令碼報錯:exec user process caused "no such file or directory"指令碼
- Linux主分割槽,擴充套件分割槽,邏輯分割槽[final]Linux套件
- Oracle分割槽表增加分割槽報錯“ORA-14760:不允許對間隔分割槽物件執行 ADD PARTITION”Oracle物件
- sqlserver bulk insert報錯Cannot bulk load because the file could not be opened.SQLServer
- linux分割槽方案Linux
- linux硬碟分割槽Linux硬碟
- linux分割槽(1)Linux
- linux分割槽大小Linux
- linux交換分割槽Linux
- NPM run dev 報錯NPMdev
- Linux下進行格式化行動硬碟(U盤)以及分割槽Linux硬碟
- linux積累——磁碟操作(分割槽,格式化,掛載,解除安裝)Linux