このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 2024.01.18 SSL Error in Rails created
- 2024.01.18 RailsでSSLエラー 以前のリビジョンを復元 (2024/01/18 07:06)
- 31 CentOS5 TLS1.2 created
- 2024.04.12 MySQL BIT Field created
最近の更新
文書の過去の版を表示しています。
下記はティスクで作成している解説
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