Changes between Version 14 and Version 15 of TipAndDoc/storage/LVM


Ignore:
Timestamp:
May 10, 2015 1:00:40 PM (10 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/storage/LVM

    v14 v15  
    198198 
    199199 * [http://www.slideshare.net/akirahayakawa716/dmthin20140528 dm-thin-internal-ja] dm-thin実装調査 
     200 
     201 == /etc/lvm/lvm.conf == 
     202 === error_when_full === 
     203 * 0 (default) 
     204  * thin poolが一杯になると、書き込みはキューイングされる。thin poolはout-of-data-space modeになる 
     205{{{ 
     206May 10 12:35:10 raid-test lvm[303]: Thin vg-pool0-tpool is now 96% full. 
     207May 10 12:40:36 raid-test kernel: device-mapper: thin: 252:2: reached low water mark for data device: sending event. 
     208May 10 12:40:36 raid-test kernel: device-mapper: thin: 252:2: switching pool to out-of-data-space mode 
     209May 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{{{ 
     219May 10 12:41:36 raid-test kernel: device-mapper: thin: 252:2: switching pool to read-only mode 
     220May 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) 
     221May 10 12:41:36 raid-test kernel: buffer_io_error: 38109 callbacks suppressed 
     222May 10 12:41:36 raid-test kernel: Buffer I/O error on device dm-8, logical block 591856 
     223May 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) 
     224May 10 12:41:36 raid-test kernel: Buffer I/O error on device dm-8, logical block 591857 
     225 
     226(snip) 
     227 
     228May 10 12:41:36 raid-test kernel: device-mapper: thin: 252:2: metadata operation 'dm_pool_commit_metadata' failed: error = -1 
     229May 10 12:41:36 raid-test kernel: device-mapper: thin: 252:2: aborting current metadata transaction 
     230May 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{{{ 
     242May 10 12:53:17 raid-test kernel: device-mapper: thin: 252:2: reached low water mark for data device: sending event. 
     243May 10 12:53:17 raid-test kernel: device-mapper: thin: 252:2: switching pool to out-of-data-space mode 
     244May 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) 
     245May 10 12:53:17 raid-test kernel: buffer_io_error: 39292 callbacks suppressed 
     246May 10 12:53:17 raid-test kernel: Buffer I/O error on device dm-8, logical block 591872 
     247May 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 
     251May 10 12:53:17 raid-test lvm[303]: Thin vg-pool0-tpool is now 100% full. 
     252May 10 12:53:27 raid-test kernel: EXT4-fs warning: 135366 callbacks suppressed 
     253May 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) 
     254May 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{{{ 
     265May 10 12:55:29 raid-test kernel: device-mapper: thin: 252:2: switching pool to write mode 
     266May 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}}}