Skip to content

My First Time Story: Playing Around With LDoms + SVM

Prologue & Objective
I’ve a Sun Logical Domains (LDoms) system, I want to assign disk from primary domain to guest domain. Then, I want to use Solaris Volume Manager (SVM) to configure the disk.

    1. On primary domain, use formatto select particular disk and do labelling.
      Specify disk (enter its number): 14
      selecting c0t600508B40006BABC00029000036F0000d0
      [disk formatted]
      Disk not labeled.  Label it now? y
      
      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> q
    2. Specify the device to be exported by the virtual disk server as a virtual disk to the guest domain
      bash-3.00# ldm add-vdsdev /dev/dsk/c0t600508B40006BABC00029000036F0000d0s2 ldom1-U12012-clu3@primary-vds1
    3. Add a virtual disk to the guest domain.
      bash-3.00# ldm add-vdisk ldom1-vdisk-U12012-clu3 ldom1-U12012-clu3@primary-vds1 ldom1
    4. Verify the virtual disk to ensure it’s seen on primary & guest domain
      bash-3.00# ldm list -o disk primary ldom1
      NAME
      primary
      
      VDS
          NAME             VOLUME         OPTIONS          MPGROUP        DEVICE
          primary-vds0     ldom2-vol0                                     /dev/dsk/c0t5000C5004290EFDFd0s2
                           ldom2-vol1                                     /dev/dsk/c0t5000C500428956F7d0s2
                           solaris102-iso                                 /mnt/s101.iso
                           ldom1-vol0                                     /dev/dsk/c0t5000C5004290BB1Bd0s2
                           ldom1-vol1                                     /dev/dsk/c0t5000C5004290BD3Fd0s2
                           solaris10-iso                                  /mnt/s10.iso
          primary-vds1     ldom1-hp01                                     /dev/dsk/c0t600508B40006BABC00029000032D0000d0s2
                           ldom1-hp02                                     /dev/dsk/c0t600508B40006BABC0002900003390000d0s2
                           ldom1-U12012-ora                                 /dev/dsk/c0t600508B40006BABC00029000033F0000d0s2
                           ldom1-U12012-cat                                 /dev/dsk/c0t600508B40006BABC0002900003440000d0s2
                           ldom1-U12012-HL2                                 /dev/dsk/c0t600508B40006BABC00029000034B0000d0s2
                           ldom1-U12012-cu1                                 /dev/dsk/c0t600508B40006BABC00029000034E0000d0s2
                           ldom1-U12012-cu2                                 /dev/dsk/c0t600508B40006BABC0002900003570000d0s2
                           ldom1-U12012-cu3                                 /dev/dsk/c0t600508B40006BABC00029000035A0000d0s2
                           ldom1-U12012-cu4                                 /dev/dsk/c0t600508B40006BABC0002900003630000d0s2
                           ldom1-U12012-cu5                                 /dev/dsk/c0t600508B40006BABC0002900003660000d0s2
                           ldom1-U12012-clu3                                 /dev/dsk/c0t600508B40006BABC00029000036F0000d0s2
      
      ------------------------------------------------------------------------------
      NAME
      ldom1
      
      DISK
          NAME             VOLUME                      TOUT ID   DEVICE  SERVER         MPGROUP
          ldom1-vdisk0     ldom1-vol0@primary-vds0          0    disk@0  primary
          ldom1-vdisk1     ldom1-vol1@primary-vds0          1    disk@1  primary
          s10DVD           solaris10-iso@primary-vds0       2    disk@2  primary
          ldom1-vdiskhp01  ldom1-hp01@primary-vds1          3    disk@3  primary
          ldom1-vdiskhp02  ldom1-hp02@primary-vds1          4    disk@4  primary
          ldom1-vdisk-U12012-ora ldom1-U12012-ora@primary-vds1      5    disk@5  primary
          ldom1-vdisk-U12012-cat ldom1-U12012-cat@primary-vds1      6    disk@6  primary
          ldom1-vdisk-U12012-HL2 ldom1-U12012-HL2@primary-vds1      7    disk@7  primary
          ldom1-vdisk-U12012-cu1 ldom1-U12012-cu1@primary-vds1      8    disk@8  primary
          ldom1-vdisk-U12012-cu2 ldom1-U12012-cu2@primary-vds1      9    disk@9  primary
          ldom1-vdisk-U12012-cu3 ldom1-U12012-cu3@primary-vds1      10   disk@10 primary
          ldom1-vdisk-U12012-cu4 ldom1-U12012-cu4@primary-vds1      11   disk@11 primary
          ldom1-vdisk-U12012-cu5 ldom1-U12012-cu5@primary-vds1      12   disk@12 primary
          ldom1-vdisk-U12012-clu3 ldom1-U12012-clu3@primary-vds1      13   disk@13 primary
      At this point, we're done with LDOMs-thingy and we can leave primary domain.

 

  • On guest domain, use formatto verify & label the new added disk.
    Specify disk (enter its number): 12
    selecting c0d13
    [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> 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
            ! - execute , then return
            quit
    partition> p
    Current partition table (original):
    Total disk cylinders available: 63963 + 2 (reserved cylinders)
    
    Part      Tag    Flag     Cylinders         Size            Blocks
      0       root    wm       0                0         (0/0/0)              0
      1       swap    wu       0                0         (0/0/0)              0
      2     backup    wu       0 - 63962        1.44TB    (63963/0/0) 3082696785
      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       0 - 63962        1.44TB    (63963/0/0) 3082696785
      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
            !     - execute , then return
            quit
    format> l
    Ready to label disk, continue? y
    
    format> q

 

 

  • Create a volume (so-called volume group)
    root@ayam74 # metainit -f d380 1 1 c0d13s6
    d380: Concat/Stripe is setup
  • Create a soft-partition from the newly created volume (so-called logical volume)
    root@ayam74 # metainit d381 -p d380 1469gb
    d381: Soft Partition is setup
  • Verify,
    root@ayam74 # metastat d381
    d381: Soft Partition
        Device: d380
        State: Okay
        Size: 3080716288 blocks (1.4 TB)
            Extent              Start Block              Block count
                 0                    48224               3080716288
    
    d380: Concat/Stripe
        Size: 3082696785 blocks (1.4 TB)
        Stripe 0:
            Device    Start Block  Dbase        State Reloc Hot Spare
            c0d13s6          0     No            Okay   Yes
    
    Device Relocation Information:
    Device   Reloc  Device ID
    c0d13   Yes     id1,vdc@n600508b40006babc00029000036f0000
  • Create the filesystem
    root@ayam74 # newfs /dev/md/dsk/d381
    newfs: construct a new file system /dev/md/rdsk/d381: (y/n)? y
    mkfs: bad value for ntrack: -1 must be between 1 and 2147483647
    mkfs: ntrack reset to default 16
    Warning: 1856 sector(s) in last cylinder unallocated
    /dev/md/rdsk/d381:      3080716288 sectors in 1018756 cylinders of 16 tracks, 189 sectors
            1504256.0MB in 5660 cyl groups (180 c/g, 265.78MB/g, 320 i/g)
    super-block backups (for fsck -F ufs -o b=#) at:
     32, 544544, 1089056, 1633568, 2178080, 2722592, 3267104, 3811616, 4356128,
     4900640,
    Initializing cylinder groups:
    ...............................................................................
    .................................
    super-block backups for last 10 cylinder groups at:
     3075408416, 3075952928, 3076497440, 3077041952, 3077586464, 3078130976,
     3078675488, 3079220000, 3079764512, 3080309024
  • Done. Now, we can mount the filesystem /dev/md/dsk/d381 filesystem.

 

Disclaimer
I’m not very good at Solaris. Therefore, I apologize if I’m using wrong/incorrect term. Besides, I hold no responsibility if you face a disaster after following my note. After all, this is my first time story playing with LDoms + SVM.

Comments

Post a Comment

Your email is never published nor shared. Required fields are marked *