Top
PRIMECLUSTERGlobal Disk Services Configuration and AdministrationGuide 4.5
FUJITSU Software

D.20 Volume Expansion Using Commands

This section discusses the procedures for expanding the sizes of /, /usr, and /var file systems during services using the Snapshot function of GDS Snapshot through a UFS boot environment.

Note

In this procedure, to expand the ufs file system size without stopping the operation, use the Solaris operating system's growfs(1M) command.

[Procedure]

The following describes the procedure for expanding the /var file system area in the configuration as shown below.

As shown in the following figure, a / file system must be migrated to another volume regardless of whether or not it is expanded in size.

Note

The cylinder sizes of keep disks Root1 and Root3 must be equal.

Information

System disk mirroring is not a requirement. The configuration without c0t1d0 and c3t0d0 that are shown in the figure above is also supported. However, in systems that require high availability, it is recommended to use the mirroring configuration as above.


1) Mirroring system disks

1-1) Exit all active application programs.

To ensure safe mirroring, exit all running application programs. When higher security is required, you should make backups of system disks.

1-2) Register system disks with the root class.

# sdxdisk -M -c System -a type=root -d c0t0d0=Root1:keep,c1t0d0=Root2:undef

1-3) Connect system disks to groups respectively.

# sdxdisk -C -c System -g Group1 -d Root1,Root2 -v 0=swap:on,3=usr:on,4=root:on,5=var:on

1-4) Confirm that the mirror definition is complete.

# sdxroot -M -c System -d Root1

1-5) Reboot the system.

# shutdown -y -g0 -i6

1-6) Confirm that mirroring is complete.

Use the mount(1M) command or the sdxinfo command to verify that the system disks have been mirrored properly.


2) Creating proxy volumes

Create proxy volumes that expand / file systems and the sizes. At this point, only one keep disk should be connected to the group in which proxy groups are created. The following describes the procedure for creating proxy volumes in the configuration as shown below.

Point

Sufficient free space is required after the last block of proxy volumes in a /var file system to be expanded in size.

2-1) View the current volume sizes.

# sdxinfo -V -c System
OBJ    NAME    CLASS   GROUP   SKIP JRM 1STBLK   LASTBLK  BLOCKS   STATUS
------ ------- ------- ------- ---- --- -------- -------- -------- --------
volume swap    System  Group1  off  on         0  1049759  1049760 ACTIVE
volume *       System  Group1  *    *    1049760  1071359    21600 PRIVATE
volume *       System  Group1  *    *    1071360  2946239  1874880 FREE
volume usr     System  Group1  off  on   2946240  2965679    19440 ACTIVE
volume root    System  Group1  off  on   2965680  3140639   174960 ACTIVE
volume var     System  Group1  off  on   3140640  3376079   235440 ACTIVE

The volume sizes can be viewed in the BLOCKS field provided by the sdxinfo -V command. In this example, the root size is 174960 blocks and the var size is 235440 blocks.

2-2) Register the disks with the root class.

# sdxdisk -M -c System -d c2t0d0=Root3:keep,c3t0d0=Root4:undef

Note

When registering multiple keep disks with a class together, as many or more undefined disks must also be registered.

2-3) Connect only one keep disk to the group.

# sdxdisk -C -c System -g Group2 -d Root3

2-4) Create volumes.

The volume sizes should correspond to those shown in step 2-1).

# sdxvolume -M -c System -g Group2 -v root2 -s 174960
# sdxvolume -M -c System -g Group2 -v var2 -s 235440

2-5) View the sizes of the created volumes.

Verify that the sizes of the volumes created in step 2-4) correspond to those shown in step 2-1).

# sdxinfo -V -c System
OBJ    NAME    CLASS   GROUP   SKIP JRM 1STBLK   LASTBLK  BLOCKS   STATUS
------ ------- ------- ------- ---- --- -------- -------- -------- --------
volume swap    System  Group1  off  on         0  1049759  1049760 ACTIVE
volume *       System  Group1  *    *    1049760  1071359    21600 PRIVATE
volume *       System  Group1  *    *    1071360  2946239  1874880 FREE
volume usr     System  Group1  off  on   2946240  2965679    19440 ACTIVE
volume root    System  Group1  off  on   2965680  3140639   174960 ACTIVE
volume var     System  Group1  off  on   3140640  3376079   235440 ACTIVE
volume *       System  Group2  *    *          0    21599    21600 PRIVATE
volume root2   System  Group2  off  on     21600   196559   174960 ACTIVE
volume var2    System  Group2  off  on    196560   431999   235440 ACTIVE
volume *       System  Group2  *    *     432000  3376079  2944080 FREE

3) Joining the proxy volumes

Data in / and /var can be copied in proxy volumes by joining the proxy volumes to the volumes in / and /var (master volumes). The following describes the procedure for joining proxy volumes in the configuration as shown below.

3-1) Join the proxy volumes.

# sdxvolume -F -c System -v root2,var2
# sdxproxy Join -c System -m root -p root2
# sdxproxy Join -c System -m var -p var2

3-2) Confirm that synchronization copying is complete.

# sdxinfo -S -c System
OBJ    CLASS   GROUP   DISK    VOLUME  STATUS
------ ------- ------- ------- ------- --------
slice  System  Group2  Root1   swap    ACTIVE
slice  System  Group2  Root2   swap    ACTIVE
slice  System  Group1  Root1   usr     ACTIVE
slice  System  Group1  Root2   usr     ACTIVE
slice  System  Group1  Root1   root    ACTIVE
slice  System  Group1  Root2   root    ACTIVE
slice  System  Group1  Root1   var     ACTIVE
slice  System  Group1  Root2   var     ACTIVE
slice  System  Group2  Root3   root2   STOP
slice  System  Group2  Root3   var2    COPY

When synchronization copying is in process, COPY is displayed in the STATUS field for slices of proxy volumes. When the STATUS of every proxy volume is in STOP, the synchronization copying is completed.


4) Parting the proxy volumes

Once synchronization copying is completed, the master volume and the proxy volume become synchronized. Snapshots of a master volume can be collected in a proxy volume by parting those synchronized master volume and proxy volume.

4-1) Secure consistency of the file systems.

To secure consistency of snapshot file systems, the file systems must be prevented from being updated. However, file systems such as /, /usr, and /var are necessary for the system to operate, they cannot be unmounted during the system operation. You can follow the procedure as below in order to reduce write occurrences into system disks and write occurrences into system disks that are not updated yet.

  1. Activate the system in the single user mode. (This can be skipped.)

  2. Exit all active application programs writing in the system disks. (This can be skipped.)

  3. Execute the sync(1M) command to write file system data not written in yet but updated on the memory into the disks.

Note

The system may hang up if a / file system is locked not to be written in with the lockfs(1M) command. In addition, GDS and GDS Snapshot commands hang up if a /var file system is locked not to be written in. Therefore, / and /var should not be applied the write lock.

Even if all the steps a., b., and c. are enforced, it cannot completely restrain the file systems from being updated. As a result, inconsistency similar to that after a system panic might occur in snapshot file systems.

When a., b., and c. are all enforced, a snapshot file system will be similar to a file system after a panic occurs in the single user mode.

When only c. is enforced skipping a. and b., s snapshot file system will be similar to a file system after a panic occurs during the system operation.

In any of these occasions, a file system may have inconsistency, and the file system need to be checked for consistency and repaired as described in step 5-1).

4-2) Part the proxy volumes.

# sdxproxy Part -c System -p root2,var2

4-3) When the system was activated in the single user mode in a. of step 4-1), reboot it in the multi-user mode.

4-4) When application programs were exited in b. of step 4-1), launch the application programs.


5) Configuring an alternative boot environment

Configure the environment to boot from the proxy volumes.

5-1) Check and repair the file systems on the proxy volumes.

There may be inconsistency in file systems on proxy volumes, and so verify and repair them using the fsck(1M) command.

# fsck -y /dev/sfdsk/System/rdsk/root2
# fsck -y /dev/sfdsk/System/rdsk/var2

5-2) Configure the alternative boot environment.

# sdxproxy Root -c System -p root2,var2

Once the alternative boot environment is configured, the following message is output.

SDX:sdxproxy: INFO: completed definitions of alternative boot environment: 
current-boot-device=/pci@1f,4000/scsi@3/disk@0,0:a /pci@1f,4000/scsi@3/disk@1,0:a 
alternative-boot-device=/pci@1f,4000/scsi@3/disk@2,0:a

Be sure to keep a copy of the output boot device names in the current boot environment (current-boot-device value) and in the alternative boot environment (alternative-boot-device value).


6) Expanding the snapshot size

6-1) Cancel the master-proxy relationship.

# sdxproxy Break -c System -p root2
# sdxproxy Break -c System -p var2

6-2) Expand the snapshot volume size.

The following example shows how to expand the snapshot volume size in /var to 706320 blocks.

# sdxvolume -S -c System -v var2 -s 706320

6-3) Expand the snapshot file system size.

The following example shows how to expand the snapshot file system size to 706320 blocks.

# growfs -s 706320 /dev/sfdsk/System/rdsk/var2

See

For details about the growfs(1M) command, see the Solaris operating system manual.


7) Mirroring the snapshot

A snapshot volume can be mirrored in the manner that a disk is added to the group to which the snapshot volume belongs.

# sdxdisk -C -c System -g Group2 -d Root4

8) Switching to the alternative boot environment

By switching to the alternative boot environment, /var file systems can be switched to the volumes expanded in size.

8-1) Boot the system through the alternative boot environment.

Execute the boot command in the OpenBoot environment. For the boot command, you can specify one of the boot devices in the alternative boot environment output in the message as shown in step 5-2).

# shutdown -y -g0 -i0
ok boot /pci@1f,4000/scsi@3/disk@2,0:a

Information

The boot command may fail as shown below if the number of the boot device names in the alternative boot environment output in step 5-2) exceeds the number of boot devices in the alternative boot environment.

ok boot /pci@1f,4000/scsi@3/disk@2,0:a
Rebooting with command: boot /pci@1f,4000/scsi@3/disk@2,0:a
Boot device: /pci@1f,4000/scsi@3/disk@2,0:a  File and args:
Evaluating: boot /pci@1f,4000/scsi@3/disk@2,0:a
Can't open boot device
ok

If this happens, you should specify another boot device name in the alternative boot environment output in step 5-2) and try the boot command again.

8-2) Confirm that it was booted normally.

Using the mount(1M) command or the sdxinfo command, make sure that it was booted normally in the alternative boot environment and that GDS objects do not contain errors. Additionally, according to need, you should also confirm that file system contents in the alternative boot environment are proper and that applications can normally run.

Information

In the case of an abnormal boot, restore the original boot environment. To restore the original boot environment, specify one of the boot devices in the current boot environment output in the message as shown in step 5-2) using the boot command in the OpenBoot environment.

# shutdown -y -g0 -i0
ok boot /pci@1f,4000/scsi@3/disk@0,0:a

9) Removing unnecessary volumes

After a normal boot in the alternative boot environment is verified, remove volumes in the / file system in the previous boot environment and in the /var file system before expansion.

# sdxvolume -F -c System -v root,var
# sdxvolume -R -c System -v root
# sdxvolume -R -c System -v var