2012年9月8日 星期六

[VMware][Ubuntu] How to expand VM disk on Linux

Vmware setting
VM --> Setting --> Utilities --> Expand --> adjust "Maximum disk size"

Restart the OS

In Linux OS Type
#fdisk /dev/sda
#Command (m for help): n
#Command (m for help): p (create primary)
#Command (m for help): 3 (Create /dev/sda3)
I assign the full partition to sda3.
So I press enter two times.
#Command (m for help): w (write my modify to partition)

Reboot the OS

Check the original partitiondf -T
file system      Type     1K-block      used    can use     used%   mount point
/dev/sda1        ext4    19222656     5561588  12684532    31%   /

According to file system of sda1.

Format the new partition
mkfs.ext4 /dev/sda3

method 1:
mkdir /media/happy -p
mount /dev/sda3 /media/happy (mount /dev/sda3 to /media/happy)

method 2:
When System start up, system will mount automatically
mkdir /media/happy -p
cp /etc/fstab /etc/fstab.bak
vim /etc/fstab
Add "/dev/sda3    /media/happy ext4 defaults 0 0"
mount -a (auto mount when don't want to restart OS)

When OS start, ln will link automatic

Fedora 12

vim /etc/rc.d/rc.local
Add
ln -sf /media/happy /home/user/happy

When OS restart
cd /home/user/happy will be linked automatically


Reference :

Related Posts:

  • [tex] 目錄超連結符合元智大學論文格式的 LaTeX 格式檔。(v.2.0, 4/5/2009: 新增中文數字章別,如「第一章」,以及產生含超連結、書籤的 pdf )(詳見所含之 ReadMe檔)(依格式所產生的論文範例 pdf。元智大學論文格式規範可以在「元智教務處 學生專區 畢業/離校 學位論文格式規範」這… Read More
  • [tex] 將 latex 轉成 word 檔LATEX2RTF Reference :http://blog.xuite.net/springman/jobs/42584621?ref=rel… Read More
  • [Linux Kernel ] 學習 Linux KernelLinux Kernel in a Nutshell 作者 Greg Kroah-Hartman決定將這本書公開給所有人免費 download. 內容是有關如何 compile 及 設定 Linux kernel 的參數,算是不錯的書,雖然我是用不太到,不過人家都公開了,當然也是可以看看別人的僱和自… Read More
  • [ftp] filezilla catch filefilezilla is a good ftp client.… Read More
  • [tex] 版面設定http://en.wikibooks.org/wiki/LaTeX/Page_Layout… Read More

0 意見:

張貼留言