在维护fusion 和sas 盘组成flashcache 的过程中遇到一些错误记录下来。
#flashcache_create -p back -b 16k cachedev /dev/fioa /dev/sdc1
cachedev cachedev, ssd_devname /dev/fioa, disk_devname /dev/sdc1 cache mode WRITE_BACK
block_size 32, md_block_size 8, cache_size 0
flashcache_create: Valid Flashcache already exists on /dev/fioa
flashcache_create: Use flashcache_destroy first and then create again /dev/fioa
错误提示说明:
fioa 上已经有创建了flashcache了要重新创建flahcache 必须使用 flashcache_destroy 命令 删除原有的设备 /dev/fioa
flashcache_destroy -f /dev/fioa
flashcache_create -p back -b 16k cachedev /dev/fioa /dev/sdc1
#flashcache_create -p back -b 16k cachedev /dev/fioa /dev/sdb1
cachedev cachedev, ssd_devname /dev/fioa, disk_devname /dev/sdb1 cache mode WRITE_BACK
block_size 32, md_block_size 8, cache_size 0
Flashcache metadata will use 768MB of your 96840MB main memory
device-mapper: reload ioctl failed: Device or resource busy
Command failed
echo 0 4688222208 flashcache /dev/sdb1 /dev/fioa cachedev 1 2 32 0 512 8 | dmsetup create cachedev failed
flashcache_create 无法在已经mount的文件系统上再做cache。
解决的办法:
umount /dev/sdb1
然后按照重新执行 flashcache_create 命令。
正确的做法是对/dev/sdb分区,建立ext4或者ext3,xfs 文件系统,然后利用flashcache_create 将ssd设备和文件系统映射起来构成/dev/mapper/cache,将该flashcache用ext4 ext3 xfs 的方式mount起来。