免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 968 | 回复: 0
打印 上一主题 下一主题

ESX服务器增加storage--转载 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-30 17:47 |只看该作者 |倒序浏览

[root@ITEEST root]# fdisk /dev/sdb   
The number of cylinders for this disk is set to 17684.
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                             (#输入n参数来增加新的分区#)
Command action           (#选择新建的分区类型,主分区还是扩展分区;选择p或者e#)
   e   extended
   p   primary partition (1-4)
p                                                    (#这里选择P是主要分区#)
Partition number (1-4): 1                              (#添加主分区1 #)
First cylinder (1-17684, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-17684, default 17684):
Using default value 17684
Command (m for help): x                                 (#输入x ,进行专家模式#)
Expert command (m for help): b           (#专家行模式,输入b ,编辑bsd类型分区#)
Partition number (1-4): 1                               (#添加主分区1#)
New beginning of data (63-284093459, default 63):
Using default value 63
Expert command (m for help): r                      (#输入r ,返回主菜单#)
Command (m for help): t   (#输入t ,改变分区类型,系统会提示要改变哪个分区#)
Selected partition 1
Hex code (type L to list codes): fb (如果想知道系统支持的分区类型列表,输入l#)
Changed system type of partition 1 to fb (Unknown)
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@ITEEST root]# fdisk ?–l
Unable to open –l
[root@ITEEST root]# fdisk -l
-bash: fdi: command not found
[root@ITEEST root]# fdisk -l
Disk /dev/sda: 146.5 GB, 146548981760 bytes
255 heads, 63 sectors/track, 17816 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       650   5116702+  83  Linux
/dev/sda3           651     17480 135186975   fb  Unknown
/dev/sda4         17481     17816   2698920    f  Win95 Ext'd (LBA)
/dev/sda5         17481     17549    554211   82  Linux swap
/dev/sda6         17550     17803   2040223+  83  Linux
/dev/sda7         17804     17816    104391   fc  Unknown
Disk /dev/sdb: 145.4 GB, 145458462720 bytes
255 heads, 63 sectors/track, 17684 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1     17684 142046698+  fb  Unknown
[root@ITEEST root]# vmkfstools -C vmfs3 -b 1m -S myVMFS vmhba0:1:0:1
Vmkfstools             (#使用Vmkfstools 工具#)
-C                           (#建立一个虚拟磁盘#)
Vmfs3                    (#创建为VMFS3文件格式系统#)
-b 1m                     (#用于指定文件块大小,我这里指定为1M#)
-S mlyVMFS            (#设置VMFS文件系统标签, 我这里设置成mlyVMFS#)
vmhba0:1:0:1
(#vmhba0其中第一个0表示适配器,1表示第二块目标硬盘,0表示LUN(逻辑单位编号),1表示分区.如果这一位为0则表示整个磁盘#)


Creating file system on "vmhba0:1:0:1" with blockSize 1048576 and volume label "myVMFS".
Successfully created new volume: 48e1f0ec-56446db6-16c3-00114335e798

打开VIC的STORAGE就可以看到名字为myVMFS的第二个存储

作者:LeeSun

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/76272/showart_1270880.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP