To check the status of a transactional volume, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then view the status of the volumes. Right-click a transactional volume and choose Properties for more detailed status information. For more information, see the online help.
Use the metastat command.
For more information, see the metastat(1M) man page.
Here is sample transactional volume output from the metastat command:
# metastat d20: Trans State: Okay Size: 102816 blocks Master Device: c0t3d0s4 Logging Device: c0t2d0s3 Master Device Start Block Dbase c0t3d0s4 0 No c0t2d0s3: Logging device for d0 State: Okay Size: 5350 blocks Logging Device Start Block Dbase c0t2d0s3 250 No |
Check Prerequisites for Creating Solaris Volume Manager Components and Background Information for Transactional Volumes.
Unmount the UFS file system for which you want to enable logging.
Attach a log device to the transactional volume by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Properties. For more information, see the online help.
Use the following form of the metattach command:
metattach master-volume logging-volume |
master-volume is the name of the transactional volume that contains the file system to be logged.
logging-volume is the name of the volume or slice that should contain the log.
See the metattach(1M) man page for more information.
# metattach d1 d23 |
Remount the file system.
This example shows a log device, the slice (c1t1d0s1), being attached to the transactional volume d1, which is mounted on /fs2.
# umount /fs2 # metattach d1 c1t1d0s1 d1: log device d0c1t1d0s1 is attached # mount /fs2 |
Check Prerequisites for Creating Solaris Volume Manager Components and Background Information for Transactional Volumes.
Unmount the UFS file system for which you want to disable logging or change the log device.
Detach the log device from the transactional volume by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Properties. For more information, see the online help.
Use the following form of the metadetach command:
metadetach master-volume |
master-volume is the name of the transactional volume that contains the file system that is being logged.
See the metadetach(1M) man page for more information.
Remount the file system.
This example show a log device, the slice (c1t1d0s1), being detached from the transactional volume d1, which is mounted on /fs2.
# umount /fs2 # metadetach d1 d1: log device c1t1d0s1 is detached # mount /fs2 |
You can expand a master device within a transactional volume only when the master device is a volume (RAID 0, RAID 1, or RAID 5).
Check Prerequisites for Creating Solaris Volume Manager Components and Background Information for Transactional Volumes.
If the master device is a volume (rather than a basic slice), attach additional slices to the master device by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Properties, then the Components panel. For more information, see the online help.
Use the following form of the metattach command:
metattach master-volume component |
master-volume is the name of the transactional volume that contains the file system to be logged.
component is the name of the volume or slice that should be attached.
See the metattach(1M) man page for more information.
If the master device is a mirror, you need to attach additional slices to each submirror.
If the master device is a slice, you cannot expand it directly. Instead, you must do the following:
Clear the existing transactional volume.
Put the master device's slice into a volume.
Recreate the transactional volume.
Once you have completed this process, you can expand the master device as explained in the previous steps of this procedure.
# metastat d10 d10: Trans State: Okay Size: 102816 blocks Master Device: d0 Logging Device: d1 d0: Mirror Submirror 0: d11 State: Okay ... Submirror 1: d12 State: Okay ... # metattach d11 c0t2d0s5 d11: component is attached # metattach d12 c0t3d0s5 d12: component is attached |
This example shows the expansion of a transactional device, d10, whose master device consists of a two-way RAID 1 volume, d0, which contains two submirrors, d11 and d12. The metattach command is run on each submirror. The system confirms that each slice was attached.
For a UFS, run the growfs command on the transactional volume (not the master device). See How to Expand a File System.
An application, such as a database, that uses the raw volume must have its own way of growing the added space.
Check Prerequisites for Creating Solaris Volume Manager Components and Background Information for Transactional Volumes.
Unmount the UFS file system for which you want to remove the transactional volume and disable logging.
# umount /filesystem |
Detach the log device from the transactional volume by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Properties. For more information, see the online help.
Use the following form of the metadetach command:
metadetach master-volume |
master-volume is the name of the transactional volume that contains the file system that is being logged.
See the metadetach(1M) man page for more information.
Remove (clear) the transactional volume by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Delete. For more information, see the online help.
Use the following form of the metaclear command:
metaclear master-volume |
See the metaclear(1M) man page for more information.
If necessary, update /etc/vfstab to mount the underlying volume, rather than the transactional volume you just cleared.
Remount the file system.
This example shows the removal of a transactional volume d1, which was mounted on /fs2. The underlying slice, c1t1d0s1, is mounted directly after this procedure.
# umount /fs2 # metadetach d1 d1: log device d2 is detached # metaclear d1 d1: Trans is cleared ( Edit /etc/vfstab to update mount point for /fs2 to mount on c1t1d0s1, not d1) # mount /fs2 |
This procedure works only for situations in which the transactional volume and the underlying device are both Solaris Volume Manager logical volumes.
Check Prerequisites for Creating Solaris Volume Manager Components and Background Information for Transactional Volumes.
Unmount the UFS file system for which you want to remove the transactional volume and disable logging.
Detach the log device from the transactional volume by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Properties. For more information, see the online help.
Use the following form of the metadetach command:
metadetach master-volume |
master-volume is the name of the transactional volume that contains the file system that is being logged.
See the metadetach(1M) man page for more information.
Exchange the name of the transactional volume with that of the master device.
Remove (clear) the transactional volume by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the transactional volume from the listing. Right-click the volume, and choose Delete. For more information, see the online help.
Use the following form of the metaclear command:
metaclear master-volume |
See the metaclear(1M) man page for more information.
Run the fsck command on the master device.
When asked whether to fix the file system's state in the superblock, respond y.
Remount the file system.
This example begins with a transactional volume, d1, that contains a mounted file system, and ends up with a file system that is mounted on the transactional volume`s underlying master device, which will be d1.
# metastat d1 d1: Trans State: Okay Size: 5600 blocks Master Device: d21 Logging Device: d0 d21: Mirror Submirror 0: d20 State: Okay Submirror 1: d2 State: Okay ... d0: Logging device for d1 State: Okay Size: 5350 blocks # umount /fs2 # metadetach d1 d1: log device d0 is detached # metarename -f -x d1 d21 d1 and d21 have exchanged identities # metastat d21 d21: Trans State: Detached Size: 5600 blocks Master Device: d1 d1: Mirror Submirror 0: d20 State: Okay Submirror 1: d2 State: Okay # metaclear 21 # fsck /dev/md/dsk/d1 ** /dev/md/dsk/d1 ** Last Mounted on /fs2 ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? y 3 files, 10 used, 2493 free (13 frags, 310 blocks, 0.5% fragmentation) # mount /fs2 |
The metastat command confirms that the transactional volume, d1, is in the “Okay” state. The file system is unmounted before detaching the transactional volume's log device. The transactional volume and its mirrored master device are exchanged by using the -f (force) flag. Running the metastat command again confirms that the exchange occurred. The transactional volume and the log device (if desired) are cleared, in this case, d21 and d0, respectively. Next, the fsck command is run on the mirror, d1, and the prompt is answered with a y. After the fsck command is done, the file system is remounted. Note that because the mount device for /fs2 did not change, the /etc/vfstab file does not require editing.