欢迎您来到悍铭数据中心,开始互联网之旅!

新闻中心

freebsd7 RAID0, Geom方式 成功

 VMWARE,


# dmesg | grep -e "ad[0-9]:"
acpi_acad0: <AC Adapter> on acpi0
ad0: 14336MB <VMware Virtual IDE Hard Drive 00000001> at ata0-master UDMA33
ad1: 4096MB <VMware Virtual IDE Hard Drive 00000001> at ata0-slave UDMA33
ad3: 4096MB <VMware Virtual IDE Hard Drive 00000001> at ata1-slave UDMA33

ad0 安装有操作系统.
加载geom_stripe模块,kldload geom_stripe.ko 
geom_stripe_load="YES" added to  /boot/loader.conf

ad1与ad3大小都为4G
mkdir /smb   设置挂载点

#gstripe label -v st0 /dev/ad1 /dev/ad3   #加入二块硬盘做成一块
Metadata value stored on /dev/ad4.
Metadata value stored on /dev/ad6.
Done.

# dmesg | grep GEOM_STRIPE
GEOM_STRIPE: Device st0 created (id=1136015043).
GEOM_STRIPE: Disk ad1 attached to st0.
GEOM_STRIPE: Disk ad3 attached to st0.
GEOM_STRIPE: Device st0 activated.
#以上结果说明OK了

bsdlabel -w /dev/stripe/st0

# newfs -U /dev/stripe/st0
/dev/stripe/st0: 8192.0MB (16777200 sectors) block size 16384, fragment size 2048
        using 45 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
        with soft updates
super-block backups (for fsck -b #) at:
160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328, 3763680,
4140032, 4516384, 4892736, 5269088, 5645440, 6021792, 6398144, 6774496, 7150848, 7527200,
7903552, 8279904, 8656256, 9032608, 9408960, 9785312, 10161664, 10538016, 10914368, 11290720,
11667072, 12043424, 12419776, 12796128, 13172480, 13548832, 13925184, 14301536, 14677888,
15054240, 15430592, 15806944, 16183296, 16559648

没挂载之前
# df -hi
Filesystem     Size    Used   Avail Capacity iused   ifree %iused  Mounted on
/dev/ad0s1a    496M    138M    318M    30%    1758   64032    3%   /
devfs          1.0K    1.0K      0B   100%       0       0  100%   /dev
/dev/ad0s1e    496M     12K    456M     0%       6   65784    0%   /tmp
/dev/ad0s1f     11G    389M    9.7G     4%   22125 1461649    1%   /usr
/dev/ad0s1d    1.2G    3.1M    1.1G     0%     359  164503    0%   /var

香港云主机