Inserting a key k into a B-tree T of height h is done in a single pass down the tree, requiring O(h) disk accesses.
Algorithm:
B-TREE-INSERT(T,k)
1 r $\leftarrow$ root[T];
2 if n[r] = 2t - 1
3 then s $\leftarrow$ ALLOCATE-NODE()
4 root[T] $\leftarrow$ s
5 leaf[s] $\leftarrow$ FALSE
6 n[s] $\leftarrow$ 0
7 c1[s] $\leftarrow$ r
8 B-TREE-SPLIT-CHILD(s,1,r)
9 B-TREE-INSERT-NONFULL(s,k)
10 else B-TREE-INSERT-NONFULL(r,k)
Reffer it :
http://staff.ustc.edu.cn/~csli/graduate/algorithms/book6/chap19.htm