検索クエリーを入力してください
<book_title> を検索 ...
Veritas™ File System プログラマーズリファレンスガイド - Linux
Last Published:
2018-01-16
Product(s):
InfoScale & Storage Foundation (7.3.1)
- Veritas File System Software Developer's Kit
- FCL(File Change Log)
- マルチボリュームサポート
- 名前付きデータストリーム
- Veritas File System I/O
- シン再生
ボリュームアプリケーションプログラミングインターフェースの使用
次の擬似コードに、ボリューム API を使った例を示します。
ファイルシステム内のボリュームを縮小または拡大するには
- vxresize コマンドを使って物理ボリュームを拡大します。
- vxfs_vol_resize() 呼び出しを使ってファイルシステムを縮小または拡大するには、次のようなコードを作成します。
/* stat volume "vol-03" to get the size information */ fd = open("/mnt"); vxfs_vol_stat(fd, "vol-03", infop); /* resize (shrink/grow) accordingly. This example shrinks the volume by half */ vxfs_vol_resize(fd, "vol-03", infop->dev_size / 2);
RAW ボリュームをファイルとしてカプセル化するには
- ボリュームセットにボリュームを追加します。
- RAW ボリューム vol-03 を、encapsulate_name という名前のファイルとして、ファイルシステム /mnt にカプセル化するには、次のようなコードを作成します。
/* Take the raw volume vol-03 and encapsulate it. The volume's contents will be accessible through the given path name. */ vxfs_vol_encapsulate("/mnt/encapsulate_name", "vol-03", infop->dev_size); /* Access to the volume is through writes and reads of file "/mnt/encapsulate_name" */ encap_fd = open("/mnt/encapsulate_name"); write(encap_fd, buf, 1024);
RAW ボリュームのカプセル化を解除するには
ファイルシステム /mnt にある encapsulate_name という名前の RAW ボリューム vol-03 のカプセル化を解除するには、次のようなコードを作成します。
/* Use de-ecapsulate to remove raw volume. After de-encapsulation, vol-03 is still part of volset, but is not an active part of the file system. */ vxfs_vol_deencapsulate("/mnt/encapsulate_name");