Creating a large-files filesystem
Creating a large files filesystem can be done with the mkfs command or the newfs command. The newfs command is a friendly interface to the mkfs command, and they both use the same options to create large-files and no-large-files filesystems. As of this release, the default behavior of these commands is to create a no-large-files filesystem. However, this default could be changed in future release of HP-UX.
Therefore, it is a good idea to explicitly set either the large files or no large files option.
The following examples show how to create a large-files filesystem.
- /usr/sbin/mkfs -F hfs -o largefiles /dev/vg02/rlvol1
- /usr/sbin/newfs -F hfs -o largefiles /dev/vg02/rlvol1
- /usr/sbin/mkfs -F vxfs -o largefiles /dev/vg02/rlvol1
- /usr/sbin/newfs -F vxfs -o largefiles /dev/vg02/rlvol1
The following examples show how to create a filesystem that will not support large files.
- /usr/sbin/mkfs -F hfs -o nolargefiles /dev/vg02/rlvol1
- /usr/sbin/newfs -F hfs -o nolargefiles /dev/vg02/rlvol1
- /usr/sbin/mkfs -F vxfs -o nolargefiles /dev/vg02/rlvol1
- /usr/sbin/newfs -F vxfs -o nolargefiles /dev/vg02/rlvol1
Changing a file system from one to the other
HP-UX also provides the ability to change a filesystem back and forth between large files and no large
files. This is provided by the fsadm command which also provides other filesystem administration capabilities.
It is important to realize that the conversion of these filesystems must be done on an unmounted filesystem, and fsck will be called after a successful conversion.
The following example shows how to convert a no-large-files filesystem to a large-files filesystem.
• /usr/sbin/fsadm -F hfs -o largefiles /dev/vg02/rlvol1
While the conversion of a no-large-files filesystem to a large-files filesystem should always succeed, the same is not true for converting a large-files filesystem to a no-large-files filesystem. The latter will only succeed if there are no large files on the filesystem. If even one large file is detected on the filesystem being converted, then the fsadm command will not convert the filesystem. Therefore, if it is necessary to convert a large-files filesystem that actually has large files on it to a no-large-files filesystem, the large files must be removed before conversion.
The following example shows how to convert a large-files filesystem to a no-large-files filesystem.
• /usr/sbin/fsadm -F hfs -o nolargefiles /dev/vg02/rlvol1
Indrajit,
ReplyDeleteThanks for nice blog. HP-UX we don't use much HFS filesystems. Only /stand is hfs. Correct me if i am wrong
This Blog only represent to create a large file system. Regarding /stand File system, in 11.11 to 11.23 is hfs file sytsem and in 11i.v3 /stand file system is vxfs file system.
ReplyDelete