cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while encapsulating the root disk

Gaurav_singh
Level 4

I am unable to encapsulate a root disk with a following error messages.

O/p's

1. Partition table:

partition> p
Current partition table (original):
Total disk cylinders available: 3913 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm    1490 - 2637        8.79GB    (1148/0/0) 18442620
  1       swap    wu       1 -  261        2.00GB    (261/0/0)   4192965
  2     backup    wm       0 - 3912       29.98GB    (3913/0/0) 62862345
  3        var    wm     852 - 1489        4.89GB    (638/0/0)  10249470
  4        usr    wm    2638 - 3912        9.77GB    (1275/0/0) 20482875
  5 unassigned    wm     788 -  851      502.03MB    (64/0/0)    1028160
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0

======================================================

2.vxdisk list:

bash-3.00# vxdisk -e list
DEVICE       TYPE           DISK        GROUP        STATUS               OS_NATIVE_NAME   ATTR
disk_0       auto:sliced    rootdg01     rootdg      online               c1t1d0s2         -
disk_1       auto:none      -            -           online invalid       c1t0d0s2         -
bash-3.00#

===========================================================

When I tried to encapsulate the root disk which is c1t0d0 it won't allow me and says,

 

Continue with encapsulation? [y,n,q,?]  (default: y) y
  VxVM  WARNING V-5-2-2603
The disk group selected has a disk group alignment larger than 1. For
  encapsulation, the disk group's alignment will be set to 1.

 

Continue with encapsulation? [y,n,q,?]  (default: y) y
  VxVM  WARNING V-5-2-2603
The disk group selected has a disk group alignment larger than 1. For
  encapsulation, the disk group's alignment will be set to 1.

Continue with encapsulation? [y,n,q,?]  (default: y) y
  VxVM  INFO V-5-2-333
The disk device disk_1 will be encapsulated and added to the disk group
  rootdg with the disk name rootdg03.
  The disk_1 disk has been configured for encapsulation.
  The first stage of encapsulation has completed successfully.  You
  should now reboot your system at the earliest possible opportunity.
  The encapsulation will require two or three reboots which will happen
  automatically after the next reboot.  To reboot execute the command:

shutdown -g0 -y -i6

  This will update the /etc/vfstab file so that volume devices are
  used to mount the file systems on this disk device.  You will need
  to update any other references such as backup scripts, databases,
  or manually created swap devices.

===============================================

However, when I shutdown it didn't make the disk in online state.

Please help

 

8 REPLIES 8

Gaurav_S
Moderator
Moderator
   VIP    Certified

Hi,

disk c1t0d0 is not initialized in vxvm yet.

Initialize the disk first & try again.

# vxdisksetup -i disk_1 format=sliced

Also, your rootdg is having rootdisk in it, you may want to mirror your volumes with disk_1 added to rootdg.

use vxdiskadm menu for the same.

G
 

Gaurav_singh
Level 4

Root disk c1t0d0 should be encapsulated not initialized? Is it.

I have tried to encapsulate it however it throws  that error message?

 

Gaurav_S
Moderator
Moderator
   VIP    Certified

To use in it vxvm you have to intialize first. You have already intialized & put Disk_0 in rootdg. So encapsulation have already been triggered for disk_0, thats how you would have got rootdg & volumes inside would be live. If you look at df output, you would have root swap usr & any other mount point which was in vfstab from this disk converted to a veritas volume.

Now for disk_1, you simply need to initalize it in vxvm & mirror it across disk_0. Since its a block to block copy, you would have public & private region mirrored to disk_1.

I would also recommend to match the partition table for disk_0 to disk_1. & once volumes inside rootdg are mirrored with disk_1. If you use vxmirror to mirror the volumes, it will automatically invoke vxbootsetup to update boot block on disk_1 as well.

Refer

https://sort.symantec.com/public/documents/sfha/6.1/solaris/manualpages/html/man/volume_manager/html/man1m/vxbootsetup.1m.html

 

G

Gaurav_singh
Level 4

As we see here, in format it shows c1t0d0 is a boot disk for which in vxvm somehow disk_1 has became root disk and disk_0 is the added disk, 

bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <DEFAULT cyl 3913 alt 2 hd 255 sec 63>
          /pci@0,0/pci15ad,1976@10/sd@0,0
       1. c1t1d0 <DEFAULT cyl 3913 alt 2 hd 255 sec 63>
          /pci@0,0/pci15ad,1976@10/sd@1,0
