Linux扩容时新建分区报错No free sectors available
2012-04-07 14:26
2206 查看
扩展后执行fdisk -l查看是否成功
[root@localhost ~ ]# fdisk - l
Disk / dev / sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors / track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ dev / sda1 * 1 6 48163 + 83 Linux
/ dev / sda2 7 515 4088542 + 83 Linux
/ dev / sda3 516 1239 5815530 83 Linux
/ dev / sda4 1240 1305 530145 5 Extended
/ dev / sda5 1240 1305 530113 + 82 Linux swap / Solaris
可见sda已经扩展成为16G,但是没分配给文件系统
继续执行fdisk /dev/sda进行新建磁盘
[root@localhost ~ ]# fdisk / dev / sda
The number of cylinders for this disk is set to 1958 .
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): n
No free sectors available
前面执行fdisk -l的时候明明最后才是1305柱面,而且应该有1958柱面,为什么说没有空闲的扇区。
再看看fdisk -l执行结果,原来是/dev/sda5分配了作为swap分区,找到原因了就容易解决。
1.关闭swap分区# swapoff /dev/sda5
2.删除sda4和sda5.
[root@localhost ~ ]# fdisk / dev / sda
The number of cylinders for this disk is set to 1958 .
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): d
Partition number ( 1 - 5 ): 5
Command (m for help): d
Partition number ( 1 - 5 ): 4
3.建立扩展分区4,建立分区sda5,写入
Command (m for help): n
Command action
e extended
p primary partition ( 1 - 4 )
e
Selected partition 4
First cylinder ( 1240 - 1958 , default 1240 ):
Using default value 1240
Last cylinder or + size or + sizeM or + sizeK ( 1240 - 1958 , default 1958 ):
Using default value 1958
Command (m for help): n
First cylinder ( 1240 - 1958 , default 1240 ):
Using default value 1240
Last cylinder or + size or + sizeM or + sizeK ( 1240 - 1958 , default 1958 ):
Using default value 1958
Command (m for help): w
The partition table has been altered !
[root@localhost ~ ]# fdisk - l
Disk / dev / sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors / track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ dev / sda1 * 1 6 48163 + 83 Linux
/ dev / sda2 7 515 4088542 + 83 Linux
/ dev / sda3 516 1239 5815530 83 Linux
/ dev / sda4 1240 1305 530145 5 Extended
/ dev / sda5 1240 1305 530113 + 82 Linux swap / Solaris
可见sda已经扩展成为16G,但是没分配给文件系统
继续执行fdisk /dev/sda进行新建磁盘
[root@localhost ~ ]# fdisk / dev / sda
The number of cylinders for this disk is set to 1958 .
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): n
No free sectors available
前面执行fdisk -l的时候明明最后才是1305柱面,而且应该有1958柱面,为什么说没有空闲的扇区。
再看看fdisk -l执行结果,原来是/dev/sda5分配了作为swap分区,找到原因了就容易解决。
1.关闭swap分区# swapoff /dev/sda5
2.删除sda4和sda5.
[root@localhost ~ ]# fdisk / dev / sda
The number of cylinders for this disk is set to 1958 .
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): d
Partition number ( 1 - 5 ): 5
Command (m for help): d
Partition number ( 1 - 5 ): 4
3.建立扩展分区4,建立分区sda5,写入
Command (m for help): n
Command action
e extended
p primary partition ( 1 - 4 )
e
Selected partition 4
First cylinder ( 1240 - 1958 , default 1240 ):
Using default value 1240
Last cylinder or + size or + sizeM or + sizeK ( 1240 - 1958 , default 1958 ):
Using default value 1958
Command (m for help): n
First cylinder ( 1240 - 1958 , default 1240 ):
Using default value 1240
Last cylinder or + size or + sizeM or + sizeK ( 1240 - 1958 , default 1958 ):
Using default value 1958
Command (m for help): w
The partition table has been altered !
相关文章推荐
- linux 进行根分区扩容
- linux查看分区命令和根分区扩容方法
- Linux LVM分区扩容
- Linux Redhat5.4 扩容时新建分区报错No free sectors available
- linux新建磁盘并分区
- linux 添加磁盘、分区、挂载、扩容现有分区
- LINUX分区空间扩容操作
- 使用gparted 调整Linux分区扩容
- linux 使用fdisk分区扩容
- vmware虚拟主机扩容和linux增加分区及挂载
- 给Vmware进行硬盘(分区)无损扩容 (linux)
- <实训|第十二天>用LVM对linux分区进行动态扩容
- Linux中对VPS的硬盘扩容后的分区记录
- linux分区扩容
- 如何在Virtualbox中对Linux(Ubuntu)系统根分区扩容
- linux 使用fdisk分区扩容
- Linux中利用LVM实现分区动态扩容
- Linux扩容分区操作过程
- Linux分区,磁盘扩容缩容,磁盘限额
- 为Linux操作系统根分区扩容最简单的方法