Linux系统磁盘再次挂载报错没有有效的分区表
时间:2016-01-03 01:02 来源:linux.it.net.cn 作者:IT
报错信息如下方截图:

这个问题是由于磁盘卸载后分区表没有保存导致的,
可以在进行下步操作之前先将现在的磁盘信息创建一个快照,具体的创建方法参考以下连接。
fdisk /dev/xvdb
(标记红色字体的位置为输入的地方)
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
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-14098, default 1): (此处直接回车)
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-14098, default 14098): (此处直接回车)
Using default value 14098
Command (m for help): p
Disk /dev/xvdb: 115.9 GB, 115964116992 bytes
255 heads, 63 sectors/track, 14098 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvdb1 1 14098 113242153+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
现在再fdisk -l,结果正常。
(责任编辑:IT)
报错信息如下方截图:
这个问题是由于磁盘卸载后分区表没有保存导致的, 可以在进行下步操作之前先将现在的磁盘信息创建一个快照,具体的创建方法参考以下连接。
fdisk /dev/xvdb (标记红色字体的位置为输入的地方) 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 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-14098, default 1): (此处直接回车) Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-14098, default 14098): (此处直接回车) Using default value 14098 Command (m for help): p Disk /dev/xvdb: 115.9 GB, 115964116992 bytes 255 heads, 63 sectors/track, 14098 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/xvdb1 1 14098 113242153+ 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
现在再fdisk -l,结果正常。 |