免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4298 | 回复: 2
打印 上一主题 下一主题

通过增加磁盘扩展home空间(原创) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-10 10:54 |只看该作者 |倒序浏览
在一台rx2660上安装了oracle 10gr2,安装完成后,发现所安装目录的磁盘空间已经用完,显示如下:
# bdf -s
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    10485760  297696 10109328    3% /
/dev/vg00/lvol1    1835008  148968 1672968    8% /stand
/dev/vg00/lvol8    8912896 4381896 4496096   49% /var
/dev/vg00/lvol7    7241728 2536272 4668816   35% /usr
/dev/vg00/lvol6    10485760  344520 10062704    3% /tmp
/dev/vg00/lvol5    8765440 4480528 4251496   51% /opt
/dev/vg00/lvol4    5242880 5242792      88  100% /home

解决方案:
1、增加一块73G的SAS硬盘
2、执行ioscan –C disk,找到新硬盘所在路径为0/1/1/0.0.0.1.0
3、安装文件系统
# insf –eH 0/1/1/0.0.0.1.0
4、建立HPUX分区
(1)创建分区文件如下:
# vi /tmp/partitionfile
3
EFI 500MB
HPUX 100%
HPSP 400MB
(2)分区
#idisk –f /tmp/partitionfile –w /dev/rdsk/c1t1d0
idisk version: 1.31
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes

EFI Primary Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x132afc08
        MyLbaLo                   = 0x1
        AlternateLbaLo            = 0x88bb991
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x88bb96e
        Disk GUID                 = 20864d52-7a29-11dd-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x2
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0x478829f4

  Primary Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 20864eb0-7a29-11dd-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0xfa021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 20864ece-7a29-11dd-8003-d6217b60e588
        Starting Lba              = 0xfa022
        Ending Lba                = 0x87f396d
    Partition 3 (HPSP):
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 20864eec-7a29-11dd-8004-d6217b60e588
        Starting Lba              = 0x87f396e
        Ending Lba                = 0x88bb96d

EFI Alternate Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x2451449d
        MyLbaLo                   = 0x88bb991
        AlternateLbaLo            = 0x1
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x88bb96e
        Disk GUID                 = 20864d52-7a29-11dd-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x88bb970
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0x478829f4

  Alternate Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = 20864eb0-7a29-11dd-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0xfa021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = 20864ece-7a29-11dd-8003-d6217b60e588
        Starting Lba              = 0xfa022
        Ending Lba                = 0x87f396d
    Partition 3 (HPSP):  也可以是HPDUMP
        Partition Type GUID       = e2a1e728-32e3-11d6-a682-7b03a0000000
        Unique Partition GUID     = 20864eec-7a29-11dd-8004-d6217b60e588
        Starting Lba              = 0x87f396e
        Ending Lba                = 0x88bb96d

Legacy MBR (MBR Signatures in little endian):
   MBR Signature = 0xf84c8620

Protective MBR
5.安装磁盘驱动程序
# insf -eC disk
insf: Installing special files for sdisk instance 0 address 0/0/2/1.0.16.0.0
insf: Installing special files for sdisk instance 1 address 0/1/1/0.0.0.0.0
insf: Installing special files for sdisk instance 2 address 0/1/1/0.0.0.1.0
6.检查
# ioscan -funC disk
Class        I  H/W Path        Driver         S/W State   H/W Type     Description
====================================================================================
disk         0  0/0/2/1.0.16.0.0  sdisk          CLAIMED     DEVICE       TEAC    DV-28E-N
                               /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk         1  0/1/1/0.0.0.0.0   sdisk          CLAIMED     DEVICE       HP      IR Volume
                               /dev/dsk/c1t0d0     /dev/rdsk/c1t0d0
                               /dev/dsk/c1t0d0s1   /dev/rdsk/c1t0d0s1
                               /dev/dsk/c1t0d0s2   /dev/rdsk/c1t0d0s2
                               /dev/dsk/c1t0d0s3   /dev/rdsk/c1t0d0s3
disk         2  0/1/1/0.0.0.1.0   sdisk          CLAIMED     DEVICE       HP      DG072BB975
                               /dev/dsk/c1t1d0     /dev/rdsk/c1t1d0
                               /dev/dsk/c1t1d0s1   /dev/rdsk/c1t1d0s1
                               /dev/dsk/c1t1d0s2   /dev/rdsk/c1t1d0s2
                               /dev/dsk/c1t1d0s3   /dev/rdsk/c1t1d0s3
#
7.在新分区上建设物理卷
#pvcreate /dev/rdsk/c1t1d0s2
8.新PV加入卷组vg00
#vgextend /dev/vg00 /dev/dsk/c1t1d0s2
9.扩展逻辑卷/dev/vg00/lvol4到9G
#lvextend –L 9000 /dev/vg00/lvol4 /dev/dsk/c1t1d0s2
由于此时lvol4 mount在/home下,不能扩展其文件系统,所以需要进入单用户状态
10.扩展lvol4文件系统
#extendfs –F vxfs /dev/vg00/rlvol4
11.检查无误后,重新启动系统
#mount /home
#bdf | grep home
/dev/vg00/lvol4    9224192 5157408 4035024   56% /home
可以发现此时空间已经为9G,利用率已经降为56%,扩展成功。

论坛徽章:
0
2 [报告]
发表于 2008-12-26 17:13 |只看该作者
学习学习!!!!!!!!

论坛徽章:
0
3 [报告]
发表于 2008-12-26 21:15 |只看该作者
比较奇怪,为什么不直接加入vg呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP