This chapter explains the relatively easy procedure for creating file systems. Read it together with Chapter 5, File System Construction, in which the file system creation method is explained in more detail.
Formatted virtual disk device partitions are set using the dkpart(1M) command. The partition area is allocated in the user area of the virtual disk device and can be split into up to 16 partitions for each device. The partition setting can be created according to the specification made in the user-generated partition information.
When partitions are set with dkpart(1M), a character type special file corresponding to each partition is created at the same time. See the following examples.
Example 1:
In the preceding example, the extended storage MSX1 is formatted, and all of the extended storage MSX1 consists of one partition.
Example 2:
In the preceding example, the partitions of magnetic disk device ID12 are set according to the specification of the userpl file generated by the user. Formatting is assumed to have been completed. For details of the file format, refer to mkdev(1M) in the SUPER-UX System Administrator's Reference Manual.
See the following partition example.
Example 3:
# cat userp1 0 0 40 .................... Partition information 1 0 120 2 0 64 #
| Home |
|---|
Using prtvl(1M), the user can confirm that the partitions have been set as intended. The contents set in Example 2 are displayed in Example 4.
Example 4:
# prtvl /dev/ID12
*
* /dev/ID12 Volume Label information
*
* Virtual device:
* /dev/rid/02?
*
* Dimensions : ...... Disk information
* Partition count max: 16
* Subpartition count: 70
* Subpartition size: 8 Mbyte
* Accessible size: 560 Mbyte
*
* Unallocated space: ...... Free area information
* Start Size
* 224 336
*
* Partition Start Alloc size VVunit ...... Partition information
0 0 40 -
1 40 120 -
2 160 64 -
* 3
* 4
* 5
* 6
* 7
* 8
* 9
* a
* b
* c
* d
* e
* f
#
| Home |
|---|
SUPER-UX creates a file system for virtual volumes without directly constructing it in partitions. To create a virtual volume from partitions, use both the vvattr(1M) and catdev(1M) commands.
To create a virtual volume, first use the catdev(1M) command to specify partitions constructing the virtual volume. Partitions in virtual disk devices of different types can be combined to construct a virtual volume. Up to 32 partitions can be specified (see Figure 3-1). If a nonexistent special file name is specified for the special file of the virtual volume, the special file is automatically created, obtaining a unit number based on that special file name.
Figure 3-1 Virtual Volume Configuration Definition
Next, use the vvattr(1M) command to define virtual volume attributes (information used to make the volume usable as a virtual volume). The reallocation function and cache function are provided as additional virtual volume functions. However, information for using these functions must also be defined. To define these virtual volume attributes, define them according to the specification of the attribute information generated by the user or provided by the system.
Two examples of using the commands are given next.
Example 1:
# catdev -v /dev/rid/001 /dev/rdsk/005 # vvattr /dev/rdsk/005
In the preceding example, partition 1 of the magnetic disk device having unit number 0 is defined as a virtual volume.
Example 2:
# catdev -v /dev/rxd/02:/dev/rid/002 /dev/rdsk/006 # vvattr /dev/rdsk/006
The preceding example defines that partition 2 of XMU having unit number 0, and partition 2 in the magnetic disk device having unit number 0, are linked. Also, the linked partitions are used as a virtual volume. The system-provided attribute information for SFS is used.
| Home |
|---|
A file system can be constructed only in a virtual volume. It is constructed according to the specification of SFS and according to the specified size and number of inodes of the file system.
An example of file system creation is shown next.
Example:
mkfs /dev/rdsk/006
This example constructs SFS in the virtual volume.
This section describes the mounting and unmounting of file systems.
A file system must be mounted to be used. The following example shows how to mount a file system using the mount(1M) command.
Example:
mount /dev/dsk/005 /usr/usr1
/dev/dsk/005 is the special file name of the file system to be mounted. During mounting, the special file must be of block type. /usr/usr1 is a previously existing directory. Although there is no restriction on this directory, after mounting the new file system, any files or directories that existed under that directory become inaccessible. After mounting, the /usr/usrl directory can be used as a file system. Other file systems can be mounted on directories in the mounted file system.
See mount(1M) for available options.
To disconnect a mounted file system, it must be unmounted. The following example describes how to unmount a file system using the umount(1M) command.
Example:
umount /dev/dsk/005
/dev/dsk/005 is the special file name to be unmounted.
| Home |
|---|
| Contents | Previous Chapter | Next Chapter | Index |