Specify disk (enter its number): ^C
bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <DEFAULT cyl 3913 alt 2 hd 255 sec 63>
          /pci@0,0/pci15ad,1976@10/sd@0,0
       1. c1t1d0 <DEFAULT cyl 3913 alt 2 hd 255 sec 63>
          /pci@0,0/pci15ad,1976@10/sd@1,0
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c1t0d0s3 is currently mounted on /var. Please see umount(1M).
/dev/dsk/c1t0d0s4 is currently mounted on /usr. Please see umount(1M).
/dev/dsk/c1t0d0s5 is currently mounted on /temp. Please see umount(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
        fdisk      - run the fdisk program
        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: 3913 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm    1490 - 2637        8.79GB    (1148/0/0) 18442620
  1       swap    wu       1 -  261        2.00GB    (261/0/0)   4192965
  2     backup    wm       0 - 3912       29.98GB    (3913/0/0) 62862345
  3        var    wm     852 - 1489        4.89GB    (638/0/0)  10249470
  4        usr    wm    2638 - 3912        9.77GB    (1275/0/0) 20482875
  5 unassigned    wm     788 -  851      502.03MB    (64/0/0)    1028160
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0

I initialized disk_0 which was not actaully the root disk, it is the another one hence it became online

however, when i tried to initialize root disk(Disk_1) it shows the error as,

===========================================================


bash-3.00# vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk

 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a spare for a disk group
 13     Turn off the spare flag on a disk
 14     Unrelocate subdisks back to a disk
 15     Exclude a disk from hot-relocation use
 16     Make a disk available for hot-relocation use
 17     Prevent multipathing/Suppress devices from VxVM's view
 18     Allow multipathing/Unsuppress devices from VxVM's view
 19     List currently suppressed/non-multipathed devices
 20     Change the disk naming scheme
 21     Get the newly connected/zoned disks in VxVM view
 22     Change/Display the default disk layouts
 list   List disk information


 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

Select an operation to perform: 1

Add or initialize disks
Menu: VolumeManager/Disk/AddDisks
  Use this operation to add one or more disks to a disk group.  You can
  add the selected disks to an existing disk group or to a new disk group
  that will be created as a part of the operation. The selected disks may
  also be added to a disk group as spares. Or they may be added as
  nohotuses to be excluded from hot-relocation use. The selected
  disks may also be initialized without adding them to a disk group
  leaving the disks available for use as replacement disks.

  More than one disk or pattern may be entered at the prompt.  Here are
  some disk selection examples:

  all:          all disks
  c3 c4t2:      all disks on both controller 3 and controller 4, target 2
  c3t4d2:       a single disk (in the c#t#d# naming scheme)
  xyz_0 :       a single disk (in the enclosure based naming scheme)
  xyz_ :        all disks on the enclosure whose name is xyz

Select disk devices to add: [<pattern-list>,all,list,q,?] list

DEVICE       DISK         GROUP        STATUS
disk_0       rootdg01     rootdg       online
disk_1       -            -            online invalid

Select disk devices to add: [<pattern-list>,all,list,q,?] disk_1
  Here is the disk selected.  Output format: [Device_Name]

  disk_1

Continue operation? [y,n,q,?]  (default: y) y
  You can choose to add this disk to an existing disk group, a
  new disk group, or leave the disk available for use by future
  add or replacement operations.  To create a new disk group,
  select a disk group name that does not yet exist.  To leave
  the disk available for future use, specify a disk group name
  of "none".

Which disk group [<group>,none,list,q,?]  (default: none) rootdg

Use a default disk name for the disk? [y,n,q,?]  (default: y) y

Add disk as a spare disk for rootdg? [y,n,q,?]  (default: n) n

Exclude disk from hot-relocation use? [y,n,q,?]  (default: n)

Add site tag to disk? [y,n,q,?]  (default: n) n
  The selected disks will be added to the disk group rootdg with
  default disk names.

  disk_1

Continue with operation? [y,n,q,?]  (default: y) y
  The following disk device has a valid VTOC, but does not appear to have
  been initialized for the Volume Manager.  If there is data on the disk
  that should NOT be destroyed you should encapsulate the existing disk
  partitions as volumes instead of adding the disk as a new disk.
  Output format: [Device_Name]

  disk_1

Encapsulate this device? [y,n,q,?]  (default: y) n

  disk_1

Instead of encapsulating, initialize? [y,n,q,?]  (default: n) y
  Initializing device disk_1.

  When selecting the format for the disk, keep in mind that a CDS disk
  cannot contain a subdisk for a 'root' or 'swap' volume, so it cannot
  be used for mirroring, evacuating, or sparing the boot disk.

Enter the desired format
[cdsdisk,sliced,simple,q,?]  (default: cdsdisk) sliced

Enter desired private region length
[<privlen>,q,?]  (default: 65536) 65536
  VxVM  NOTICE V-5-2-88
Adding disk device disk_1 to disk group rootdg with disk
  name rootdg02.
  VxVM  ERROR V-5-2-87 Adding disk device disk_1 failed.
  VxVM vxdg ERROR V-5-1-10127 associating disk-media rootdg02 with disk_1:
        Disk private region contents are invalid

Hit RETURN to continue.

Please help..

 

When I tried manually with,

bash-3.00# /etc/vx/bin/vxdisksetup -i disk_1 format=sliced

VxVM vxdisksetup ERROR V-5-2-3523 disk_1: Disk is in use

 

=================================================================

One more question i would like to ask, as we know that if there are any data in the disk then we have to encapsulate,Could you please provide the cases when we will have to do encapsulation rather 
then initialization of the disk?

 

Gaurav_S
Moderator
Moderator
   VIP    Certified

can you paste below outputs

# df -h

# vxdisk list disk_0

# vxdisk list disk_1

# vxprint -qthg rootdg

# vxdg list rootdg

# modinfo |grep -i vx

# prtvtoc /dev/rdsk/c1t1d0s2

# prtvtoc /dev/rdsk/c1t0d0s2

vxvm disk access names (DA names) are decided based on the order OS scanned the devices however there is nothing wrong in it. So far disk_0 is c1t1 & disk_1 is c1t0.

 

G

 

G
 

Gaurav_singh
Level 4

Hi Gaurav,

Required output are attached.please check.

=========================================

One more question i would like to ask, as we know that if there are any data in the disk then we have to encapsulate,Could you please provide the cases when we will have to do encapsulation rather 
then initialization of the disk?

 

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Can we get back to basics?

What is the Solaris version? Sparc or X86?

What is the VxVM version?

The partition table is different to what we normally see. (I must admit that it has been a while since I last worked with Solaris boot disks and encapsulating it.)

What we normally see in a Solaris boot disk partitioning table is that slice 0 normally starts at cylinder 0 and that slice 1 then starts at 1 cylinder after slice 0.

 

Partition 2 correctly describes the full disk, and then weird partitioning :

2     backup    wm       0 - 3912       29.98GB    (3913/0/0) 62862345

 1       swap    wu       1 -  261        2.00GB    (261/0/0)   4192965
262-787 ???  (unaccounted for?)
 5 unassigned    wm     788 -  851      502.03MB    (64/0/0)    1028160
 3        var    wm     852 - 1489        4.89GB    (638/0/0)  10249470
 0       root    wm    1490 - 2637        8.79GB    (1148/0/0) 18442620
 4        usr    wm    2638 - 3912        9.77GB    (1275/0/0) 20482875

 

I will see if I can find requirements in order to encapsulate boot disk.
It seems that the VxVM version here is having 'difficulty' working with the partition table on this server.

 

**** EDIT *****

Right, I saw version info in your attachment:

Solaris 10 x86
VxVM 6.0

Let me see if I can find documentation...
 

Gaurav_S
Moderator
Moderator
   VIP    Certified

Hi,

After going through the outputs, I see that system is definitely in wierd situation & effort will be required to sort this issue.

Foremost recommendation is, take a full system backup so that you are prepared for a restore situation.

1. Root is still mounted on slices from c1t0 however rootdg has been initiated with disk_0 (c1t1) which probably contains nothing. This would have happened if someone accidently encapsulated and entered value as disk_0 while running encapsulation (thinking that disk_0 would be c1t0d0). OR somone manually intiated a rootdg using "vxdg init" commands.

2. As rootdg contains nothing (from vxprint output) & filesystems are mounted from slices, I don't see any harm in destroying rootdg.

3. As Marianne spotted, parition table for c1t0 is looking messy & you can't fix partition table on the fly. Instead my recommendation would be, layout a right partition table on c1t1, create proper slices & filesystem (of same size as c1t0), restore the backup to newly created filesystems of c1t1. Reboot the system & try to boot with c1t1. Once this is successful, you can then fix partition of c1t0. OR you can create a liveupgrade environment on c1t1 with correct partition tables & try to boot from this environment.

4. Once you have fixed parition tables on both the disks, you should be able to run encapsulation successfully on c1t1, later adding c1t0 as mirror.

 

G