Top
PRIMECLUSTER Global Disk Services  Configuration and AdministrationGuide 4.7

6.6.2 Setting with Commands

In this section, operation outline of volume creation is explained.
Please use as a reference when configuring the environment.
For details, see the Command Reference.

6.6.2.1 Creating Single Volume

The following example shows the procedures for creating a single volume using a physical disk named sda.

1) Registering a disk to class

Register the physical disk with a class. When the specified class does not exist, it will be created automatically.

Example) Registering physical disk sda to shared class "Class1", which is shared on node1 and node2, and assigning the name "Disk1."

# sdxdisk -M -c Class1 -a type=shared,scope=node1:node2 -d sda=Disk1:single

2) Creating a single volume

Create a volume within the single disk.

Example) Creating a volume of 1,000 blocks within single disk "Disk 1", and assigning a volume name "Volume1."

# sdxvolume -M -c Class1 -d Disk1 -v Volume1 -s 1000

6.6.2.2 Creating Mirror Volume

The following example shows the procedures for creating a volume by mirroring physical disks named sda and sdb.

1) Registering disks to class

Register the physical disks with a class. When the specified class does not exist, it will be created automatically.

Example) Registering physical disks sda and sdb with local class "Class1", and name these disks Disk1 and Disk2.

# sdxdisk -M -a type=local -c Class1 -d sda=Disk1,sdb=Disk2

Information


When registering disks with a shared class, it is necessary to use the -a option to specify the scope attribute. See an example below.

# sdxdisk -M -c Class1 -a type=shared,scope=node1:node2 -d sda=Disk1,sdb=Disk2

2) Connecting the disks to a mirror group

Connect the disks to a mirror group. When the specified mirror group does not exist, it will be created automatically.

Example) Connecting "Disk1" and "Disk2" to mirror group "Group1."

# sdxdisk -C -c Class1 -g Group1 -d Disk1,Disk2

3) Creating a mirror volume

Create a volume within the mirror group.

Example) Creating a volume of 1,000 blocks within mirror group "Group1", and assigning a volume name "Volume1."

# sdxvolume -M -c Class1 -g Group1 -v Volume1 -s 1000

After returning from the command, synchronization copying will automatically begin.


4) Confirming the completion of procedure

Confirm that the synchronization copying is complete by using the sdxinfo -S command.

If all the displayed slices' STATUS fields are "ACTIVE", synchronization copying is complete.
If the synchronization copying is still in progress, "COPY" will be displayed in the STATUS field.
Using the -e long option, you can check the progress of the synchronization copying.

For details, see "B.1.6 sdxinfo - Display Object Configuration and Status Information."

Example) Confirming synchronization copying of volume "Volume1" is complete.

# sdxinfo -S -o Volume1
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  Class1  Group1  Disk1   Volume1 ACTIVE
slice  Class1  Group1  Disk2   Volume1 COPY

6.6.2.3 Creating Netmirror Volume

The following example shows the procedures for creating a volume mirroring the iSCSI devices "sda" and "sdb" among servers.

Note that "sda" and "sdb" must be created according to "4.8 Disk Setting for Performing Mirroring among Servers."

1) Registering disks to a class

Register the iSCSI devices with a shared class. When the specified shared class does not exist, it will be created automatically.

Example) Register iSCSI devices "sda" and "sdb" with the shared class "Class1", and name these devices "Disk1" and "Disk2."

# sdxdisk -M -c Class1 -a type=shared,scope=node1:node2 -d sda=Disk1,sdb=Disk2

2) Connecting the disks to a netmirror group

Connect the disks to a netmirror group. When the specified netmirror group does not exist, it will be created automatically.

Example) Connecting "Disk1" and "Disk2" to the netmirror group "Group1."

# sdxdisk -C -c Class1 -g Group1 -d Disk1,Disk2 -a type=netmirror

3) Creating a netmirror volume

Create a volume within the netmirror group.

Example) Creating a volume of 1,000 blocks within the netmirror group "Group1," and assigning a volume name "Volume1."

# sdxvolume -M -c Class1 -g Group1 -v Volume1 -s 1000

After returning from the command, the synchronization copying will automatically begin.


4) Confirming the completion of procedure

Confirm that the synchronization copying is complete by using the sdxinfo -S command.

If all the displayed slices' STATUS fields are "ACTIVE", synchronization copying is complete.
If the synchronization copying is still in progress, "COPY" will be displayed in the STATUS field.
Using the -e long option, you can check the progress of the synchronization copying.

For details, see "B.1.6 sdxinfo - Display Object Configuration and Status Information."

Example) Confirming synchronization copying of volume "Volume1" is complete.

# sdxinfo -S -o Volume1
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  Class1  Group1  Disk1   Volume1 ACTIVE
slice  Class1  Group1  Disk2   Volume1 COPY

6.6.2.4 Creating Large-Capacity Volume Using Concatenation

