顯示具有 CentOS 標籤的文章。 顯示所有文章
顯示具有 CentOS 標籤的文章。 顯示所有文章

2013年5月24日 星期五

[CentOS]Divide the USB drive into multi-partition

There is the reference

http://www.linuxidc.com/Linux/2013-05/84183.htm

Basically, using fdisk in root mode for dividing the partition and using mkfs for format. The full path for those two tools are under /sbin

2013年5月23日 星期四

[CentOS]Change the system language

 Using root account, enter commands which is showed below

system-config-language

A window will pop up and you can choose the system language that you want.

Reboot the PC and finished.

2013年5月22日 星期三

[Linux]Create CentOS Live USB

There are various types of definition on Live USB

1. Using USB to install CentOS into a PC
2. Boost the live CD mode from a USB
3. Divide the USB into two part for boost and install (only suitable for a single PC)
4. Install CentOS into a USB drive and boost on any PC

And I would like to do the fourth one.
In fact, using this software and follow the instruction in the software is OK!!

http://www.linuxliveusb.com/en/download

2013年2月28日 星期四

[CentOS] Extend Logic Volume by LVM

Follow the steps:

http://www.turnkeylinux.org/blog/extending-lvm

More important is the logic step:
PV[s] (Physical Volumes) -> VG[s] (Volume Groups) -> LV[s] (Logical Volumes) -> Filesystems.

There is the picture:

http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/

We need to first add the physical Volume, it is possible by using gparted. And then using lvm for extend the Volume Group size. Next, increase the Logical Volumes. Finally is the Filesystems by using resize2fs.

Please note the those tools (lvm, resize2fs) are located at /sbin. We need to use them by:
cd /sbin
./lvm or ./resize2fs to do this

2013年1月21日 星期一

[CentOS] Display Chinese Char

在自己的機器上裝了個CentOS5.5的虛擬機,做自己學習之用,今天想讓他支持中文,但是切換語言之後,中文顯示的都是方塊字,很是鬱悶,網上找了好 多文章,都是讓我修改、/etc/sysconfig/i18N這個文件,改完之後,注銷退出,沒用,重启好多次,也是沒用,後來看到原來只要安裝2個 RPM文件才可以:fonts-chinese-3.029-9.*.noarch.rpm   和 fonts-ISO8859-2*.rpm包之後再切換成中文,就搞掂了。。。

from: http://world77.blog.51cto.com/414605/472084

[CentOS] Mount NTFS HDD


  1. 下載 rpmforge rpm-release
  2. 執行
    rpm -Uhv rpmforge-release-0.3.6-1.$dist.rf.$arch.rpm

  3. 執行
    yum install dkms dkms-fuse fuse-ntfs-3g
  4. 完成 

from: http://tw.myblog.yahoo.com/weslyyen-0704/article?mid=1230

2013年1月9日 星期三

CentOS LVM Resize

Follow this steps:

Since the release of CentOS 5.5 we noticed that the default CentOS install assigns a considerable amount of its available storage space to Swap. If you don’t catch this during the installation don’t worry, Logical Volume Manager or LVM will rectify this post install.
LVM is a logical volume manager for the Linux kernel; it manages disk drives and similar mass-storage devices, in particular large ones. The term “volume” refers to a disk drive or partition thereof.

Before we start just some general housekeeping. The XEN virtual CentOS 5.5 server (base install) in this tutorial was assigned 10GB of storage with the default partitioning layout.
Let check the amount of disk space available on the file system.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
4.9G 2.4G 2.3G 51% /
/dev/xvda1 99M 23M 72M 25% /boot
tmpfs 4.0G 0 4.0G 0% /dev/shm
Let see the attributes of the logical volumes like size, read/write status, snapshot information
# lvdisplay
— Logical volume —
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID oFXKGg-nBPo-Fk27-3ino-zaHZ-cEcv-fk0dS0
LV Write Access read/write
LV Status available
# open 1
LV Size 5.00 GB
Current LE 160
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0
— Logical volume —
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID Ntffw7-dqPh-Rjhy-rWLv-BGA0-iGik-LoyHET
LV Write Access read/write
LV Status available
# open 1
LV Size 4.88 GB
Current LE 156
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:1
Let’s begin but first turning off swap on the Swap Logical Volume
# swapoff /dev/VolGroup00/LogVol01
Once swap is off let’s take the disk space we require.
# lvresize -L -4GB /dev/VolGroup00/LogVol01
WARNING: Reducing active logical volume to 896.00 MB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce LogVol01? [y/n]: y
Reducing logical volume LogVol01 to 896.00 MB
Logical volume LogVol01 successfully resized
Now let’s add what we removed to the main Logical Volume.
# lvresize -L +4GB /dev/VolGroup00/LogVol00
Extending logical volume LogVol00 to 9.00 GB
Logical volume LogVol00 successfully resized
Resize the File System
# resize2fs -p /dev/VolGroup00/LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/LogVol00 to 2359296 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol00 is now 2359296 blocks long.
Rebuild the swap partition.
# mkswap /dev/VolGroup00/LogVol01
Setting up swapspace version 1, size = 939520 kB
Turn swap on.
# swapon /dev/VolGroup00/LogVol01
Let’s check the amount of disk space available and LVM attributes to see if our changes took effect.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
8.8G 2.4G 6.0G 28% /
/dev/xvda1 99M 23M 72M 25% /boot
tmpfs 4.0G 0 4.0G 0% /dev/shm
# lvdisplay
— Logical volume —
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID oFXKGg-nBPo-Fk27-3ino-zaHZ-cEcv-fk0dS0
LV Write Access read/write
LV Status available
# open 1
LV Size 9.00 GB
Current LE 288
Segments 2
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0
— Logical volume —
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID Ntffw7-dqPh-Rjhy-rWLv-BGA0-iGik-LoyHET
LV Write Access read/write
LV Status available
# open 1
LV Size 896.00 MB
Current LE 28
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:1
From: http://www.how2centos.com/centos-lvm-resizing-guide/
Read more: http://www.how2centos.com/centos-lvm-resizing-guide/#ixzz2HY0dzB6c