linux分区 创建2个800m的分区,修改其分区ID号为LVM(8e) 创建3个1000m的分区,使其分区ID号都为RAID(fd)
2个回答
2012-05-21
展开全部
假如磁盘为/dev/sda,那么创建过程如下
# fdisk /dev/sda
n #创建新分区
t #修改分区类型 8e
w #保存分区
# partprobe 更新分区表
同样的方法创建fd
# fdisk /dev/sda
n #创建新分区
t #修改分区类型 8e
w #保存分区
# partprobe 更新分区表
同样的方法创建fd
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
(1)进入磁盘分区命令
[root@station7 ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 9726.
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)
注:下面的命令也是在fdisk命令环境之下输入的
(2)查看分区信息p
Command (m for help): p
Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3837 30716280 8e Linux LVM
/dev/sda3 3838 4098 2096482+ 82 Linux swap / Solaris
/dev/sda4 4099 9726 45206910 5 Extended
/dev/sda5 4099 4160 497983+ 83 Linux
/dev/sda6 4161 4285 1004031 8e Linux LVM
/dev/sda7 4286 4287 16033+ 83 Linux
/dev/sda8 4288 4350 506016 fd Linux raid autodetect
/dev/sda9 4351 4413 506016 fd Linux raid autodetect
(3)创建分区n
Command (m for help): n
First cylinder (4414-9726, default 4414):
Using default value 4414 //注意:默认是从4414开始分配的
(4)制定分区的大小,在这里是80M,输入“+80M”即可
Last cylinder or +size or +sizeM or +sizeK (4414-9726, default 9726): +80M
(5)修改分区类型t
Command (m for help): t
Partition number (1-10): 10 #选择分区
Hex code (type L to list codes): 8e #分区类型名称,8e是LVM的id号
Changed system type of partition 10 to 8e (Linux LVM)
(6)保存退出,修改完毕w
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.
[root@station7 ~]# partprobe #同步分区表
[root@station7 ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 9726.
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)
注:下面的命令也是在fdisk命令环境之下输入的
(2)查看分区信息p
Command (m for help): p
Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 3837 30716280 8e Linux LVM
/dev/sda3 3838 4098 2096482+ 82 Linux swap / Solaris
/dev/sda4 4099 9726 45206910 5 Extended
/dev/sda5 4099 4160 497983+ 83 Linux
/dev/sda6 4161 4285 1004031 8e Linux LVM
/dev/sda7 4286 4287 16033+ 83 Linux
/dev/sda8 4288 4350 506016 fd Linux raid autodetect
/dev/sda9 4351 4413 506016 fd Linux raid autodetect
(3)创建分区n
Command (m for help): n
First cylinder (4414-9726, default 4414):
Using default value 4414 //注意:默认是从4414开始分配的
(4)制定分区的大小,在这里是80M,输入“+80M”即可
Last cylinder or +size or +sizeM or +sizeK (4414-9726, default 9726): +80M
(5)修改分区类型t
Command (m for help): t
Partition number (1-10): 10 #选择分区
Hex code (type L to list codes): 8e #分区类型名称,8e是LVM的id号
Changed system type of partition 10 to 8e (Linux LVM)
(6)保存退出,修改完毕w
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.
[root@station7 ~]# partprobe #同步分区表
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询