Note

Concatenation is not supported in this version.

The following example shows the procedures for creating a volume by concatenating physical disks named sda and sdb.

1) Registering disks to class

Register the physical disks with a class. When the specified class does not exist, it will be created automatically.

Example) Registering physical disks sda and sdb with shared class "Class1", which is shared on node1 and node2, and naming those disks Disk1 and Disk2.

# sdxdisk -M -c Class1 -a type=shared,scope=node1:node2  -d sda=Disk1,sdb=Disk2

2) Connecting the disks to a concatenation group

Connect the disks to a concatenation group. When the specified concatenation group does not exist, it will be created automatically.

Example) Connecting "Disk1" and "Disk2" to concatenation group "Group1."

# sdxdisk -C -c Class1 -g Group1 -d Disk1,Disk2 -a type=concat

3) Creating a large-capacity volume

Create a volume within the concatenation group.

Example) Creating a volume of 1,000,000,000 blocks within concatenation group "Group1", and assigning a volume name "Volume1."

# sdxvolume -M -c Class1 -g Group1 -v Volume1 -s 1000000000 -a pslice=off

6.6.2.5 Creating Stripe Volume

Note

Striping is not supported in this version.

The following example shows the procedures for creating a volume by striping physical disks named sda and sdb.

1) Registering disks to class

Register the physical disks with a class. When the specified class does not exist, it will be created automatically.

Example) Registering physical disks sda and sdb with shared class "Class1", which is shared on node1 and node2, and naming those disks Disk1 and Disk2.

# sdxdisk -M -c Class1 -a type=shared,scope=node1:node2 -d  sda=Disk1,sdb=Disk2

2) Connecting the disks to a stripe group

Connect the disks to a stripe group. When the stripe group does not exist, it will be created automatically.

Example) Connecting "Disk1" and "Disk2" to stripe group "Group1."

# sdxdisk -C -c Class1 -g Group1 -d Disk1,Disk2 -a type=stripe,width=32

3) Creating a stripe volume

Create a volume within the stripe disk.

Example) Creating a volume of 1,000 blocks within stripe group "Group1", and assigning a volume name "Volume1."

# sdxvolume -M -c Class1 -g Group1 -v Volume1 -s 1000 -a pslice=off

6.6.2.6 Creating Mirror Volume by Combining Striping and Mirroring

Note

Striping is not supported in this version.

The following example shows the procedures for creating a volume by constructing stripe groups with physical disks sda and sdb and other physical disks sdc and sdd respectively and then mirroring the two stripe groups.

1) Registering disks to class

Register the physical disks with a class. When the specified class does not exist, it will be created automatically.

Example) Registering physical disks sda, sdb, sdc and sdd to shared class "Class1", which is shared on node1 and node2, and assigning the names "Disk1", "Disk2", "Disk3" and "Disk4" respectively.

# sdxdisk -M -c Class1 -a type=shared,scope=node1:node2 \
-d sda=Disk1,sdb=Disk2,sdc=Disk3,sdd=Disk4

2) Connecting the disks to a stripe group

Connect the disks to a stripe group. When the stripe group does not exist, it will be created automatically.

Example) Connecting "Disk1" and "Disk2" to stripe group "Group1."

# sdxdisk -C -c Class1 -g Group1 -d Disk1,Disk2 -a type=stripe,width=32

Connecting Disk3 and Disk4 to stripe group Group2.

# sdxdisk -C -c Class1 -g Group2 -d Disk3,Disk4 -a type=stripe,width=32

3) Connecting the stripe groups to a mirror group

Connect the stripe groups to a mirror group. When the specified mirror group does not exist, it will be created automatically.

Example) Connecting the stripe group "Group1" and "Group2" to mirror group "Group3."

# sdxgroup -C -c Class1 -h Group3 -l Group1,Group2 -a type=mirror

The "-a type=mirror" option is omissible.


4) Creating a mirror volume

Create a volume within the highest level mirror group.

Example) Creating a volume of 1,000 blocks within mirror group "Group3", and assigning a volume name "Volume1."

# sdxvolume -M -c Class1 -g Group3 -v Volume1 -s 1000 -a pslice=off

After returning from the command, synchronization copying will automatically begin.


5) Confirming the completion of procedure

Confirm that the synchronization copying is complete by using the sdxinfo -S command.

If all the displayed slices' STATUS fields are "ACTIVE", synchronization copying is complete.
If the synchronization copying is still in progress, "COPY" will be displayed in the STATUS field.
Using the -e long option, you can check the progress of the synchronization copying.

For details, see "B.1.6 sdxinfo - Display Object Configuration and Status Information."

Example) Confirming synchronization copying of volume "Volume1" is complete.

# sdxinfo -S -o Volume1
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  Class1  Group1  Disk1   Volume1 ACTIVE
slice  Class1  Group1  Disk2   Volume1 COPY