среда, 25 марта 2009 г.

VxVM Solaris

For this example, assume you have two disks:
The boot disk:

c0t0d0s0: /pci@1f,0/pci@1,1/scsi@2/disk@0,0

and the soon-to-be-mirror disk:

c0t1d0s0: /pci@1f,0/pci@1,1/scsi@2/disk@1,0

Assuming that the disclaimer did not send you running for cover, follow this sequence of steps:

* Install Solaris (any release starting with Solaris 2.6 should be okay). During installation, set two partitions aside, say s6 and 7 with 10 MB of disk space for the DiskSuite state database and the Veritas VXVM rootdg.
* Install recommended, Y2K, and any other patches that you'd like.
* Reboot .
* Install Veritas VXVM, or Foundation Suite (VXVM plus the Veritas File System).
* Configure Veritas Foundation Suite:
o Run vxinstall and add only the disk that you will later mirror the root disk to with DiskSuite (in this case, c0t1d0s0).
o When vxinstall prompts you to reboot, do so.
o Create simple slice for rootdg.

vcdctl add disk c0t0d0s7 type=simple
vxdisk -f init c0t0d0s7 type=simple
vxdg adddisk c0t0d0s7

o Remove the mirror disk from rootdg with vxdg -g rootdg rmdisk c0t1d0
* Use format to configure bootmirror slices identical to bootdisk slices. Use the following "trick" to make an identical copy:

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,0/pci@1,1/scsi@2/sd@0,0
1. c0t1d0
/pci@1f,0/pci@1,1/scsi@2/sd@1,0

Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
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> 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
! - execute , then return
quit

partition> print
Current partition table (original):
Total disk cylinders available: 4924 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 4324 7.41GB (4325/0/0) 15531075
1 swap wu 4325 - 4909 1.00GB (585/0/0) 2100735
2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084
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 4910 - 4916 12.27MB (7/0/0) 25137
7 unassigned wm 4917 - 4923 12.27MB (7/0/0) 25137

partition> name
Enter table name (remember quotes): temp

partition> quit
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> disk
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,0/pci@1,1/scsi@2/sd@0,0
1. c0t1d0
/pci@1f,0/pci@1,1/scsi@2/sd@1,0
Specify disk (enter its number)[0]: 1
selecting c0t1d0
[disk formatted]

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
! - execute , then return
quit

partition> select
0. temp
1. original
Specify table (enter its number)[1]: 0

partition> label
Ready to label disk, continue? Y

partition> quit
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> quit

* Add simple slices on the second disk for use with Veritas and complete Veritas installation:
o Create simple slices and volume:

vxdctl add disk c0t1d0s7 type=simple
vxdisk -f init c0t1d0s7 type=simple
vxdg adddisk c0t1d0s7

o Create a "don't use" volume on the simple slices:

vxassist make vol_dont_use 15m

o Add in all your non-rootdg disk via command line or vxdiskadm For example, here is a command line for adding only the c0t3d0 disk to the oradg disk group:

vxdg init oradg c0t3d0=c0t3d0

o Create volumes in your non-rootdg diskgroups (i.e., oradg) via the Veritas GUI or command line. For example, here is a sample showing how to put the c0t3d0 disk in the oradg disk group. First, get "maxsize" for a volume on c0t3d0:

/usr/sbin/vxassist -g oradg -p maxsize layout=nostripe alloc="c0t3d0"

Next, create volume "testvol" on c0t3d0:

/usr/sbin/vxassist -g oradg make testvol 2050048 layout=nostripe alloc="c0t3d0"

Finally, create a filesystem on "testvol":

/usr/sbin/mkfs -F vxfs /dev/vx/rdsk/oradg/testvol 2050048

and mount "testvol" to /testvol:

/sbin/mount -F vxfs /dev/vx/dsk/oradg/testvol /testvol

Комментариев нет:

Отправить комментарий