Friday, February 12, 2016

resize zfs fs


Request a new Large size LUN

Storage team allocated ID/LUN --> 029b /10

Login to your control domain and assign new LUN with bigger size to LDOM.

[root@physical-p01]# echo | format | grep 029b
          /scsi_vhci/ssd@g6000d310006d6400000000000000029b
[root@physical-p01]# echo | format | grep -i 029b
c0t6000D310006D6400000000000000029Bd0: configured with capacity of 75.00GB
       6. c0t6000D310006D6400000000000000029Bd0 <COMPELNT-CompellentVol-0605 cyl 49898 alt 2 hd 8 sec 394>
          /scsi_vhci/ssd@g6000d310006d6400000000000000029b

Find the LUN #, under "Device Address 5000d310006d6433,a" you see a, which is on hex. Convert hex to decimal and you will get 10. Since hex start from 1-9 and starts from a-f and goes to number.
[root@physical-p01]# luxadm display /dev/rdsk/c0t6000D310006D6400000000000000029Bd0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c0t6000D310006D6400000000000000029Bd0s2
  Vendor:               COMPELNT
  Product ID:           Compellent Vol
  Revision:             0605
  Serial Num:           00006d64-0000029b
  Unformatted capacity: 76800.000 MBytes
  Read Cache:           Enabled
    Minimum prefetch:   0x1
    Maximum prefetch:   0xf000
  Device Type:          Disk device
  Path(s):
  /dev/rdsk/c0t6000D310006D6400000000000000029Bd0s2
  /devices/scsi_vhci/ssd@g6000d310006d6400000000000000029b:c,raw
   Controller           /devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0
    Device Address              5000d310006d6433,a
    Host controller port WWN    21000024ff39f151
    Class                       primary
    State                       ONLINE
   Controller           /devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0/fp@0,0
    Device Address              5000d310006d6432,a
    Host controller port WWN    21000024ff39f150
    Class                       primary
    State                       ONLINE
   Controller           /devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0/fp@0,0
    Device Address              5000d310006d6434,a
    Host controller port WWN    21000024ff39f150
    Class                       primary
    State                       ONLINE
   Controller           /devices/pci@400/pci@2/pci@0/pci@1/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0
    Device Address              5000d310006d6431,a
    Host controller port WWN    21000024ff39f151
    Class                       primary
    State                       ONLINE
[root@physical-p01]#

[root@physical-p01]# ldm list-services | grep  -i 029b
[root@physical-p01]# ldm list-bindings | grep -i DL10

[root@physical-p01]# ldm add-vdsdev /dev/dsk/c0t6000D310006D6400000000000000029Bd0s2 DL10@primary-vds0
[root@physical-p01]# ldm add-vdisk VDL10 DL10@primary-vds0 virtual-v01

1. Login to your LDOM
[root@virtual-v01]# df -h
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/aBE01252016
                        59G    11G   1.1G    91%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    22G   368K    22G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/platform/sun4v/lib/libc_psr/libc_psr_hwcap3.so.1
                        12G    11G   1.1G    91%    /platform/sun4v/lib/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap3.so.1
                        12G    11G   1.1G    91%    /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                    22G     8K    22G     1%    /tmp
swap                    22G    48K    22G     1%    /var/run
rpool2/export           59G    32K   1.1G     1%    /export
rpool2/export/home      59G   8.9M   1.1G     1%    /export/home
rpool2                  59G   106K   1.1G     1%    /rpool
2. Get Control Domain info
[root@virtual-v01]# virtinfo
Domain role: LDoms guest
[root@virtual-v01]# virtinfo  -a
Domain role: LDoms guest
Domain name: virtual-v01
Domain UUID: 822634cd-3d47-67bd-da06-faf474607054
Control domain: physical-p01
Chassis serial#: 1151BDY12C

