在Linux使用ext2resize在线扩展文件系统

一个做Oracle的工程师,笔记本上居然没有一套Oracle环境,说起来还真搞笑。今天要帮老婆倒腾一些数据,没办法,只好先装一套Oracle。在笔记本上已经有一个linux的虚拟机,本来是装DB2的,懒得再重装OS了,打算就在里面装Oracle。

整个系统就一个文件系统,再装完11g软件后,准备建库时发现没有空间了,,数据库就装在根目录下,于是打算给根卷划一些空间,然后在线扩展文件系统。

这次准备用ext2resize工具在线扩展文件系统。

环境: [root@ ~]# uname -aLinux cheneydb2 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

[root@ ~]# cat /etc/RedHat-release Red Hat Enterprise Linux Server release 5.5 (Tikanga)

工具下载路径:ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/openSUSE/repositories/home:/janptitan/SLE_10/x86_64/ext2resize-1.1.19-3.1.x86_64.rpm

划盘:[root@ ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes255 heads, 63 sectors/track, 1958 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 1958 15623212+ 8e Linux LVM

Disk /dev/sdb: 5368 MB, 5368709120 bytes255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes

磁盘分区:

[root@ ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): hh: unknown commandCommand 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): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-652, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-652, default 652): Using default value 652

Command (m for help): wThe partition table has been altered!

Calling ioctl() to re-read partition table.Syncing disks.

[root@ ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes255 heads, 63 sectors/track, 1958 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 1958 15623212+ 8e Linux LVM

Disk /dev/sdb: 5368 MB, 5368709120 bytes255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System/dev/sdb1 1 652 5237158+ 83 Linux

愚者用肉体监视心灵,智者用心灵监视肉体

在Linux使用ext2resize在线扩展文件系统

相关文章:

你感兴趣的文章:

标签云: