| 200 | |
| 201 | == /etc/lvm/lvm.conf == |
| 202 | === error_when_full === |
| 203 | * 0 (default) |
| 204 | * thin poolが一杯になると、書き込みはキューイングされる。thin poolはout-of-data-space modeになる |
| 205 | {{{ |
| 206 | May 10 12:35:10 raid-test lvm[303]: Thin vg-pool0-tpool is now 96% full. |
| 207 | May 10 12:40:36 raid-test kernel: device-mapper: thin: 252:2: reached low water mark for data device: sending event. |
| 208 | May 10 12:40:36 raid-test kernel: device-mapper: thin: 252:2: switching pool to out-of-data-space mode |
| 209 | May 10 12:40:36 raid-test lvm[303]: Thin vg-pool0-tpool is now 100% full. |
| 210 | }}} |
| 211 | * #l vs -a -o+lv_when_full |
| 212 | {{{ |
| 213 | LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert WhenFull |
| 214 | lv1 vg Vwi-aotz-- 3.00g pool0 66.67 |
| 215 | pool0 vg twi-aotzD- 2.00g 100.00 25.98 queue |
| 216 | }}} |
| 217 | * (デフォルトでは)60秒、thin poolが拡張されるのを待ち、失敗するとファイルシステムへエラーを返す。thin poolは read-only modeになる |
| 218 | {{{ |
| 219 | May 10 12:41:36 raid-test kernel: device-mapper: thin: 252:2: switching pool to read-only mode |
| 220 | May 10 12:41:36 raid-test kernel: EXT4-fs warning (device dm-8): ext4_end_bio:317: I/O error -5 writing to inode 17 (offset 25165824 size 8388608 starting block 591856) |
| 221 | May 10 12:41:36 raid-test kernel: buffer_io_error: 38109 callbacks suppressed |
| 222 | May 10 12:41:36 raid-test kernel: Buffer I/O error on device dm-8, logical block 591856 |
| 223 | May 10 12:41:36 raid-test kernel: EXT4-fs warning (device dm-8): ext4_end_bio:317: I/O error -5 writing to inode 17 (offset 25165824 size 8388608 starting block 591857) |
| 224 | May 10 12:41:36 raid-test kernel: Buffer I/O error on device dm-8, logical block 591857 |
| 225 | |
| 226 | (snip) |
| 227 | |
| 228 | May 10 12:41:36 raid-test kernel: device-mapper: thin: 252:2: metadata operation 'dm_pool_commit_metadata' failed: error = -1 |
| 229 | May 10 12:41:36 raid-test kernel: device-mapper: thin: 252:2: aborting current metadata transaction |
| 230 | May 10 12:41:36 raid-test kernel: device-mapper: thin: 252:2: switching pool to read-only mode |
| 231 | }}} |
| 232 | * # lvs -a -o+lv_when_full |
| 233 | {{{ |
| 234 | LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert WhenFull |
| 235 | lv1 vg Vwi-aotz-- 3.00g pool0 66.67 |
| 236 | pool0 vg twi-aotzM- 2.00g 100.00 25.98 queue |
| 237 | }}} |
| 238 | * read-onlyから復旧するには、全てのthin LVをinactivate -> thin pool LVをinactivate -> lvconvert --repair thinpoolLV する必要がある |
| 239 | * 1 |
| 240 | * thin poolが一杯になると、書き込みは即座に失敗する。 |
| 241 | {{{ |
| 242 | May 10 12:53:17 raid-test kernel: device-mapper: thin: 252:2: reached low water mark for data device: sending event. |
| 243 | May 10 12:53:17 raid-test kernel: device-mapper: thin: 252:2: switching pool to out-of-data-space mode |
| 244 | May 10 12:53:17 raid-test kernel: EXT4-fs warning (device dm-8): ext4_end_bio:317: I/O error -28 writing to inode 17 (offset 33554432 size 8388608 starting block 591872) |
| 245 | May 10 12:53:17 raid-test kernel: buffer_io_error: 39292 callbacks suppressed |
| 246 | May 10 12:53:17 raid-test kernel: Buffer I/O error on device dm-8, logical block 591872 |
| 247 | May 10 12:53:17 raid-test kernel: EXT4-fs warning (device dm-8): ext4_end_bio:317: I/O error -28 writing to inode 17 (offset 33554432 size 8388608 starting block 591873) |
| 248 | |
| 249 | (snip) |
| 250 | |
| 251 | May 10 12:53:17 raid-test lvm[303]: Thin vg-pool0-tpool is now 100% full. |
| 252 | May 10 12:53:27 raid-test kernel: EXT4-fs warning: 135366 callbacks suppressed |
| 253 | May 10 12:53:27 raid-test kernel: EXT4-fs warning (device dm-8): ext4_end_bio:317: I/O error -28 writing to inode 17 (offset 588054528 size 4857856 starting block 727248) |
| 254 | May 10 12:53:27 raid-test kernel: buffer_io_error: 135366 callbacks suppressed |
| 255 | |
| 256 | (snip) |
| 257 | }}} |
| 258 | * # lvs -a -o+lv_when_full |
| 259 | {{{ |
| 260 | lv1 vg Vwi-aotz-- 3.00g pool0 66.67 |
| 261 | pool0 vg twi-aotzD- 2.00g 100.00 26.86 error |
| 262 | }}} |
| 263 | * fstrimなどを用いて、割り当てを解放すると、すぐに復旧する |
| 264 | {{{ |
| 265 | May 10 12:55:29 raid-test kernel: device-mapper: thin: 252:2: switching pool to write mode |
| 266 | May 10 12:55:29 raid-test kernel: device-mapper: thin: 252:2: switching pool to write mode |
| 267 | }}} |
| 268 | * # lvs -a -o+lv_when_full |
| 269 | {{{ |
| 270 | lv1 vg Vwi-aotz-- 3.00g pool0 65.62 |
| 271 | pool0 vg twi-aotz-- 2.00g 98.44 26.46 error |
| 272 | }}} |
| 273 | |
| 274 | * オンラインで即座に変更可能 |
| 275 | * # lvchange --errorwhenfull y vg/pool0 |
| 276 | {{{ |
| 277 | Logical volume "pool0" changed. |
| 278 | }}} |