Home » FreeBSD » growfs on FreeBSD (Tag: )

growfs on FreeBSD

2012/05/23 02:11

現在 Drive Network で提供している 共有サーバ ビジネスセレクト では、お客様のデータ領域を自由に拡張出来る様、ストレージ機器をマウントしています。

本日もメンテナンスを行いましたが、その手順の一部をご紹介しましょう。ストレージ機器での仮想ディスクのサイズ変更が完了した後、FreeBSD を single モードで再起動して growfs を実行するまでです。

# fdisk -BI /dev/da1

# fdisk -u /dev/da1
******* Working on device /dev/da1 *******
parameters extracted from in-core disklabel are:
cylinders=6527 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=6527 heads=255 sectors/track=63 (16065 blks/cyl)

Do you want to change our idea of what BIOS thinks ? [n]
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 104856192 (51199 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 382/ head 254/ sector 63
Do you want to change it? [n] y
Supply a decimal value for "sysid (165=FreeBSD)" [165]
Supply a decimal value for "start" [63]
Supply a decimal value for "size" [104856192]
Explicitly specify beg/end address ? [n]
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 104856192 (51199 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 382/ head 254/ sector 63
Are we happy with this entry? [n] y
The date for partition 2 is:
<UNUSED>
Do you want to change it? [n]
The date for partition 3 is:
<UNUSED>
Do you want to change it? [n]
The date for partition 4 is:
<UNUSED>
Partition 1 is marked active
Do you want to change the active partition? [n]

We haven't changed the partition table yet.  This is your last chance.
parameters extracted from in-core disklabel are:
cylinders=6527 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=6527 heads=255 sectors/track=63 (16065 blks/cyl)

Information from DOS bootblock is:
1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 104856192 (51199 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 382/ head 254/ sector 63
2: <UNUSED>
3: <UNUSED>
4: <UNUSED>
Should we write new partition table? [n] y
fdisk: Geom not found: "da1"

# growfs -y /dev/da1
new file systemsize is: 26214400 frags
Warning: 231744 sector(s) cannot be allocated.
growfs: 51086.8MB (104625856 sectors) block size 16384, fragment size 2048
        using 278 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
        with soft updates
super-block backups (for fsck -b #) at:
 83926656, 84303008, 84679360, 85055712, 85432064, 85808416, 86184768,
 86561120, 86937472, 87313824, 87690176, 88066528, 88442880, 88819232,
 89195584, 89571936, 89948288, 90324640, 90700992, 91077344, 91453696,
 91830048, 92206400, 92582752, 92959104, 93335456, 93711808, 94088160,
 94464512, 94840864, 95217216, 95593568, 95969920, 96346272, 96722624,
 97098976, 97475328, 97851680, 98228032, 98604384, 98980736, 99357088,
 99733440, 100109792, 100486144, 100862496, 101238848, 101615200, 101991552,
 102367904, 102744256, 103120608, 103496960, 103873312, 104249664

# exit

上記は仮想ディスクを 40 -> 50GB に増やした場合の例です。FreeBSD では現状仮想ディスクでの拡張を OS 側で動的に認識させることが出来ないため、この様な手順を踏んでいます。

開始当初は現在のフロントサーバ + ストレージ機器の構成が可用性も高く、ストレージ機器自体も信頼性が高いためにベストと判断しましたが、お客様の利用頻度やデータ使用量のバランスを考えると、もっと良い構成がないか検討すべき時期に来ていると考えています。

機器内の RAID による冗長性ではなく、ノード単位で RAID ボリュームが簡単に組めるとかなり理想に近いのですが、現在模索中です。

Random Select

タコライス + メキシチョイス
自宅 de タコライス (S&B タコスシーズニング Part 3) で思わぬ成功に味をしめたので、再び挑戦しました。今回は OLD EL PASO タコ・シーズニング を手に入れるべく、隣駅
豚骨塩 チャーシューメン (1)
哲麺 (豚骨味噌 白髪ネギラーメン 味こいめ 脂あっさり) に続いて、今度は豚骨塩に挑戦です。普段はカウンターの奥側の席が多いですが、入口近くには不思議な絵柄の貼り紙が目に付きました。2014/11/
LEMONGINA (3)
一昨年 ORANGINA (オランジーナ) を投稿した後、去年も春から夏にかけて ORANGINA | オランジーナ にはお世話になりました。今年もそろそろあの微炭酸が恋しくなり始める頃と思いきや、新
南ぬ島 石垣空港 国内線
石垣島 (No. 12 – 味処 岩) の続きです。一度帰り、夜は 石垣島 (No. 3 – こてっぺん) を再び訪れて 3 日目は終わりました。翌日 05/07 は昼時のフラ
カジキの刺身
与那国島 (No. 9 – Dr. コトー診療所 Part 3) の続きです。念願の Dr. コトー診療所を満喫して 15:00 過ぎ。与那国島 (No. 1 ? 出発) の通りほぼ寝ずに
魚河岸フライ定食 (2014/01/14)
記事では 築地食堂 源ちゃん (海老かき揚げとお刺身定食) から 1 ヵ月空いていますが、3 日後にまた訪れています。この日は 2013 年最後の出勤日で、取引先の方がご挨拶に来た後、ランチに同行いた
Drive Network Philosophy
POP サーバプログラムもいくつか存在しますが、比較的マイナーなプログラムを使用しています。その名も popd と極めて汎用的な名称ですが /usr/ports/mail/popd/ に用意されていま
牛肩ロース 1kg (2)
ハッシュ・ド・ビーフの作り方 (No. 1) の続きです。牛肩ロース次は牛肩ロースを親指や人差し指大に細長く切って、塩・ブラックペパー・赤ワインで味付けしつつ強火で焼く。ミディアム程度かな。焼き終われ
豆カレー (ルー大盛り, 辛さ 70 倍)
前回の投稿 カリーライス専門店 エチオピア 本店 (No. 12 – 豆カレー 辛さ 50 倍) よりほぼ 1 年ぶりとなりました。その後 3 回程訪れた後は半年以上ブランクが開き、久しぶ
クリーミー生サーバー (11)
うまい ! がすごい。クリーミー生サーバー (Part 3) の続きです。まずはオーソドックスに、ザ・プレミアム・モルツ 350ml 缶を用意しました。飲み口を開けて本体向かって右側に向け、配管チュー
Valid HTML5 Valid CSS3 Another HTML Lint