MooseFS 2.x 常用命令
2015-05-13 by dongnan
环境
操作系统: CentOS 6.6 amd64
配置
ChunkServer: 物理机 4Core CPU/16GB Mem/单磁盘 1TB/1GB NIC
Master: VM 4Core CPU/4GB Mem/100GB Disk/1GB NIC
Client: VM 4Core CPU/4GB Mem/50GB Disk/1GB NIC
IP
master: 172.27.244.69
client: 172.27.244.99
chunk1: 172.27.244.31
chunk2: 172.27.244.32
chunk3: 172.27.244.33
举个栗子
设置3个副本
# 生产环境推荐3份副本
cd /mnt/mfs/
mkdir folder3
mfssetgoal -r 3 /mnt/mfs/folder3
cp /root/testfile folder3/
目录信息
# 副本数为1
mfsdirinfo folder1/
folder1/:
inodes: 2
directories: 1
files: 1
chunks: 2
length: 104857600
size: 104867840
realsize: 104867840
# 副本数为2
mfsdirinfo folder2/
folder2/:
inodes: 34
directories: 5
files: 29
chunks: 28
length: 108186319
size: 109457408
realsize: 214325248
# 副本数为3
mfsdirinfo folder3/
folder3/:
inodes: 2
directories: 1
files: 1
chunks: 2
length: 104857600
size: 104867840
realsize: 314603520
文件副本信息
mfsgetgoal folder1/testfile
folder1/testfile: 1
mfsgetgoal folder2/testfile
folder2/testfile: 2
mfsgetgoal folder3/testfile
folder3/testfile: 3
文件详细信息
mfsfileinfo html
html:
chunk 0: 0000000000078B4D_00000001 / (id:494413 ver:1)
copy 1: 172.27.244.31:9422
copy 2: 172.27.244.33:9422
mfscheckfile html
html:
chunks with 2 copies: 1
常用命令
mfsgetgoal
获取mfs目录、文件的副本数。mfssetgoa
设置mfs目录、文件的副本数。mfscheckfile
查看简单的副本数。mfsfileinfo
查看详细的副本数。mfsdirinfo
查看目录信息。mfsfileinfo
查看文件信息。mfsgettrashtime
获取垃圾箱的定隔时间。mfssettrashtime
设置垃圾箱的定隔时间。mfsmakesnapshot
快照。