开始新对话

此帖子已超过 5 年

Solved!

Go to Solution

2386

2013年12月4日 01:00

Lun expand

系统是sunos5.8  solaris8 oracle 9i  的主机,LUN想做在线 LUN expand 的metalun,存储这边做简单,系统那边是不是需要离线,然后做一些卷管理命令?还有oracle的操作?这里有主机操作熟的人嘛,方便给点操作指引或参考命令?谢谢~

1.2K 消息

2013年12月4日 18:00

以下是Solaris Lun expand 常规操作步骤。对于default和non default partition table的device操作上有些不同。注意:以下步骤操作不当可能引起数据丢失,请在售后工程师指导下进行并做好数据备份。

对于default partition table的device:

由于 partition table会被重写,以下步骤仅适用于有单一文件系统的卷。如果你的情况不符合上述条件,可以更新说明,我会再给出对应的操作步骤。

准备工作(示例为Symmetrix,Clariion也一样):

先从format看一下partition table, 命令显示当前磁盘容量是 12.64 GB:

# format
...
partition> print
Current partition table (original):
Total disk cylinders available: 13807 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0                0         (0/0/0)            0
  1 unassigned    wm       0                0         (0/0/0)            0
  2     backup    wu       0 - 13806       12.64GB    (13807/0/0) 26509440
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm       0                0         (0/0/0)            0
  5 unassigned    wm       0                0         (0/0/0)            0
  6 unassigned    wm       0                0         (0/0/0)            0
  7 unassigned    wm       0                0         (0/0/0)            0

查看整个device是否只有一个文件系统:

# df -k
Filesystem            kbytes    used    avail capacity  Mounted on
/dev/dsk/c0t0d0s0    8187339 5941342  2164124    74%    /
/proc                      0       0        0     0%    /proc
mnttab                     0       0        0     0%    /etc/mnttab
fd                         0       0        0     0%    /dev/fd
swap                 2028792      40  2028752     1%    /var/run
dmpfs                2028752       0  2028752     0%    /dev/vx/dmp
dmpfs                2028752       0  2028752     0%    /dev/vx/rdmp
swap                 2028752       0  2028752     0%    /tmp
/dev/dsk/c2t0d12s2  13046571     160 12915946     1%    /mp/testfs


查看文件系统包含数据:

# ls /mp/testfs
arp.conf        fcip.conf       llc1.conf       ptc.conf        stp4020.conf
audiocs.conf    fcp.conf        lofi.conf       ptsl.conf       sy.conf
audioens.conf   fp.conf         log.conf        qlc.conf        sysmsg.conf
audiots.conf    hci1394.conf    lost+found      ramdisk.conf    tcp6.conf
bofi.conf       icmp6.conf      md.conf         random.conf     tcp.conf
clone.conf      icmp.conf       mm.conf         rts.conf        tl.conf
cn.conf         ifp.conf        nca.conf        sad.conf        udp6.conf
...

1. 存储端执行LUN扩展。你已经执行好的话我们就跳过这步了。有何问题可参考这篇文档:Clariion MetaLun的管理操作

执行好之后Solaris并不会立刻识别该扩展:

# format
...
partition> print
Current partition table (original):
Total disk cylinders available: 13807 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0                0         (0/0/0)            0
  1 unassigned    wm       0                0         (0/0/0)            0
  2     backup    wu       0 - 13806       12.64GB    (13807/0/0) 26509440
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm       0                0         (0/0/0)            0
  5 unassigned    wm       0                0         (0/0/0)            0
  6 unassigned    wm       0                0         (0/0/0)            0
  7 unassigned    wm       0                0         (0/0/0)            0

2. unmount文件系统:

#umount /mp/testfs

3. 执行format,选type 0,auto congigure。

# format
...
Specify disk (enter its number): 14
selecting c2t0d12
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !      - execute , then return
        quit
format> type