3. Request a new LUN
[root@virtual-v01]# echo | format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0d0 <COMPELNT-CompellentVol-0603 cyl 49930 alt 2 hd 8 sec 315>
          /virtual-devices@100/channel-devices@200/disk@0
Specify disk (enter its number): Specify disk (enter its number):
[root@virtual-v01]# echo | format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0d0 <COMPELNT-CompellentVol-0603 cyl 49930 alt 2 hd 8 sec 315>
          /virtual-devices@100/channel-devices@200/disk@0
       1. c0d1 <COMPELNT-CompellentVol-0605 cyl 49898 alt 2 hd 8 sec 394>
          /virtual-devices@100/channel-devices@200/disk@1
Specify disk (enter its number): Specify disk (enter its number):
[root@virtual-v01]# format c0d1
selecting c0d1
[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> p

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> p
Current partition table (original):
Total disk cylinders available: 49898 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 49897       75.00GB    (49898/0/0) 157278496
  1 unassigned    wu       0                0         (0/0/0)             0
  2     backup    wu       0 - 49897       75.00GB    (49898/0/0) 157278496
  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
partition> q

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> q
[root@virtual-v01]# zpool list
NAME     SIZE  ALLOC   FREE  CAP  HEALTH  ALTROOT
rpool2  59.5G  56.8G  2.66G  95%  ONLINE  -
[root@virtual-v01]# zpool add rpool2 c0d1
cannot label 'c0d1': EFI labeled devices are not supported on root pools.

[root@virtual-v01]# format -e c0d1
selecting c0d1
[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
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> p

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> p
Current partition table (original):
Total disk cylinders available: 49898 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 49897       75.00GB    (49898/0/0) 157278496
  1 unassigned    wu       0                0         (0/0/0)             0
  2     backup    wu       0 - 49897       75.00GB    (49898/0/0) 157278496
  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
partition> p
Current partition table (original):
Total disk cylinders available: 49898 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 49897       75.00GB    (49898/0/0) 157278496
  1 unassigned    wu       0                0         (0/0/0)             0
  2     backup    wu       0 - 49897       75.00GB    (49898/0/0) 157278496
  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
partition> label
[0] SMI Label
[1] EFI Label
Specify Label type[0]:
Ready to label disk, continue? y
partition> q

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
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> q
[root@virtual-v01]# zpool add rpool2 c0d1
cannot label 'c0d1': EFI labeled devices are not supported on root pools.
[root@virtual-v01]# format -e c0d1
selecting c0d1
[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
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> p

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> p
Current partition table (original):
Total disk cylinders available: 49898 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 49897       75.00GB    (49898/0/0) 157278496
  1 unassigned    wu       0                0         (0/0/0)             0
  2     backup    wu       0 - 49897       75.00GB    (49898/0/0) 157278496
  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
partition> q

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
        scsi       - independent SCSI mode selects
        cache      - enable, disable or query SCSI disk cache
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> q
[root@virtual-v01]# zpool add rpool2 c0d1
cannot label 'c0d1': EFI labeled devices are not supported on root pools.
[root@virtual-v01]# zpool status
  pool: rpool2
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scan: resilvered 47.0G in 0h6m with 0 errors on Fri Dec  6 13:24:56 2013
config:
        NAME        STATE     READ WRITE CKSUM
        rpool2      ONLINE       0     0     0
          c0d0s0    ONLINE       0     0     0
errors: No known data errors
[root@virtual-v01]# zpool add rpool2 c0d1s0
cannot add to 'rpool2': root pool can not have multiple vdevs or separate logs
[root@virtual-v01]# format c0d0
selecting c0d0
[disk formatted]
/dev/dsk/c0d0s0 is part of active ZFS pool rpool2. Please see zpool(1M).
/dev/dsk/c0d0s2 is part of active ZFS pool rpool2. Please see zpool(1M).

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> p

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> p
Current partition table (original):
Total disk cylinders available: 49930 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 49929       60.00GB    (49930/0/0) 125823600
  1 unassigned    wu       0                0         (0/0/0)             0
  2     backup    wu       0 - 49929       60.00GB    (49930/0/0) 125823600
  3 unassigned    wu       0                0         (0/0/0)             0
  4 unassigned    wu       0                0         (0/0/0)             0
  5 unassigned    wu       0                0         (0/0/0)             0
  6 unassigned    wu       0                0         (0/0/0)             0
  7 unassigned    wu       0                0         (0/0/0)             0
partition> q

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> q
[root@virtual-v01]# zpool attach rpool2 c0d0s0 c0d1s0
Make sure to wait until resilver is done before rebooting.
[root@virtual-v01]# zpool status
  pool: rpool2
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scan: resilver in progress since Mon Feb  8 15:15:46 2016
    2.27G scanned out of 56.8G at 66.3M/s, 0h14m to go
    2.27G resilvered, 3.99% done
config:
        NAME        STATE     READ WRITE CKSUM
        rpool2      ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            c0d0s0  ONLINE       0     0     0
            c0d1s0  ONLINE       0     0     0  (resilvering)
errors: No known data errors
[root@virtual-v01]# zpool status
  pool: rpool2
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scan: resilver in progress since Mon Feb  8 15:15:46 2016
    55.3G scanned out of 56.8G at 135M/s, 0h0m to go
    55.3G resilvered, 97.32% done
config:
        NAME        STATE     READ WRITE CKSUM
        rpool2      ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            c0d0s0  ONLINE       0     0     0
            c0d1s0  ONLINE       0     0     0  (resilvering)
errors: No known data errors
[root@virtual-v01]# zpool status
  pool: rpool2
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scan: resilvered 56.8G in 0h7m with 0 errors on Mon Feb  8 15:23:05 2016
config:
        NAME        STATE     READ WRITE CKSUM
        rpool2      ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            c0d0s0  ONLINE       0     0     0
            c0d1s0  ONLINE       0     0     0
errors: No known data errors
[root@virtual-v01]# zfs list
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
rpool2                               57.5G  1.10G   106K  /rpool
rpool2/ROOT                          20.8G  1.10G    31K  legacy
rpool2/ROOT/aBE01252016              14.2G  1.10G  11.0G  /
rpool2/ROOT/aBE01252016@aBE01252016  3.20G      -  12.9G  -
rpool2/ROOT/pBE10202015              6.59G  1.10G  17.0G  /
rpool2/dump                          16.0G  1.10G  16.0G  -
rpool2/export                        8.98M  1.10G    32K  /export
rpool2/export/home                   8.95M  1.10G  8.95M  /export/home
rpool2/swap                          20.6G  1.73G  20.0G  -
[root@virtual-v01]# zpool status
  pool: rpool2
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scan: resilvered 56.8G in 0h7m with 0 errors on Mon Feb  8 15:23:05 2016
config:
        NAME        STATE     READ WRITE CKSUM
        rpool2      ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            c0d0s0  ONLINE       0     0     0
            c0d1s0  ONLINE       0     0     0
errors: No known data errors

[root@virtual-v01]# zpool detach rpool2 c0d0s0
[root@virtual-v01]# zpool status
  pool: rpool2
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scan: resilvered 56.8G in 0h7m with 0 errors on Mon Feb  8 15:23:05 2016
config:
        NAME        STATE     READ WRITE CKSUM
        rpool2      ONLINE       0     0     0
          c0d1s0    ONLINE       0     0     0
errors: No known data errors
[root@virtual-v01]# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0d1s0
[root@virtual-v01]#
[root@virtual-v01]# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/aBE01252016
                        59G    11G   1.1G    91%    /
[root@virtual-v01]# uname -a
SunOS virtual-v01 5.10 Generic_150400-30 sun4v sparc sun4v
[root@virtual-v01]# zpool scrub rpool2
[root@virtual-v01]# zpool status
  pool: rpool2
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scan: scrub in progress since Mon Feb  8 15:26:29 2016
    1.52G scanned out of 56.8G at 260M/s, 0h3m to go
    0 repaired, 2.68% done
config:
        NAME        STATE     READ WRITE CKSUM
        rpool2      ONLINE       0     0     0
          c0d1s0    ONLINE       0     0     0
errors: No known data errors
[root@virtual-v01]# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/aBE01252016
                        59G    11G   1.1G    91%    /
[root@virtual-v01]# zpool set autoexpand=on rpool2
[root@virtual-v01]# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/aBE01252016
                        73G    11G   1.1G    91%    /
[root@virtual-v01]# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/aBE01252016
                        73G    11G    16G    42%    /
[root@virtual-v01]#

[root@virtual-v01]# df -h /
Filesystem             size   used  avail capacity  Mounted on
rpool2/ROOT/aBE01252016
                        73G    11G    16G    42%    /
[root@virtual-v01]# zfs list
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
rpool2                               57.5G  15.9G   106K  /rpool
rpool2/ROOT                          20.8G  15.9G    31K  legacy
rpool2/ROOT/aBE01252016              14.2G  15.9G  11.0G  /
rpool2/ROOT/aBE01252016@aBE01252016  3.20G      -  12.9G  -
rpool2/ROOT/pBE10202015              6.59G  15.9G  17.0G  /
rpool2/dump                          16.0G  15.9G  16.0G  -
rpool2/export                        8.98M  15.9G    32K  /export
rpool2/export/home                   8.95M  15.9G  8.95M  /export/home
rpool2/swap                          20.6G  16.5G  20.0G  -
[root@virtual-v01]#

Now, initiate a reboot command
Verify you are rebooting right server.
[root@virtual-v01]# ifconfig -a
[root@virtual-v01]# init 6

Now, login to console for LDOM
[root@physical-p01]# ldm list virtual-v01
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
virtual-v01      active     -n----  5002    16    4G       2.9%  13d 22h 29m
[root@physical-p01]# telnet 0 5002
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Connecting to console "virtual-v01" in group "virtual-v01" ....
Press ~? for control options ..


virtual-v01 console login: kbhusal
Password:
Last login: Mon Feb  8 14:01:03 from 172.16.253.250
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
[kbhusal@virtual-v01]$ sudo su -
Feb  8 15:29:20 virtual-v01 sudo:  kbhusal : TTY=console ; PWD=/export/home/kbhusal ; USER=root ; C               OMMAND=/usr/bin/su -
Feb  8 15:29:20 virtual-v01 su: 'su root' succeeded for kbhusal on /dev/console
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
You have new mail.
[root@virtual-v01]# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.222.102.48 netmask ffffff80 broadcast 10.222.102.127
        ether 0:14:4f:fb:f0:11
[root@virtual-v01]# init 6
[root@virtual-v01]# svc.startd: The system is coming down.  Please wait.
svc.startd: 80 system services are now being stopped.
syncing file systems... done
rebooting...
Resetting...

SPARC T4-4, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.34.2.a, 4096 MB memory available, Serial #83537352.
Ethernet address 0:14:4f:fa:ad:c8, Host ID: 84faadc8.

Boot device: disk  File and args:
detached mirror
Can't mount root
Evaluating:
The file just loaded does not appear to be executable.
{0} ok boot -L

SPARC T4-4, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.34.2.a, 4096 MB memory available, Serial #83537352.
Ethernet address 0:14:4f:fa:ad:c8, Host ID: 84faadc8.

Boot device: /virtual-devices@100/channel-devices@200/disk@0  File and args: -L
detached mirror
Can't mount root
Evaluating:
The file just loaded does not appear to be executable.
{0} ok boot /virtual-devices@100/channel-devices@200/disk@0

SPARC T4-4, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.34.2.a, 4096 MB memory available, Serial #83537352.
Ethernet address 0:14:4f:fa:ad:c8, Host ID: 84faadc8.

Boot device: /virtual-devices@100/channel-devices@200/disk@0  File and args:
detached mirror
Can't mount root
Evaluating:
The file just loaded does not appear to be executable.
{0} ok printenv
Variable Name           Value                          Default Value
ttya-rts-dtr-off        false                          false
ttya-ignore-cd          true                           true
keyboard-layout
reboot-command
security-mode           none                           No default
security-password                                      No default
security-#badlogins     0                              No default
verbosity               min                            min
diag-switch?            false                          false
local-mac-address?      true                           true
fcode-debug?            false                          false
scsi-initiator-id       7                              7
oem-logo                                               No default
oem-logo?               false                          false
oem-banner                                             No default
oem-banner?             false                          false
ansi-terminal?          true                           true
screen-#columns         80                             80
screen-#rows            34                             34
ttya-mode               9600,8,n,1,-                   9600,8,n,1,-
output-device           virtual-console                virtual-console
input-device            virtual-console                virtual-console
auto-boot-on-error?     false                          false
load-base               16384                          16384
auto-boot?              false                          true
network-boot-arguments
boot-command            boot                           boot
boot-file
boot-device             disk net                       disk net
multipath-boot?         false                          false
boot-device-index       0                              0
use-nvramrc?            false                          false
nvramrc
error-reset-recovery    boot                           boot
{0} ok boot disk1

SPARC T4-4, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.34.2.a, 4096 MB memory available, Serial #83537352.
Ethernet address 0:14:4f:fa:ad:c8, Host ID: 84faadc8.

Boot device: /virtual-devices@100/channel-devices@200/disk@0  File and args: disk1
detached mirror
Can't mount root
Evaluating:
The file just loaded does not appear to be executable.
{0} ok show-disks
a) /virtual-devices@100/channel-devices@200/disk@1
b) /virtual-devices@100/channel-devices@200/disk@0
c) /iscsi-hba/disk
q) NO SELECTION
Enter Selection, q to quit: a
/virtual-devices@100/channel-devices@200/disk@1 has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
         for creating devalias mydev for /virtual-devices@100/channel-devices@200/disk@1
{0} ok nvalias altboot1 /virtual-devices@100/channel-devices@200/disk@1
{0} ok boot altboot1

