検索条件
全2件
(1/1ページ)
本手順の例示構成 HDD1 : /dev/ada0 HDD2 : /dev/ada1 ミラーを構成するメンバー (/dev/ada0 + /dev/ada1) ↓ gmirror (mirorr/data2) ↓ GPTパーティション(gpart) ↓ UFS2ファイルシステム (mirror/data2p2)この構成で、ada0, ada1 を大きいHDDに置き換えて、ファイルシステムを拡張する。
dmesg | grep ^ada camcontrol devlist geom disk list smartctl -a /dev/ada0 smartctl -a /dev/ada1 cat /etc/fstabミラーの情報関係
gmirror list gmirror statusパーティション情報関係
gpart show gpart listファイルシステムの空き容量等
df -h df -g df -iその他 GEOM 関連ログ
grep GEOM /var/log/messages
書式: gmirror remove ミラー名 メンバー名 例: gmirror remove -v data2 ada0
# gmirror status data2 Name Status Components mirror/data2 COMPLETE ada0 (ACTIVE) ada1 (ACTIVE) # # gmirror remove -v data2 ada1 Done. # # gmirror status Name Status Components mirror/data2 COMPLETE ada0 (ACTIVE) #
書式: gmirror forgetミラー名 例: gmirror forget -v data2
# gmirror status data2 Name Status Components mirror/data2 DEGRADED ada1 (ACTIVE) # # gmirror forget data2 # gmirror status data2 Name Status Components mirror/data2 COMPLETE ada1 (ACTIVE) #
書式: gmirror insert ミラー名 メンバー名 例: gmirror insert -v data2 ada1
# gmirror status Name Status Components mirror/data2 COMPLETE ada0 (ACTIVE) # gmirror insert -v data2 ada1 Done. # gmirror status Name Status Components mirror/data2 DEGRADED ada0 (ACTIVE) ada1 (SYNCHRONIZING, 0%) #
書式: gmirror resize ミラー名 例: gmirror resize -v data2
# gmirror list data2 Geom name: data2 State: COMPLETE Components: 2 Balance: load Slice: 4096 Flags: NONE GenID: 0 SyncID: 2 ID: 706164073 Type: AUTOMATIC Providers: 1. Name: mirror/data2 Mediasize: 4000787029504 (3.6T) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e2 Consumers: 1. Name: ada1 Mediasize: 16000900661248 (15T) (略) # # gmirror resize -v data2 Done. # # gmirror list data2 Geom name: data2 State: COMPLETE Components: 2 Balance: load Slice: 4096 Flags: NONE GenID: 0 SyncID: 2 ID: 706164073 Type: AUTOMATIC Providers: 1. Name: mirror/data2 Mediasize: 16000900660736 (15T) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r2w2e3 Consumers: 1. Name: ada1 Mediasize: 16000900661248 (15T) (略) #
書式: gpart show gpart resize -i インデックス番号 mirror/data2 例: gpart resize -i 2 mirror/data2
# gpart show => 40 31251759024 mirror/data2 GPT (15T) 40 4056 - free - (2.0M) 4096 125829120 1 freebsd-swap (60G) 125833216 28672 - free - (14M) 125861888 7688159232 2 freebsd-ufs (3.6T) 7814021120 23437737944 - free - (11T) # gpart resize -i 2 mirror/data2 mirror/data2p2 resized # # gpart show => 40 31251759024 mirror/data2 GPT (15T) 40 4056 - free - (2.0M) 4096 125829120 1 freebsd-swap (60G) 125833216 28672 - free - (14M) 125861888 31125897176 2 freebsd-ufs (14T) #
書式: growfs マウントポイント名 growfs デバイス名 例: growfs /home
# growfs /home Device is mounted read-write; resizing will result in temporary write suspension for /home. It's strongly recommended to make a backup before growing the file system. OK to grow filesystem on /dev/mirror/data2p2, mounted on /home, from 3.6TB to 14TB? [yes/no] yes super-block backups (for fsck_ffs -b #) at: 7689935040, 7691762496, 7693589952, 7695417408, 7697244864, 7699072320, 7700899776, 7702727232, 7704554688, 7706382144, 7708209600, 7710037056, 7711864512, 7713691968, 7715519424, 7717346880, 7719174336, 7721001792, 7722829248, 7724656704, 7726484160, 7728311616, 7730139072, 7731966528, 7733793984, 7735621440, 7737448896, 7739276352, 7741103808, 7742931264, 7744758720, 7746586176, 7748413632, 7750241088, 7752068544, 7753896000, 省略 31077716928, 31079544384, 31081371840, 31083199296, 31085026752, 31086854208, 31088681664, 31090509120, 31092336576, 31094164032, 31095991488, 31097818944, 31099646400, 31101473856, 31103301312, 31105128768, 31106956224, 31108783680, 31110611136, 31112438592, 31114266048, 31116093504, 31117920960, 31119748416, 31121575872, 31123403328, 31125230784 #どうでもいいけど super-block backups 多すぎでは・・・?