このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 03 Zed editor 設定 [Windowsでビルド]
- 09 ↷ 50_dialy:2025:09:09 から 50_dialy:2025:09:08 へページを名称変更しました。
- 06 ↷ 50_dialy:2025:06 から 50_dialy:2025:09:06 へページを移動しました。
最近の更新
文書の過去の版を表示しています。
下記はティスクで作成している解説
32_CentOSでiSCSI環境構築
TGTでシンプロビジョニングを利用する場合、TGTのバックエンドはディスクではなく、ファイルである必要があります。
Not all filesystems support FALLOC_FL_PUNCH_HOLE; if a filesystem
doesn't support the operation, an error is returned. The operation
is supported on at least the following filesystems:
* XFS (since Linux 2.6.38)
* ext4 (since Linux 3.0)
* Btrfs (since Linux 3.7)
* tmpfs(5) (since Linux 3.5)
* gfs2(5) (since Linux 4.16)
これで500G のSparseファイル作成
# dd if=/dev/zero of=/mnt/disk.tgt bs=1 count=0 seek=500G
見た目上500Gだが、実使用量は0になります。
# du -h --apparent-size /mnt/disk.tgt 500G /mnt/disk.tgt # du -h /mnt/disk.tgt 0 /mnt/disk.tgt
# tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 --backing-store /mnt/disk.tgt
# tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 1 --params thin_provisioning=1