Solstice Disk Suite 4.2.1 – Solaris 8

来源:互联网 发布:centos bt下载工具 编辑:程序博客网 时间:2024/04/30 10:28

Solstice Disk Suite 4.2.1 – Solaris 8

 

 

This document details the configuration of Solstice Disk Suite 4.2.1 on a Sun V880 with Solaris 8 2/02 installed. It walks the user through a typical Disk Suite install (mirror the boot disk, stripe & mirror the file systems across the remaining disks). It also covers steps that the Disk Suite documentation leaves out (format, fmthard, and cylinder calculations). The install and configurations are accomplished via the command line and configuration files. In this example, the server only has one controller in its internal disk array. Ideally, file systems should be striped across disks and mirrored across controllers (for performance and redundancy, respectively).

 

Disk Suite provides the ability to grow boot disk file systems on the fly. It does not give the same flexibility for the remaining disks. They must be formatted with future file systems in mind. The file systems are static once created, as they reside on disk slices. This document divides disk space evenly between the available slices (30 GB disk = 6 X 5 GB slices). A striped file system must reside on at least 2 disks. This makes the smallest file system 10 GB. An alternative would be to purchase Veritas Volume Manager. It encapsulates entire disks, allowing for more granular management.

 

During the Solaris installation, ensure there is at least 15 MB on slice 7 of the boot disk. Disk Suite requires this space for the meta database.

 

 

 

SECTION I. INSTALL DISK SUITE

 

Insert the Solaris 8 Software, Disk 2 CD-ROM.

# cd /cdrom/cdrom0/Solaris_8/EA/products/DiskSuite_4.2.1/sparc/Packages

# pkgadd –d .

Respond: all, y, y, y

 

 

 

SECTION II. MIRROR THE BOOT DISK

 

 

COPY THE BOOT DISK’S PARTITION SIZES TO THE MIRROR

 

# prtvtoc -h /dev/rdsk/c1t0d0s2 > /opt/admin/docs/prtvtoc.txt (Saved the partition sizes to a file)

# fmthard -s /opt/admin/docs/prtvtoc.txt /dev/rdsk/c1t1d0s2 (formatted the spare disk with the same partition sizes as the boot disk)

fmthard:  New volume table of contents now in place.

 

 

VERIFY THAT THE PARTITION TABLE WAS ACTUALLY COPIED

 

# format

Searching for disks...done

 

 

AVAILABLE DISK SELECTIONS:

       0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72af60,0

       1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72b6af,0

       2. c1t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72afcc,0

       3. c1t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72ae20,0

       4. c1t4d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72ab36,0

       5. c1t5d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72b14b,0

Specify disk (enter its number): 1

selecting c1t1d0

