cancel
Showing results for 
Search instead for 
Did you mean: 

Root disk encapsulation problem in VXVM on solaris 10

Raj1986
Level 2

Select disk devices to encapsulate:
[<pattern-list>,all,list,q,?] list
DEVICE       DISK         GROUP        STATUS
c0t0d0       -            -            online invalid
c2t0d0       rajdg01      rajdg        online
c2t1d0       -            -            online
 
Select disk devices to encapsulate:
[<pattern-list>,all,list,q,?] c0t0d0
  Here is the disk selected.  Output format: [Device_Name]
  c0t0d0

Continue operation? [y,n,q,?] (default: y)
  You can choose to add this disk to an existing disk group or to
  a new disk group.  To create a new disk group, select a disk group
  name that does not yet exist.

Which disk group [<group>,list,q,?] rootdg
  There is no active disk group named rootdg.
Create a new group named rootdg? [y,n,q,?] (default: y)
Use a default disk name for the disk? [y,n,q,?] (default: y)
  A new disk group will be created named rootdg and the selected
  disks will be encapsulated and added to this disk group with
  default disk names.
  c0t0d0

Continue with operation? [y,n,q,?] (default: y)
  This disk device does not appear to be valid.  The disk may not be
  formatted (format(1M)), may have a corrupted VTOC, the device file
  for the disk may be missing or invalid, or the device may be turned-off
  or detached from the system.  This disk will be ignored.
  Output format: [Device_Name,Disk_Access_Name]
  [c0t0d0,c0t0d0s2]
Hit RETURN to continue.
 
Here is the slice information.

partition>
partition> print
Current partition table (original):
Total disk cylinders available: 1563 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       3 - 1562       11.95GB    (1560/0/0) 25061400
  1 unassigned    wm       0               0         (0/0/0)           0
  2     backup    wm       0 - 1562       11.97GB    (1563/0/0) 25109595
  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
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 alternates    wu       1 -    2       15.69MB    (2/0/0)       32130

 uname -a
SunOS node1.localdomain.com 5.10 Generic_141445-09 i86pc i386 i86pc
Please guide me where is the problem.
1 ACCEPTED SOLUTION

Accepted Solutions

g_lee
Level 6
From VxVM Admin Guide (Solaris 5.0MP3)
--------------------
To prevent the encapsulation from failing, make sure that the following conditions apply:
• The disk has two free partitions for the public and private regions.
• The disk has an s2 slice.
• The disk has a small amount of free space (at least 1 megabyte at the beginning
or end of the disk) that does not belong to any partition. If the disk being encapsulated is the root disk, and this does not have sufficient free space available, a similar sized portion of the swap partition is used instead.
--------------------

The last point appears to be the problem here - from the output there are no spare sectors - 0 is being used by s8, 1-2 by s9, remaining (3-1562) by s0.

Either get rid of s9 or free up at least a sector from the end of s0 (if shrinking s0 would obviously also need to shrink the filesystem first)

View solution in original post

8 REPLIES 8

Gaurav_S
Moderator
Moderator
   VIP    Certified
Hello,

This disk doesn't appears to be initialized as sliced disk.

Try this:

# vxdisksetup -i  c0t0d0 format=sliced

Then try encapsulating....

Gaurav

Gaurav_S
Moderator
Moderator
   VIP    Certified
Also, is this a EFI disk ?  since it has  more than 7 slices ?, VxVM might be getting confused to initialize it correctly....

What is type of this disk ? Try setting correct type from format menu..

Gaurav

Marianne
Level 6
Partner    VIP    Accredited Certified
I would NOT recommend initializing the disk - this is his boot disk...

g_lee
Level 6
From VxVM Admin Guide (Solaris 5.0MP3)
--------------------
To prevent the encapsulation from failing, make sure that the following conditions apply:
• The disk has two free partitions for the public and private regions.
• The disk has an s2 slice.
• The disk has a small amount of free space (at least 1 megabyte at the beginning
or end of the disk) that does not belong to any partition. If the disk being encapsulated is the root disk, and this does not have sufficient free space available, a similar sized portion of the swap partition is used instead.
--------------------

The last point appears to be the problem here - from the output there are no spare sectors - 0 is being used by s8, 1-2 by s9, remaining (3-1562) by s0.

Either get rid of s9 or free up at least a sector from the end of s0 (if shrinking s0 would obviously also need to shrink the filesystem first)

g_lee
Level 6
agreed with Marianne above - initialization is not recommended in this case since the aim is to encapsulate to preserve the existing data

Gaurav_S
Moderator
Moderator
   VIP    Certified

Sorry guys you are right..... I misunderstood something....

ofcourse initialization is not suggested......  above steps should help in resolving..

Gaurav

Raj1986
Level 2
HI g_lee. Thank you so much for the help. I got your point and now i m looking to come out of the issue.

I read somewhere "You can encapsulate a disk that does not have space available for the VxVM private region partition by using the vxdisk utility. This is done by configuring the disk as a nopriv devices that does not have a private region. "
 
Whats wrong when i do:
vxdisk define c0d0  type=nopriv
VxVM vxdisk ERROR V-5-1-538 Device c0d0s2: define failed:
        Device path not valid


Please let me know for which slice I should run the vxdisk command.

Thanks
Raj

Gaurav_S
Moderator
Moderator
   VIP    Certified

Hello Raj...

Which ever slice is free needs to be put in, for e,g if you want to use slice 3, use c0t0d0s3

make sure parition is free for use.....  also, keep an eye on this (from vxvm admin guide)

Using nopriv disks for encapsulation

Caution: Do not use the procedure in this section to encapsulate a root disk. Part of the swap area on a root disk can be used to form the private region.

Encapsulation converts existing partitions on a specified disk to volumes. If any partitions contain file systems, their /etc/vfstab entries are modified so the file systems are mounted on volumes instead.

Disk encapsulation requires that enough free space be available on the disk (by default, 1 megabyte) for storing the private region that VxVM uses for disk identification and configuration information. This free space cannot be included in any other partitions. (See the vxencap(1M) manual page for more information.)

You can encapsulate a disk that does not have space available for the VxVM private region partition by using the vxdisk utility. This is done by configuring the disk as a nopriv devices that does not have a private region.

To create a nopriv device
1 If it does not exist already, set up a partition on the disk for the area that you want to access using VxVM.
2 Use the following command to map a VM disk to the partition:

# vxdisk define partition-device type=nopriv

where partition-device is the basename of the device in the /dev/dsk directory. For example, to map partition 3 of disk device c0t4d0, use the following command:

# vxdisk define c0t4d0s3 type=nopriv

To create volumes for other partitions on the disk 1 Add the partition to a disk group.

2 Determine where the partition resides within the encapsulated partition.

3 Use vxassist to create a volume with that length.

Note: By default, vxassist re-initializes the data area of a volume that it creates. If there is data to be preserved on the partition, do not use vxassist. Instead, create the volume with vxmakeand start the volume with the command vxvolinitactive.


Gaurav