您的位置:首页 > 运维架构 > Linux

Practice of vmware virtual disk expansion, vmware-vdiskmanager.exe + fdisk + mkfs + mount

2008-09-05 15:13 381 查看
D:/Program Files/VMware/VMware Workstation>vmware-vdiskmanager.exe -x6GB D:/fedora_core/fc5-flat.vmdk
Using log file C:/DOCUME~1/WENJUN~1.BJ/LOCALS~1/Temp/vmware-wenjunwang/vdiskmanager.log
Failed to open the disk 'D:/fedora_core/fc5-flat.vmdk' : The file specified is not a virtual disk (15).
Failed to open disk 'D:/fedora_core/fc5-flat.vmdk' : The file specified is not a virtual disk (15).

 

 

D:/Program Files/VMware/VMware Workstation>vmware-vdiskmanager.exe -x6GB D:/fedora_core/fc5.vmdk
Using log file C:/DOCUME~1/WENJUN~1.BJ/LOCALS~1/Temp/vmware-wenjunwang/vdiskmanager.log
  Grow: 100% done.
The old geometry C/H/S of the disk is: 7905/16/63
The new geometry C/H/S of the disk is: 12483/16/63
Disk expansion completed successfully.

WARNING: If the virtual disk is partitioned, you must use a third-party
         utility in the virtual machine to expand the size of the
         partitions. For more information, see:
         http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647

 

logon to guest os do fdisk --> mkfs-->mount

 

[root@localhost /home/deric]#fdisk /dev/hda

Command (m for help): p

Disk /dev/hda: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14         496     3879697+  8e  Linux LVM

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (497-783, default 497):
Using default value 497
Last cylinder or +size or +sizeM or +sizeK (497-783, default 783):
Using default value 783

Command (m for help): p

Disk /dev/hda: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14         496     3879697+  8e  Linux LVM
/dev/hda3             497         783     2305327+  83  Linux

Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): 8e
Changed system type of partition 3 to 8e (Linux LVM)

Command (m for help): p

Disk /dev/hda: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14         496     3879697+  8e  Linux LVM
/dev/hda3             497         783     2305327+  8e  Linux LVM

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): 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.

 

rebooting.

 

[root@localhost /home/deric]#mkfs
Usage: mkfs [-V] [-t fstype] [fs-options] device [size]
[root@localhost /home/deric]#mkfs -t ext3 /dev/hda
hda   hda1  hda2  hda3 
[root@localhost /home/deric]#mkfs -t ext3 /dev/hda3
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
288576 inodes, 576331 blocks
28816 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=591396864
18 block groups
32768 blocks per group, 32768 fragments per group
16032 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 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

 

[root@localhost /home/deric]#mount -t ext3 /dev/hda3 /home/deric/extra
[root@localhost /home/deric]#df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       3205824   3095736         0 100% /
/dev/hda1               101086     12249     83618  13% /boot
tmpfs                   128044         0    128044   0% /dev/shm
/dev/hda3              2269060     68992   2084804   4% /home/deric/extra
[root@localhost /home/deric]#cd extra/

 

 

edit /etc/fstab to issue auto-mount

/dev/hda3               /home/deric/extra        ext3    defaults       0 0

 

Ok, that's all.

 

在vmware workstation 6中为Solaris10 添加硬盘  

http://blog.csdn.net/xian_fish/archive/2008/06/05/2514875.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息