[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

        !<cmd>     - execute <cmd>, then return

        quit

format> verify

 

Primary label contents:

 

Volume name = <        >

ascii name  = <SUN36G cyl 24620 alt 2 hd 27 sec 107>

pcyl        = 24622

ncyl        = 24620

acyl        =    2

nhead       =   27

nsect       =  107

Part      Tag    Flag     Cylinders         Size            Blocks

  0       root    wm       0 -  8080       11.13GB    (8081/0/0)  23346009

  1       swap    wu    8081 - 13820        7.91GB    (5740/0/0)  16582860

  2     backup    wm       0 - 24619       33.92GB    (24620/0/0) 71127180

  3        usr    wm   13821 - 15998        3.00GB    (2178/0/0)   6292242

  4        var    wm   15999 - 18868        3.95GB    (2870/0/0)   8291430

  5 unassigned    wm   18869 - 21738        3.95GB    (2870/0/0)   8291430

  6 unassigned    wm   21739 - 24608        3.95GB    (2870/0/0)   8291430

  7 unassigned    wm   24609 - 24619       15.52MB    (11/0/0)       31779

 

format> q

 

 

ADD THE PARTITIONS INTO DISK SUITE

 

# cp md.tab md.tab.orig

# vi md.tab  (added the following lines)

d11 1 1 /dev/dsk/c1t0d0s0

d12 1 1 /dev/dsk/c1t1d0s0

 

d1 -m d11

 

d21 1 1 /dev/dsk/c1t0d0s1

d22 1 1 /dev/dsk/c1t1d0s1

 

d2 -m d21

 

d31 1 1 /dev/dsk/c1t0d0s3

d32 1 1 /dev/dsk/c1t1d0s3

 

d3 -m d31

 

d41 1 1 /dev/dsk/c1t0d0d4

d42 1 1 /dev/dsk/c1t1d0d4

 

d4 -m d41

 

d51 1 1 /dev/dsk/c1t0d0s5

d52 1 1 /dev/dsk/c1t1d0s5

 

d5 -m d51

 

d61 1 1 /dev/dsk/c1t0d0s6

d62 1 1 /dev/dsk/c1t1d0s6

 

d6 -m d61

 

# metainit -f d11  (force)

d11: Concat/Stripe is setup

# metainit d1

d1: Mirror is setup

# metaroot d1

# more /etc/vfstab  (confirm that / was added)

#device         device          mount           FS      fsck    mount   mount

#to mount       to fsck         point           type    pass    at boot options

#

#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -

fd      -       /dev/fd fd      -       no      -

/proc   -       /proc   proc    -       no      -

/dev/dsk/c1t0d0s1       -       -       swap    -       no      -

/dev/md/dsk/d1  /dev/md/rdsk/d1 /       ufs     1       no      -

/dev/dsk/c1t0d0s3       /dev/rdsk/c1t0d0s3      /usr    ufs     1       no     

-

/dev/dsk/c1t0d0s4       /dev/rdsk/c1t0d0s4      /var    ufs     1       no     

-

/dev/dsk/c1t0d0s6       /dev/rdsk/c1t0d0s6      /app/oracle/product     ufs    

2       yes     -

/dev/dsk/c1t0d0s7       /dev/rdsk/c1t0d0s7      /metadb ufs     2       yes    

-

/dev/dsk/c1t0d0s5       /dev/rdsk/c1t0d0s5      /opt    ufs     2       yes    

-

swap    -       /tmp    tmpfs   -       yes     -

 

NOTE: The / (root) file system was automatically added to /etc/vfstab.

 

# metainit -f d21

d21: Concat/Stripe is setup

# metainit d2

d2: Mirror is setup

# metainit -f d31

d31: Concat/Stripe is setup

# metainit d3

d3: Mirror is setup

# metainit -f d41

d41: Concat/Stripe is setup

# metainit d4

d4: Mirror is setup

# metainit -f d51

d51: Concat/Stripe is setup

# metainit d5

d5: Mirror is setup

# metainit -f d61

d61: Concat/Stripe is setup

# metainit d6

d6: Mirror is setup

# cp /etc/vfstab /etc/vfstab.orig

# vi /etc/vfstab  (Commented out existing fs entries and created entries in disk suite format)

#device         device          mount           FS      fsck    mount   mount

#to mount       to fsck         point           type    pass    at boot options

#

#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -

fd      -       /dev/fd fd      -       no      -

/proc   -       /proc   proc    -       no      -

#/dev/dsk/c1t0d0s1      -       -       swap    -       no      -

/dev/md/dsk/d2  -       -       swap    -       no      -

/dev/md/dsk/d1  /dev/md/rdsk/d1 /       ufs     1       no      -

#/dev/dsk/c1t0d0s3      /dev/rdsk/c1t0d0s3      /usr    ufs     1       no      -

/dev/md/dsk/d3  /dev/md/rdsk/d3 /usr    ufs     1       no      -

#/dev/dsk/c1t0d0s4      /dev/rdsk/c1t0d0s4      /var    ufs     1       no      -

/dev/md/dsk/d4  /dev/md/rdsk/d4 /var    ufs     1       no      -

#/dev/dsk/c1t0d0s6      /dev/rdsk/c1t0d0s6      /app/oracle/product     ufs     2       yes     -

/dev/md/dsk/d6  /dev/md/rdsk/d6 /app/oracle/product     ufs     2       yes     -

#/dev/dsk/c1t0d0s7      /dev/rdsk/c1t0d0s7      /metadb ufs     2       yes     -

#/dev/dsk/c1t0d0s5      /dev/rdsk/c1t0d0s5      /opt    ufs     2       yes     -

/dev/md/dsk/d5  /dev/md/rdsk/d5 /opt    ufs     2       yes     -

swap    -       /tmp    tmpfs   -       yes     -

# metadb -a c1t0d0s7  (added the metadb to the spare boot disk)

 

# init 6  (This was the first time it was safe to reboot)

 

 

COMPLETE THE MIRRORS

 

# metainit d12

d12: Concat/Stripe is setup

# metattach d1 d12

d1: submirror d12 is attached

# metastat  (output abbreviated)

d1: Mirror

    Submirror 0: d11

      State: Okay        

    Submirror 1: d12

      State: Resyncing    

    Resync in progress: 1 % done

    Pass: 1

    Read option: roundrobin (default)

    Write option: parallel (default)

    Size: 23346009 blocks

 

d11: Submirror of d1

    State: Okay        

    Size: 23346009 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t0d0s0                   0     No    Okay        

 

 

d12: Submirror of d1

    State: Resyncing   

    Size: 23346009 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t1d0s0                   0     No    Okay        

 

# metainit d22

d22: Concat/Stripe is setup

# metattach d2 d22

d2: submirror d22 is attached

# metainit d32

d32: Concat/Stripe is setup

# metattach d3 d32

d3: submirror d32 is attached

# metainit d42

d42: Concat/Stripe is setup

# metattach d4 d42

d4: submirror d42 is attached

# metainit d52

d52: Concat/Stripe is setup

# metattach d5 d52

d5: submirror d52 is attached

# metainit d62

d62: Concat/Stripe is setup

# metattach d6 d62

d6: submirror d62 is attached

# metastat  (output abbreviated)

d2: Mirror

    Submirror 0: d21

      State: Okay        

    Submirror 1: d22

      State: Resyncing   

    Resync in progress: 13 % done

    Pass: 1

    Read option: roundrobin (default)

    Write option: parallel (default)

    Size: 16582860 blocks

 

d21: Submirror of d2

    State: Okay        

    Size: 16582860 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t0d0s1                   0     No    Okay        

 

 

d22: Submirror of d2

    State: Resyncing   

    Size: 16582860 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t1d0s1                   0     No    Okay        

 

 

d3: Mirror

    Submirror 0: d31

      State: Okay        

    Submirror 1: d32

      State: Resyncing    

    Resync in progress: 5 % done

    Pass: 1

    Read option: roundrobin (default)

    Write option: parallel (default)

    Size: 6292242 blocks

 

d31: Submirror of d3

    State: Okay        

    Size: 6292242 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t0d0s3                   0     No    Okay        

 

 

d32: Submirror of d3

    State: Resyncing   

    Size: 6292242 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t1d0s3                   0     No    Okay        

 

 

d4: Mirror

    Submirror 0: d41

      State: Okay        

    Submirror 1: d42

      State: Resyncing   

    Resync in progress: 1 % done

    Pass: 1

    Read option: roundrobin (default)

    Write option: parallel (default)

    Size: 8291430 blocks

 

d41: Submirror of d4

    State: Okay        

    Size: 8291430 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t0d0s4                   0     No    Okay        

 

 

d42: Submirror of d4

    State: Resyncing   

    Size: 8291430 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t1d0s4                   0     No    Okay        

 

 

d5: Mirror

    Submirror 0: d51

      State: Okay        

    Submirror 1: d52

      State: Resyncing   

    Resync in progress: 0 % done

    Pass: 1

    Read option: roundrobin (default)

    Write option: parallel (default)

    Size: 8291430 blocks

 

d51: Submirror of d5

    State: Okay        

    Size: 8291430 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t0d0s5                   0     No    Okay        

 

 

d52: Submirror of d5

    State: Resyncing   

    Size: 8291430 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t1d0s5                   0     No    Okay        

 

 

d6: Mirror

    Submirror 0: d61

      State: Okay        

    Submirror 1: d62

      State: Resyncing   

    Resync in progress: 0 % done

    Pass: 1

    Read option: roundrobin (default)

    Write option: parallel (default)

    Size: 8291430 blocks

 

d61: Submirror of d6

    State: Okay        

    Size: 8291430 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t0d0s6                   0     No    Okay        

 

 

d62: Submirror of d6

    State: Resyncing   

    Size: 8291430 blocks

    Stripe 0:

        Device              Start Block  Dbase State        Hot Spare

        c1t1d0s6                   0     No    Okay        

 

 

 

SECTION III. CREATE STRIPED AND MIRRORED FILE SYSTEMS ON REMAINING DISKS

 

 

ERASE THE PARTITION CONFIGURATIONS ON ONE OF THE DISKS

 

# format

Searching for disks...done

 

 

AVAILABLE DISK SELECTIONS:

       0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72af60,0

       1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72b6af,0

       2. c1t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72afcc,0

       3. c1t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72ae20,0

       4. c1t4d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72ab36,0

       5. c1t5d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>

          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf72b14b,0

Specify disk (enter its number): 2

selecting c1t2d0

[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

        !<cmd>     - execute <cmd>, then return

        quit

format> partition

 

 

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

        !<cmd> - execute <cmd>, then return

        quit

partition> 0

Part      Tag    Flag     Cylinders         Size            Blocks

  0       root    wm       0 -    90      128.37MB    (91/0/0)      262899

 

Enter partition id tag[root]: <enter>

Enter partition permission flags[wm]: <enter>

Enter new starting cyl[0]: <enter>

Enter partition size[262899b, 91c, 128.37mb, 0.13gb]: 0c  (zero cylinders)

partition> 1  (repeat above steps for partitions 1-7)

partition> label  (this saves your configurations to the disk)

Ready to label disk, continue? y

 

partition> q

format> verify  (ensure the configurations are in place)

Primary label contents:

 

Volume name = <        >

ascii name  = <SUN36G cyl 24620 alt 2 hd 27 sec 107>

pcyl        = 24622

ncyl        = 24620

acyl        =    2

nhead       =   27

nsect       =  107

Part      Tag    Flag     Cylinders         Size            Blocks

  0 unassigned    wm       0                0         (0/0/0)            0

  1 unassigned    wu       0                0         (0/0/0)            0

  2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180

  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

 

 

DETERMINE HOW MANY CYLINDERS TO USE FOR EACH SLICE

 

Subtract 20 from the total number of cylinders (in bold above) for the metadb on slice 7 (24619 - 20). Divide the remaining cylinders by the remaining slices (24599 / 6 = 4100).

 

 

CONFIGURE NEW PARTITIONS

 

format> partition

 

 

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

        !<cmd> - execute <cmd>, then return

        quit

partition> 0

Part      Tag    Flag     Cylinders         Size            Blocks

  0 unassigned    wm       0                0         (0/0/0)            0

 

Enter partition id tag[unassigned]: usr 

Enter partition permission flags[wm]: <enter>

Enter new starting cyl[0]: <enter>

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 4100c  (4100 cylinders)

partition> label  (save the configuration to disk)

Ready to label disk, continue? y

 

partition> q

format> verify

 

Primary label contents:

 

Volume name = <        >

ascii name  = <SUN36G cyl 24620 alt 2 hd 27 sec 107>

pcyl        = 24622

ncyl        = 24620

acyl        =    2

nhead       =   27

nsect       =  107

Part      Tag    Flag     Cylinders         Size            Blocks

  0        usr    wm       0 -  4099        5.65GB    (4100/0/0)  11844900

  1 unassigned    wu       0                0         (0/0/0)            0

  2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180

  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

 

NOTE: From the verify, we know that the next partition should start at 4100.

 

format> partition

partition> 1

Part      Tag    Flag     Cylinders         Size            Blocks

  1 unassigned    wu       0                0         (0/0/0)            0

 

Enter partition id tag[unassigned]: usr

Enter partition permission flags[wu]: <enter>

Enter new starting cyl[0]: 4100  (from the verify, above)

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 4100c  (4100 cylinders)

partition> label

Ready to label disk, continue? y  (repeat above steps for partitions 2-6)

partition> q

format> verify

 

Primary label contents:

 

Volume name = <        >

ascii name  = <SUN36G cyl 24620 alt 2 hd 27 sec 107>

pcyl        = 24622

ncyl        = 24620

acyl        =    2

nhead       =   27

nsect       =  107

Part      Tag    Flag     Cylinders         Size            Blocks

  0        usr    wm       0 -  4099        5.65GB    (4100/0/0)  11844900

  1        usr    wu    4100 -  8199        5.65GB    (4100/0/0)  11844900

  2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180

  3        usr    wm    8200 - 12299        5.65GB    (4100/0/0)  11844900

  4        usr    wm   12300 - 16399        5.65GB    (4100/0/0)  11844900

  5        usr    wm   16400 - 20499        5.65GB    (4100/0/0)  11844900

  6        usr    wm   20500 - 24599        5.65GB    (4100/0/0)  11844900

  7 unassigned    wm       0                0         (0/0/0)            0

 

format> partition

partition> 7

Part      Tag    Flag     Cylinders         Size            Blocks

  7 unassigned    wm       0                0         (0/0/0)            0

 

Enter partition id tag[unassigned]: usr

Enter partition permission flags[wm]: <enter>

Enter new starting cyl[0]: 24600

Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 20c

partition> label

Ready to label disk, continue? y

 

partition> q

format> verify  (this is the final configuration)

 

Primary label contents:

 

Volume name = <        >

ascii name  = <SUN36G cyl 24620 alt 2 hd 27 sec 107>

pcyl        = 24622

ncyl        = 24620

acyl        =    2

nhead       =   27

nsect       =  107

Part      Tag    Flag     Cylinders         Size            Blocks

  0        usr    wm       0 -  4099        5.65GB    (4100/0/0)  11844900

  1        usr    wu    4100 -  8199        5.65GB    (4100/0/0)  11844900

  2     backup    wu       0 - 24619       33.92GB    (24620/0/0) 71127180

  3        usr    wm    8200 - 12299        5.65GB    (4100/0/0)  11844900

  4        usr    wm   12300 - 16399        5.65GB    (4100/0/0)  11844900

  5        usr    wm   16400 - 20499        5.65GB    (4100/0/0)  11844900

  6        usr    wm   20500 - 24599        5.65GB    (4100/0/0)  11844900

  7        usr    wm   24600 - 24619       28.21MB    (20/0/0)       57780

 

format> q

# prtvtoc -h /dev/rdsk/c1t2d0s2 > /opt/admin/docs/prtvtoc-disks.txt  (save the partition sizes to a file)

# more /opt/admin/docs/prtvtoc-disks.txt  (ensure the configuration was saved)

       0      4    00          0  11844900  11844899

       1      4    01   11844900  11844900  23689799

       2      5    01          0  71127180  71127179

       3      4    00   23689800  11844900  35534699

       4      4    00   35534700  11844900  47379599

       5      4    00   47379600  11844900  59224499

       6      4    00   59224500  11844900  71069399

       7      4    00   71069400     57780  71127179

 

# fmthard -s /opt/admin/docs/prtvtoc-disks.txt /dev/rdsk/c1t3d0s2  (formatted the next disk with the same partition sizes)

fmthard:  New volume table of contents now in place.

# fmthard -s /opt/admin/docs/prtvtoc-disks.txt /dev/rdsk/c1t4d0s2

fmthard:  New volume table of contents now in place.

# fmthard -s /opt/admin/docs/prtvtoc-disks.txt /dev/rdsk/c1t5d0s2

fmthard:  New volume table of contents now in place.

# metadb –a c1t2d0s7  (added a metadb)

# metadb -a c1t3d0s7

# metadb -a c1t4d0s7

# metadb -a c1t5d0s7

 

 

ADD RAID 0 + 1 FILE SYSTEMS

 

# cd /etc

# cp vfstab vfstab-after-bootmir

# vi vfstab  (add lines)

/dev/md/dsk/d7  /dev/md/rdsk/d7 /ora/u01        ufs     2       yes     -

/dev/md/dsk/d8  /dev/md/rdsk/d8 /ora/u02        ufs     2       yes     -

/dev/md/dsk/d9  /dev/md/rdsk/d9 /app/oracle/admin       ufs     2       yes     -

# cd /etc/lvm

# cp md.tab md.tab-bootmir

# vi md.tab  (add lines)

d71 2 1 /dev/dsk/c1t2d0s0 1 /dev/dsk/c1t3d0s0

d72 2 1 /dev/dsk/c1t4d0s0 1 /dev/dsk/c1t5d0s0

 

d7 -m d71

 

d81 2 1 /dev/dsk/c1t2d0s1 1 /dev/dsk/c1t3d0s1

d82 2 1 /dev/dsk/c1t4d0s1 1 /dev/dsk/c1t5d0s1

 

d8 -m d81

 

d91 2 1 /dev/dsk/c1t2d0s3 1 /dev/dsk/c1t3d0s3

d92 2 1 /dev/dsk/c1t4d0s3 1 /dev/dsk/c1t5d0s3

 

d9 -m d91

# metainit d71

d71: Concat/Stripe is setup

# newfs -m 2 /dev/md/rdsk/d71

newfs: construct a new file system /dev/md/rdsk/d71: (y/n)? y

Cylinder groups must have a multiple of 16 cylinders with the given parameters

Rounded cgsize up to 256

Warning: 1 sector(s) in last cylinder unallocated

/dev/md/rdsk/d71:       23686910 sectors in 8199 cylinders of 27 tracks, 107 sectors

        11565.9MB in 257 cyl groups (32 c/g, 45.14MB/g, 5632 i/g)

super-block backups (for fsck -F ufs -o b=#) at:

 32, 92592, 185152, 277712, 370272, 462832, 555392, 647952, 740512, 833072,

 925632, 1018192, 1110752, 1203312, 1295872, 1388432, 1480992, 1573552,

 1666112, 1758672, 1851232, 1943792, 2036352, 2128912, 2221472, 2314032,

 2406592, 2499152, 2591712, 2684272, 2776832, 2869392, 2958368, 3050928,

 3143488, 3236048, 3328608, 3421168, 3513728, 3606288, 3698848, 3791408,

 3883968, 3976528, 4069088, 4161648, 4254208, 4346768, 4439328, 4531888,

 4624448, 4717008, 4809568, 4902128, 4994688, 5087248, 5179808, 5272368,

 5364928, 5457488, 5550048, 5642608, 5735168, 5827728, 5916704, 6009264,

 6101824, 6194384, 6286944, 6379504, 6472064, 6564624, 6657184, 6749744,

 6842304, 6934864, 7027424, 7119984, 7212544, 7305104, 7397664, 7490224,

 7582784, 7675344, 7767904, 7860464, 7953024, 8045584, 8138144, 8230704,

 8323264, 8415824, 8508384, 8600944, 8693504, 8786064, 8875040, 8967600,

 9060160, 9152720, 9245280, 9337840, 9430400, 9522960, 9615520, 9708080,

 9800640, 9893200, 9985760, 10078320, 10170880, 10263440, 10356000, 10448560,

 10541120, 10633680, 10726240, 10818800, 10911360, 11003920, 11096480,

 11189040, 11281600, 11374160, 11466720, 11559280, 11651840, 11744400,

 11833376, 11925936, 12018496, 12111056, 12203616, 12296176, 12388736,

 12481296, 12573856, 12666416, 12758976, 12851536, 12944096, 13036656,

 13129216, 13221776, 13314336, 13406896, 13499456, 13592016, 13684576,

 13777136, 13869696, 13962256, 14054816, 14147376, 14239936, 14332496,

 14425056, 14517616, 14610176, 14702736, 14791712, 14884272, 14976832,

 15069392, 15161952, 15254512, 15347072, 15439632, 15532192, 15624752,

 15717312, 15809872, 15902432, 15994992, 16087552, 16180112, 16272672,

 16365232, 16457792, 16550352, 16642912, 16735472, 16828032, 16920592,

 17013152, 17105712, 17198272, 17290832, 17383392, 17475952, 17568512,

 17661072, 17750048, 17842608, 17935168, 18027728, 18120288, 18212848,

 18305408, 18397968, 18490528, 18583088, 18675648, 18768208, 18860768,

 18953328, 19045888, 19138448, 19231008, 19323568, 19416128, 19508688,

 19601248, 19693808, 19786368, 19878928, 19971488, 20064048, 20156608,

 20249168, 20341728, 20434288, 20526848, 20619408, 20708384, 20800944,

 20893504, 20986064, 21078624, 21171184, 21263744, 21356304, 21448864,

 21541424, 21633984, 21726544, 21819104, 21911664, 22004224, 22096784,

 22189344, 22281904, 22374464, 22467024, 22559584, 22652144, 22744704,

 22837264, 22929824, 23022384, 23114944, 23207504, 23300064, 23392624,

 23485184, 23577744, 23666720,

 

COMMENT: "-m 2" = 2% of the disk will be set aside for the file system configurations. The default is 10%.

The drawback to this is the superblock is different from the norm. If you need to restore, you must have

the superblock information in bold above.

 

# metainit d7

d7: Mirror is setup

# metainit d72

d72: Concat/Stripe is setup

# metattach d7 d72

d7: submirror d72 is attached

 

# mkdir ora

# cd ora

# mkdir u01

# cd /etc

# vi vfstab  (add lines)

/dev/md/dsk/d7  /dev/md/rdsk/d7 /ora/u01        ufs     2       yes     -

# mount /ora/u01

# df -k

Filesystem            kbytes    used   avail capacity  Mounted on

/dev/md/dsk/d1       11490824  116417 11259499     2%    /

/dev/md/dsk/d3       3096423  802092 2232403    27%    /usr

/proc                      0       0       0     0%    /proc

fd                         0       0       0     0%    /dev/fd

mnttab                     0       0       0     0%    /etc/mnttab

/dev/md/dsk/d4       4080897   49663 3990426     2%    /var

swap                 11677288      16 11677272     1%    /var/run

swap                 11677320      48 11677272     1%    /tmp

/dev/md/dsk/d5       4080897   11139 4028950     1%    /opt

/dev/md/dsk/d6       4080897       9 4040080     1%    /app/oracle/product

/vol/dev/dsk/c0t6d0/sol_8_202_sparc_2

                      211714  211714       0   100%    /cdrom/sol_8_202_sparc_2

/dev/md/dsk/d7       11658394       9 11425218     1%    /ora/u01

 

# metainit d81

d81: Concat/Stripe is setup

# newfs -m 2 /dev/md/rdsk/d81

newfs: construct a new file system /dev/md/rdsk/d81: (y/n)? y

Cylinder groups must have a multiple of 16 cylinders with the given parameters

Rounded cgsize up to 256

/dev/md/rdsk/d81:       23689800 sectors in 8200 cylinders of 27 tracks, 107 sectors

        11567.3MB in 257 cyl groups (32 c/g, 45.14MB/g, 5632 i/g)

super-block backups (for fsck -F ufs -o b=#) at:

 32, 92592, 185152, 277712, 370272, 462832, 555392, 647952, 740512, 833072,

 925632, 1018192, 1110752, 1203312, 1295872, 1388432, 1480992, 1573552,

 1666112, 1758672, 1851232, 1943792, 2036352, 2128912, 2221472, 2314032,

 2406592, 2499152, 2591712, 2684272, 2776832, 2869392, 2958368, 3050928,

 3143488, 3236048, 3328608, 3421168, 3513728, 3606288, 3698848, 3791408,

 3883968, 3976528, 4069088, 4161648, 4254208, 4346768, 4439328, 4531888,

 4624448, 4717008, 4809568, 4902128, 4994688, 5087248, 5179808, 5272368,

 5364928, 5457488, 5550048, 5642608, 5735168, 5827728, 5916704, 6009264,

 6101824, 6194384, 6286944, 6379504, 6472064, 6564624, 6657184, 6749744,

 6842304, 6934864, 7027424, 7119984, 7212544, 7305104, 7397664, 7490224,

 7582784, 7675344, 7767904, 7860464, 7953024, 8045584, 8138144, 8230704,

 8323264, 8415824, 8508384, 8600944, 8693504, 8786064, 8875040, 8967600,

 9060160, 9152720, 9245280, 9337840, 9430400, 9522960, 9615520, 9708080,

 9800640, 9893200, 9985760, 10078320, 10170880, 10263440, 10356000, 10448560,

 10541120, 10633680, 10726240, 10818800, 10911360, 11003920, 11096480,

 11189040, 11281600, 11374160, 11466720, 11559280, 11651840, 11744400,

 11833376, 11925936, 12018496, 12111056, 12203616, 12296176, 12388736,

 12481296, 12573856, 12666416, 12758976, 12851536, 12944096, 13036656,

 13129216, 13221776, 13314336, 13406896, 13499456, 13592016, 13684576,

 13777136, 13869696, 13962256, 14054816, 14147376, 14239936, 14332496,

 14425056, 14517616, 14610176, 14702736, 14791712, 14884272, 14976832,

 15069392, 15161952, 15254512, 15347072, 15439632, 15532192, 15624752,

 15717312, 15809872, 15902432, 15994992, 16087552, 16180112, 16272672,

 16365232, 16457792, 16550352, 16642912, 16735472, 16828032, 16920592,

 17013152, 17105712, 17198272, 17290832, 17383392, 17475952, 17568512,

 17661072, 17750048, 17842608, 17935168, 18027728, 18120288, 18212848,

 18305408, 18397968, 18490528, 18583088, 18675648, 18768208, 18860768,

 18953328, 19045888, 19138448, 19231008, 19323568, 19416128, 19508688,

 19601248, 19693808, 19786368, 19878928, 19971488, 20064048, 20156608,

 20249168, 20341728, 20434288, 20526848, 20619408, 20708384, 20800944,

 20893504, 20986064, 21078624, 21171184, 21263744, 21356304, 21448864,

 21541424, 21633984, 21726544, 21819104, 21911664, 22004224, 22096784,

 22189344, 22281904, 22374464, 22467024, 22559584, 22652144, 22744704,

 22837264, 22929824, 23022384, 23114944, 23207504, 23300064, 23392624,

 23485184, 23577744, 23666720,

 

# metainit d8

d8: Mirror is setup

# metainit d82

d82: Concat/Stripe is setup

# metattach d8 d82

 

# cd /

# mkdir ora

# cd ora

# mkdir u02

# vi /etc/vfstab

/dev/md/dsk/d8  /dev/md/rdsk/d8 /ora/u02        ufs     2       yes     -

# mount /ora/u02

# df -k

Filesystem            kbytes    used   avail capacity  Mounted on

/dev/md/dsk/d1       11490824  116426 11259490     2%    /

/dev/md/dsk/d3       3096423  802092 2232403    27%    /usr

/proc                      0       0       0     0%    /proc

fd                         0       0       0     0%    /dev/fd

mnttab                     0       0       0     0%    /etc/mnttab

/dev/md/dsk/d4       4080897   49687 3990402     2%    /var

swap                 11678000       8 11677992     1%    /var/run

swap                 11678040      48 11677992     1%    /tmp

/dev/md/dsk/d5       4080897   11139 4028950     1%    /opt

/dev/md/dsk/d7       11658394       9 11425218     1%    /ora/u01

/dev/md/dsk/d6       4080897       9 4040080     1%    /app/oracle/product

/vol/dev/dsk/c0t6d0/sol_8_202_sparc_2

                      211714  211714       0   100%    /cdrom/sol_8_202_sparc_2

/dev/md/dsk/d8       11659839       9 11426634     1%    /ora/u02

 

 

 

SECTION IV. APPENDIX

 

/etc/lvm/md.tab

 

# cat md.tab

d11 1 1 /dev/dsk/c1t0d0s0

d12 1 1 /dev/dsk/c1t1d0s0

 

d1 -m d11

 

d21 1 1 /dev/dsk/c1t0d0s1

d22 1 1 /dev/dsk/c1t1d0s1

 

d2 -m d21

 

d31 1 1 /dev/dsk/c1t0d0s3

d32 1 1 /dev/dsk/c1t1d0s3

 

d3 -m d31

 

d41 1 1 /dev/dsk/c1t0d0s4

d42 1 1 /dev/dsk/c1t1d0s4

 

d4 -m d41

 

d51 1 1 /dev/dsk/c1t0d0s5

d52 1 1 /dev/dsk/c1t1d0s5

 

d5 -m d51

 

d61 1 1 /dev/dsk/c1t0d0s6

d62 1 1 /dev/dsk/c1t1d0s6

 

d6 -m d61

 

d71 2 1 /dev/dsk/c1t2d0s0 1 /dev/dsk/c1t3d0s0

d72 2 1 /dev/dsk/c1t4d0s0 1 /dev/dsk/c1t5d0s0

 

d7 -m d71

 

d81 2 1 /dev/dsk/c1t2d0s1 1 /dev/dsk/c1t3d0s1

d82 2 1 /dev/dsk/c1t4d0s1 1 /dev/dsk/c1t5d0s1

 

d8 -m d81

 

d91 2 1 /dev/dsk/c1t2d0s3 1 /dev/dsk/c1t3d0s3

d92 2 1 /dev/dsk/c1t4d0s3 1 /dev/dsk/c1t5d0s3

 

d9 -m d91

 

 

# cat md.tab-bootmir

d11 1 1 /dev/dsk/c1t0d0s0

d12 1 1 /dev/dsk/c1t1d0s0

 

d1 -m d11

 

d21 1 1 /dev/dsk/c1t0d0s1

d22 1 1 /dev/dsk/c1t1d0s1

 

d2 -m d21

 

d31 1 1 /dev/dsk/c1t0d0s3

d32 1 1 /dev/dsk/c1t1d0s3

 

d3 -m d31

 

d41 1 1 /dev/dsk/c1t0d0s4

d42 1 1 /dev/dsk/c1t1d0s4

 

d4 -m d41

 

d51 1 1 /dev/dsk/c1t0d0s5

d52 1 1 /dev/dsk/c1t1d0s5

 

d5 -m d51

 

d61 1 1 /dev/dsk/c1t0d0s6

d62 1 1 /dev/dsk/c1t1d0s6

 

d6 -m d61

 

 

# cat md.tab.orig

#

#ident "@(#)md.tab   1.6     94/11/14 SMI"

#

# md.tab

#

#       metainit utility input file.

#

# The following examples show the format for local metadevices, and a

# similar example for a shared metadevice, where appropiate.  The shared

# metadevices are in the diskset named "blue":

#

# Metadevice database entry:

#

#       mddb01  /dev/dsk/c0t2d0s0 /dev/dsk/c0t0d0s0

#

# Concatenation of devices:

#

#       d10             2 1 /dev/dsk/c0t2d0s0 1 /dev/dsk/c0t0d0s0

#       blue/d10        2 1 /dev/dsk/c2t2d0s0 1 /dev/dsk/c2t0d0s0

#

# Stripe of devices:

#

#       d11             1 2 /dev/dsk/c0t2d0s1 /dev/dsk/c0t0d0s1

#       blue/d11        1 2 /dev/dsk/c2t2d0s1 /dev/dsk/c2t0d0s1

#

# Concatenation of stripes (with a hot spare pool):

#

#       d13             2 2 /dev/dsk/c0t2d0s0 /dev/dsk/c0t0d0s0 /

#                         2 /dev/dsk/c0t2d0s1 /dev/dsk/c0t0d0s1 -h hsp001

#       blue/d13        2 2 /dev/dsk/c2t2d0s0 /dev/dsk/c2t0d0s0 /

#                         2 /dev/dsk/c2t2d0s1 /dev/dsk/c2t0d0s1 -h blue/hsp001

#

# Two way mirror:

#

#       d14             -m d10 d11

#       blue/d14        -m blue/d10 blue/d11

#

# Logging w/components for master and logging device

#

#       d0              -t /dev/dsk/c1t2d0s0 /dev/dsk/c1t0d0s0

#       blue/d0         -t /dev/dsk/c2t2d0s0 /dev/dsk/c2t0d0s0

#

# Logging with mirrored master device and striped logging device

#

#       d1              -t d14 d13

#       blue/d1         -t blue/d14 blue/d13

#

# RAID of devices

#

#       d15             -r /dev/dsk/c1t0d0s0 /dev/dsk/c1t1d0s0 /

#                          /dev/dsk/c1t2d0s0 /dev/dsk/c1t3d0s0

#       blue/d15        -r /dev/dsk/c2t0d0s0 /dev/dsk/c2t1d0s0 /

#                          /dev/dsk/c2t2d0s0 /dev/dsk/c2t3d0s0

#

# Hot Spare Pool of devices

#

#       hsp001          /dev/dsk/c1t0d0s0

#       blue/hsp001     /dev/dsk/c2t0d0s0

 

 

/etc/vfstab

 

# cat vfstab

#device         device          mount           FS      fsck    mount   mount

#to mount       to fsck         point           type    pass    at boot options

#

#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -

fd      -       /dev/fd fd      -       no      -

/proc   -       /proc   proc    -       no      -

#/dev/dsk/c1t0d0s1      -       -       swap    -       no      -

/dev/md/dsk/d2  -       -       swap    -       no      -

/dev/md/dsk/d1  /dev/md/rdsk/d1 /       ufs     1       no      -

#/dev/dsk/c1t0d0s3      /dev/rdsk/c1t0d0s3      /usr    ufs     1       no      -

/dev/md/dsk/d3  /dev/md/rdsk/d3 /usr    ufs     1       no      -

#/dev/dsk/c1t0d0s4      /dev/rdsk/c1t0d0s4      /var    ufs     1       no      -

/dev/md/dsk/d4  /dev/md/rdsk/d4 /var    ufs     1       no      -

#/dev/dsk/c1t0d0s6      /dev/rdsk/c1t0d0s6      /app/oracle/product     ufs     2       yes     -

/dev/md/dsk/d6  /dev/md/rdsk/d6 /app/oracle/product     ufs     2       yes     -

#/dev/dsk/c1t0d0s7      /dev/rdsk/c1t0d0s7      /metadb ufs     2       yes     -

#/dev/dsk/c1t0d0s5      /dev/rdsk/c1t0d0s5      /opt    ufs     2       yes     -

/dev/md/dsk/d5  /dev/md/rdsk/d5 /opt    ufs     2       yes     -

swap    -       /tmp    tmpfs   -       yes     -

/dev/md/dsk/d7  /dev/md/rdsk/d7 /ora/u01        ufs     2       yes     -

/dev/md/dsk/d8  /dev/md/rdsk/d8 /ora/u02        ufs     2       yes     -

/dev/md/dsk/d9  /dev/md/rdsk/d9 /app/oracle/admin       ufs     2       yes     -

 

 

# cat vfstab-bootmir

#device         device          mount           FS      fsck    mount   mount

#to mount       to fsck         point           type    pass    at boot options

#

#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -

fd      -       /dev/fd fd      -       no      -

/proc   -       /proc   proc    -       no      -

#/dev/dsk/c1t0d0s1      -       -       swap    -       no      -

/dev/md/dsk/d2  -       -       swap    -       no      -

/dev/md/dsk/d1  /dev/md/rdsk/d1 /       ufs     1       no      -

#/dev/dsk/c1t0d0s3      /dev/rdsk/c1t0d0s3      /usr    ufs     1       no      -

/dev/md/dsk/d3  /dev/md/rdsk/d3 /usr    ufs     1       no      -

#/dev/dsk/c1t0d0s4      /dev/rdsk/c1t0d0s4      /var    ufs     1       no      -

/dev/md/dsk/d4  /dev/md/rdsk/d4 /var    ufs     1       no      -

#/dev/dsk/c1t0d0s6      /dev/rdsk/c1t0d0s6      /app/oracle/product     ufs     2       yes     -

/dev/md/dsk/d6  /dev/md/rdsk/d6 /app/oracle/product     ufs     2       yes     -

#/dev/dsk/c1t0d0s7      /dev/rdsk/c1t0d0s7      /metadb ufs     2       yes     -

#/dev/dsk/c1t0d0s5      /dev/rdsk/c1t0d0s5      /opt    ufs     2       yes     -

/dev/md/dsk/d5  /dev/md/rdsk/d5 /opt    ufs     2       yes     -

swap    -       /tmp    tmpfs   -       yes     -

 

 

# cat vfstab.orig

#device         device          mount           FS      fsck    mount   mount

#to mount       to fsck         point           type    pass    at boot options

#

#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -

fd      -       /dev/fd fd      -       no      -

/proc   -       /proc   proc    -       no      -

/dev/dsk/c1t0d0s1       -       -       swap    -       no      -

/dev/md/dsk/d1  /dev/md/rdsk/d1 /       ufs     1       no      -

/dev/dsk/c1t0d0s3       /dev/rdsk/c1t0d0s3      /usr    ufs     1       no      -

/dev/dsk/c1t0d0s4       /dev/rdsk/c1t0d0s4      /var    ufs     1       no      -

/dev/dsk/c1t0d0s6       /dev/rdsk/c1t0d0s6      /app/oracle/product     ufs     2       yes     -

/dev/dsk/c1t0d0s7       /dev/rdsk/c1t0d0s7      /metadb ufs     2       yes     -

/dev/dsk/c1t0d0s5       /dev/rdsk/c1t0d0s5      /opt    ufs     2       yes     -

swap    -       /tmp    tmpfs   -       yes     -

 

 

原创粉丝点击