SPARC T4-4, No Keyboard
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.34.2.a, 4096 MB memory available, Serial #83537352.
Ethernet address 0:14:4f:fa:ad:c8, Host ID: 84faadc8.

Boot device: /virtual-devices@100/channel-devices@200/disk@1  File and args:
SunOS Release 5.10 Version Generic_150400-30 64-bit
Copyright (c) 1983, 2015, Oracle and/or its affiliates. All rights reserved.
Hostname: virtual-v01
McAfee HIP Kernel Module (12/15/13 16:05:24) initializing.
NOTICE: mcafee_hip loaded
Configuring devices.

virtual-v01 console login:

[root@virtual-v01]# df -h /
[root@virtual-v01]# eeprom boot-device="altboot1 disk net"

Now, go to Control domain and remove old LUN

[root@physical-p01]# ldm remove-vdisk VDL23 virtual-v01
[root@physical-p01]# ldm remove-vdsdev DL23@primary-vds0

[root@physical-p01]# ldm list-bindings virtual-v01 | grep -i disk
    boot-device=altboot1 disk net
    nvramrc=devalias altboot1 /virtual-devices@100/channel-devices@200/disk@1
DISK
    VDL10            DL10@primary-vds0                1    disk@1  primary
[root@physical-p01]# ldm list-services | grep -i DL10
                                      DL10                                           /dev/dsk/c0t6000D310006D6400000000000000029Bd0s2
[root@physical-p01]#

 

No comments:

Post a Comment