AVAILABLE DRIVE TYPES:
        0. Auto configure
        1. Quantum ProDrive 80S
        2. Quantum ProDrive 105S
        3. CDC Wren IV 94171-344
        4. SUN0104
        5. SUN0207
        6. SUN0327
        7. SUN0340
        8. SUN0424
        9. SUN0535
        10. SUN0669
        11. SUN1.0G
        12. SUN1.05
        13. SUN1.3G
        14. SUN2.1G
        15. SUN2.9G
        16. Zip 100
        17. Zip 250
        18. EMC-SYMMETRIX-5771
        19. EMC-SYMMETRIX-5771
        20. EMC-SYMMETRIX-5771
        21. SUN9.0G
        22. EMC-SYMMETRIX-5771
        23. other
Specify disk type (enter its number)[20]: 0
c2t0d12: configured with capacity of 16.85GB

selecting c2t0d12
[disk formatted]

format>

4. 写入新的label:

format> label
Ready to label disk, continue? y

format>

操作系统现在显示扩展后的大小:

format> part


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        ! - execute , then return
        quit
partition> print
Current partition table (default):
Total disk cylinders available: 18410 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -   136      128.44MB    (137/0/0)     263040
  1       swap    wu     137 -   273      128.44MB    (137/0/0)     263040
  2     backup    wu       0 - 18409       16.85GB    (18410/0/0) 35347200
  3 unassigned    wm       0                0         (0/0/0)            0
  4 unassigned    wm       0                0         (0/0/0)            0
  5 unassigned    wm       0                0         (0/0/0)            0
  6        usr    wm     274 - 18409       16.60GB    (18136/0/0) 34821120
  7 unassigned    wm       0                0         (0/0/0)            0

注意:如果只执行auto configure但没有对disk写入label,format会从主机memory读取新的partition table并显示出来,但新配置的空间无法使用,因为label里面还是旧的partition information,这样的话mkfs扩展文件系统将会失败。

5. 现在可以mount并扩展文件系统:

# mount /dev/dsk/c2t0d12s2 /mp/testfs
# /usr/lib/fs/ufs/mkfs -G -M /mp/testfs /dev/rdsk/c2t0d12s2 34821120
/dev/rdsk/c2t0d12s2:    34821120 sectors in 18136 cylinders of 15 tracks, 128 sectors
        17002.5MB in 356 cyl groups (51 c/g, 47.81MB/g, 6016 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98080, 196128, 294176, 392224, 490272, 588320, 686368, 784416, 882464,
Initializing cylinder groups:
......
super-block backups for last 10 cylinder groups at:
33881632, 33979680, 34077728, 34175776, 34273824, 34371872, 34467872,
34565920, 34663968, 34762016,

# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    8187339 5942357 2163109    74%    /
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
swap                 2050960      40 2050920     1%    /var/run
dmpfs                2050920       0 2050920     0%    /dev/vx/dmp
dmpfs                2050920       0 2050920     0%    /dev/vx/rdmp
swap                 2050920       0 2050920     0%    /tmp
/dev/dsk/c2t0d12s2  17137130     160 17006505    1%    /mp/testfs

查看数据是否保留:

# cd /mp/testfs
# ls
arp.conf        fcip.conf       llc1.conf       ptc.conf        stp4020.conf
audiocs.conf    fcp.conf        lofi.conf       ptsl.conf       sy.conf
audioens.conf   fp.conf         log.conf        qlc.conf        sysmsg.conf
audiots.conf    hci1394.conf    lost+found      ramdisk.conf    tcp6.conf
bofi.conf       icmp6.conf      md.conf         random.conf     tcp.conf
clone.conf      icmp.conf       mm.conf         rts.conf        tl.conf
...

# cat fp.conf
#
# Copyright (c) 1999, 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
# Sun Fibre Channel Port driver configuration
#
#ident  "@(#)fp.conf    1.2     01/03/30 SMI"
#

name="fp" class="fibre-channel" port=0;
name="fp" class="fibre-channel" port=1;

#
# List of ULP modules for loading during port driver attach time
#
load-ulp-list="1","fcp";
#
# Force attach driver to support hotplug activity (do not remove the property)
#
ddi-forceattach=1;
#

请点击此处免费订阅论坛每月简报

3.2K 消息

2013年12月4日 03:00

兄弟您还是申请停机时间吧,如果你那边没有使用类似于online JFS的文件系统是不会让你在线不停机做的

222 消息

2013年12月8日 16:00

一般得先离线然后在expand吧。

找不到事件!

Top