VMware 中Linux 调整分区大小

VMware 中Linux 调整分区大小

Fedora_logo

Precondition :VMware Player 中安装的Fedora 17 Linux 32bit,个人较久远的测试环境,安装时没有进行磁盘规划,默认20G空间(动态调整),安装在根/下。
Background :在上述环境中安装IBM DB2 Express-C 10.5(v10.5fp1_linuxia32_expc.tar.gz),安装时/tmp空间不足,无法安装。
Plan:需要进行磁盘扩容。考虑到使用VMware Player虚拟机。

1.首先调整虚拟机大小:player_vm_fedora

2.虚拟机开机,使用fdisk 命令新建新区 fdisk  /dev/sda 添加 /dev/sda3

3.接下来就贴代码了:

Fedora release 17 (Beefy Miracle)
Kernel 3.4.0-1.fc17.i686 on an i686 (0)

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 6.5G 6.0G 529M 92% /
devtmpfs 494M 0 494M 0% /dev
tmpfs 502M 0 502M 0% /dev/shm
tmpfs 502M 940K 502M 1% /run
/dev/mapper/vg-lv_root 6.5G 6.0G 529M 92% /
tmpfs 502M 0 502M 0% /sys/fs/cgroup
tmpfs 502M 0 502M 0% /media
/dev/sda1 497M 81M 392M 17% /boot

[root@localhost ~]# # fdisk /dev/sda

[root@localhost ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders, total 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002255

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 16777215 7875584 8e Linux LVM
/dev/sda3 16777216 62914559 23068672 83 Linux

Disk /dev/mapper/vg-lv_swap: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/vg-lv_root: 6979 MB, 6979321856 bytes
255 heads, 63 sectors/track, 848 cylinders, total 13631488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@localhost ~]# pvcreate /dev/sda3
Writing physical volume data to disk "/dev/sda3"
Physical volume "/dev/sda3" successfully created

[root@localhost ~]# vgextend /dev/mapper/vg /dev/sda3 
Volume group "vg" successfully extended
[root@localhost ~]# lvextend -L +20G /dev/mapper/vg-lv_root
Extending logical volume lv_root to 26.50 GiB
Logical volume lv_root successfully resized

[root@localhost ~]# resize2fs /dev/mapper/vg-lv_root 
resize2fs 1.42 (29-Nov-2011)
Filesystem at /dev/mapper/vg-lv_root is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mapper/vg-lv_root is now 6946816 blocks long.

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 27G 6.2G 21G 24% /
devtmpfs 494M 0 494M 0% /dev
tmpfs 502M 0 502M 0% /dev/shm
tmpfs 502M 956K 502M 1% /run
/dev/mapper/vg-lv_root 27G 6.2G 21G 24% /
tmpfs 502M 0 502M 0% /sys/fs/cgroup
tmpfs 502M 0 502M 0% /media
/dev/sda1 497M 81M 392M 17% /boot
[root@localhost ~]#

至此,操作结束,空间调整为30GB,满足使用需求。当然,此方案针对虚拟机中已安装的没有采用LVM的linux分区大小调整,其它不必参考此方案。

VMware Player免费虚拟机软件-VMware Tools篇..

VMware Player免费虚拟机软件-VMware Tools篇..

之前已经写过文章“Why not VMware Player[为什么不选择VM-Player呢]?”一直很感叹,作为一名IT工程师,一名程序员,或者IT民工,为什么自己的电脑充斥着那么多的盗版软件,且不说操作系统,就是起码的应用开发工具,一律的免费拿来,如果真是经济原因不打算支付费用,哪有那么多开源的软件,或者免费的,为什么不去搜索使用呢,随随便便上网下载那些破解的,序列号...真心为这种行为不齿...也不想多说,大环境...一直不喜欢那些同事遇到问题:百度一下。我的观点:一名程序员,如果Google都不用,那只有呵呵了...

偏题太多,也过于激动了,总之,还是希望不要使用盗版软件进行开发创作,支持正版,支持开源!

vmware

VMware Player 是个好软件!

但是在×××,可能遇到无法下载更新Vmware tools 的情形,那么只有手动下载安装,官网并没有给出直接的下载地址,通过发掘,搜索,在这里,以安装的版本号为目录:

http://softwareupdate.vmware.com/cds/vmw-desktop/player/

层级目录以windows版本为例如player/6.0.1/1379776/windows/packages/

下载之后进行解压,通过U盘或者共享的方式上传至虚拟机中,安装即可。可能需要msiexec 解压出msiexec /a  tools-windows.msi ,具体方法就请Google了..

 

Why not VMware Player[为什么不选择VM-Player呢]?

Why not VMware Player[为什么不选择VM-Player呢]?

虚拟机(Virtual Machine)为大家熟知的品牌不是很多,虚拟桌面可能大家在windows上会选择大名鼎鼎的VMware Workstation或者VirtualBOX;而在Mac下可以选择的有Parallels,VMware Fusion还有VisturlBOX for Mac。当然除了VirtualBOX是开源软件免费的外,其它的都是付费软件,但是身边有好多人在用VMware Workstation,当提到这不是免费的,他的回答让人大跌眼镜:“VMware Workstation不是免费的吗?找个序列号就行了,我用的所有软件都是免费的!”--这是从我们软件开发者口中说出的!可以想见:我们中国软件从业者为什么这么苦逼的生存,因为**! 也许他们眼中开发工具UltraEdit Text Editor(UE)是免费的,FlashFXP是免费的,甚至SQLPLUS ,MS Office都是免费的!那么为什么不去尝试一些真正FREE的工具呢?为什么不选择VMware Player呢,Notepad++? Filezilla?Putty...

看来已经偏题很远了...今天VMware player 发布了新版本,VMware-Player-5.0.我本意是来纠正某知名网站对VMware player 错误宣传,没想到扯了这么多,那就呆会儿扯吧...

VMware player同样是VMware出品的一款优秀的虚拟机产品,它最大的特点是:FREE!这是一个免费版本!无需任何注册便可现在免费使用,(而不是某网站所提到的仍需注册,免费版本注册下载早已取消)虽然功能较Workstation少,但已经足够了!这里给出一些版本和下载地址,点击链接直接下载,也可前往:

官方网站下载点击前往!

(以下地址可能已经无效,请前往官网下载————>>>>>官方网站下载)

VMware-player-5.0.0-812388.exe
(VMware Player for Windows 32-bit and 64-bit | 73M)

VMware-Player-5.0.0-812388.i386.bundle
(VMware Player for Linux 32-bit | 206M)

再回头来看看常用的那些工具可以选择免费的开源软件呢?

编辑工具--->Notepad++(Windows)  和TextWrangler(MACosx),JEDIT(http://www.jedit.org/) 可以前往我先前文章:https://www.gigiwangs.com/archives/421

Ftp工具--->  filezilla(MAC AND Windows)  , Cyberduck(MAC);

Office  --->   WPS ,OpenOffice(我想还是WPS吧,的确已经相当不错了!)

Telnet工具--> Putty,Poderosa(当然Mac下有终端!)

其它还望自己动手Google,扔掉破解,换回点软件开发者的可怜的尊严!