DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
[Next] [Previous] [Top] [Contents] [Index]

VxVM User's Guide

File System CLI Operations

Chapter 11


Introduction

This chapter provides instructions on performing the following file system operations using the command line interface:

Creating a File System on a Volume

A file system can be created on a volume, but cannot be larger than the volume on which it is created. If you want to use a file system that is expandable and has quick recovery, specify vxfs as the file system type.

Create a vxfs file system on an existing volume as follows:

	mkfs [-F vxfs] [generic_options] [-o specific_options] special_file size 
where vxfs is the file system type, generic_options are the options common to most file systems, specific_options are options specific to the vxfs file system, special_file is the full pathname of the volume on which to create the file system (such as /dev/vx/rdsk/pubs), and size is the size of the new file system.

For more information about the options and variables available for use with the mkfs command, see the mkfs(1M) manual page.

To create a file system on a volume called /dev/vx/rdsk/pubs, first create a volume called pubs using vxassist. Refer to Chapter 12, "Volume CLI Operations" for instructions on how to create volumes using vxassist.

To create a vxfs file system on the newly-created pubs volume, enter the following:

	mkfs -F vxfs /dev/vx/rdsk/pubs 12288 

Note: The size of the file system (in this case 12288 sectors) is the same size or smaller than the volume on which the file system is created.


The following message is displayed:

	Mkfs: make vxfs file system? 
	(DEL if wrong)
If you have not changed your mind after several seconds, the file system is created, and information similar to the following appears:

	12288 sectors, 6144 blocks of size 1024 
	1320 inodes, 5294 data blocks, log size 512 
	1 allocation units of 5630 blocks, 1320 inodes, 5294 data blocks
	first allocation unit starts at block 514 
	overhead per allocation unit is 336 blocks 

The newly-created file system can now be mounted.

Mounting a File System

After creating the file system, mount it as follows:

	mount [-F vxfs][generic_options][-o specific_options] block_special \
 	mount_point 
where block_special is a block special device and mount_point is the location where the file system will be mounted.

To mount the file system /dev/vx/dsk/pubs, enter:

	mount -F vxfs /dev/vx/dsk/pubs /pubs 

Unmounting a File System

If you no longer need to access the data in a file system, you can unmount it. Unmount a file system as follows:

	umount block_special | mount_point 
where block_special is a block special device and mount_point is the location where the file system is mounted.

To unmount the file system /dev/vx/dsk/pubs, enter:

	umount /dev/vx/dsk/pubs 

Resizing a File System

A vxfs file system (on a volume) can be resized using the fsadm command, as described in this section. Note that the fsadm command resizes the file system only.

Alternatively, the vxresize command can be used to resize both a file system and its underlying volume to a specified new volume length. Refer to the vxresize(1M) manual page for further information.

Extending a File System

If you find that your vxfs file system is not large enough, you can increase the length of the file system. If the underlying volume is not already large enough to accommodate the new file system size, you need to increase the size of the volume first (using vxassist). The new size of the file system is specified in units of 512-byte blocks (or sectors).

Extend a vxfs file system as follows:

	fsadm [-F vxfs] [-b newsize] [-r rawdev] mount_point 
where newsize is the size to which the file system will grow (in sectors), and rawdev can optionally be used to specify the pathname of the raw device if it cannot be determined by fsadm.

To extend a vxfs file system using /pubs as a mount point, enter:

	fsadm -F vxfs -b 22528 /pubs 

Shrinking a File System

If you find that you have allocated more space for your vxfs file system than you need, you can decrease the size of the file system.


Note: In cases where data is allocated towards the end of the file system, shrinkage may not be possible and you may have to reorganize the file system. See the VERITAS File System (VxFS) System Administrator's Guide for details.


Shrink a vxfs file system as follows:

	fsadm [-F vxfs] [-b newsize] [-r rawdev] mount_point 
where newsize is the size to which the file system will grow (in sectors), and rawdev can optionally be used to specify the pathname of the raw device if it cannot be determined by fsadm.

To shrink a vxfs file system to 20480 sectors using /pubs as a mount point, enter:

	fsadm -F vxfs -b 20480 /pubs 

Displaying Mounted File Systems

It is important to keep track of which file systems are mounted and which are not. This saves users from trying to access unmounted file systems. You can look at the status of mounted file systems by entering:

	mount 

When invoked without any options, the mount command displays file system information similar to the following:

	/ on /dev/root read/write/setuid on Thu May 26 16:58:24 1994
	/proc on /proc read/write on Thu May 26 16:58:25 1994
	/dev/fd on /dev/fd read/write on Thu May 26 16:58:26 1994
	/tmp on /tmp read/write on Thu May 26 16:59:33 1994
	/var/tmp on /var/tmp read/write on Thu May 26 16:59:34 1994
	


[Next] [Previous] [Top] [Contents] [Index]