Logical Volume in FreeBSD with gconcat

New data come everyday make existing storage media no longer reliable, need to add new harddisk

New harddisk + old harddisk need to join in single volume

FreeBSD provide a few method, gvinum, gconcat and gstripe

Since I only have two harddisk I try use gconcat :

kongja# df -H

Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 5.2G 111M 4.7G 2% /
devfs 1.0k 1.0k 0B 100% /dev
/dev/ad0s1d 52G 38G 9.3G 80% /home
/dev/ad0s1e 7.3G 7.0G -295M 104% /usr
/dev/ad0s1f 11G 4.5G 6.0G 43% /var
/dev/ad2s1d 194G 137G 42G 77% /data3
/dev/ad1s1d 243G 1.9M 224G 0% /data2
/dev/ad3s1d 242G -12k 223G -0% /data4

unmount /data2 and /data4 for merger operation :

kongja# umount /data2
kongja# umount /data4

Merger :

kongja# gconcat label -v data5 /dev/ad1s1d /dev/ad3s1d

Metadata value stored on /dev/ad1s1d.
Metadata value stored on /dev/ad3s1d.
Done.

make new mount point :

kongja# mkdir /data5

kongja# mount /dev/concat/data5 /data5

Check size of new partition /data5

kongja# df -H /data5

Filesystem Size Used Avail Capacity Mounted on
/dev/concat/data5 485G 4.1k 446G 0% /data5

Great, to make it permanent, must add new entry in fstab and edit loader.conf :

geom_concat_load=”YES”

Yay, FreeBSD rocks

Can’t wait for 7.0 with ZFS 🙂