Chinaunix首页 | 论坛 | 博客
  • 博客访问: 129532
  • 博文数量: 17
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 207
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-07 09:39
文章分类

全部博文(17)

文章存档

2017年(1)

2015年(1)

2014年(15)

我的朋友

分类: 服务器与存储

2014-09-15 15:04:56

 日志

 

手动切割卷日志

命令格式:

 

#gluster volume log rotate VOLNAME

 

Forexample

glustervolume log rotate testvolume

 

日志路径:/var/log/glusterfs/bricks/brickPath.log.epoch-time-stamp

 

清除文件锁

 

当文件需要清除锁时,可以手动处理

 

命令格式:

 

#gluster volume clear-locks VOLNAMEPATH kind {blocked | granted | all}

{inode [RANGE] | entry [BASENAME] | posix [RANGE]}

 

如何查看哪些文件被锁定?

 

# gluster volume statedump VOLNAME

这样生成状态文件,通过对文件的分析得到加锁的文件。文件在server.statedump-path指定的目录下,文件名为 BRICK-PATH.BRICK-PID.dump.EPOCH-TIME-STAMP 

 

example

清除granted文件锁:

 

# cat/tmp/dump/data.20282.dump.1409039654

===========================================================

[xlator.features.locks.vol-locks.inode]

path=/

mandatory=0

entrylk-count=1

lock-dump.domain.domain=vol-replicate-0

xlator.feature.locks.lock-dump.domain.entrylk.entrylk[0](ACTIVE)=type=ENTRYLK_WRLCKon basename=file1, pid = 714782904,

 

===========================================================

 

#gluster volume clear-locks test-volume / kind granted entry file1

 

2  清除granted inode锁:

 

# cat/tmp/dump/data1.20283.dump.1409039676

===========================================================

[xlator.features.locks.vol-locks.inode]

path=/file1

mandatory=0

inodelk-count=1

lock-dump.domain.domain=vol-replicate-0

inodelk.inodelk[0](ACTIVE)=type=WRITE,whence=0, start=0, len=0, pid =714787072,

 

===========================================================

 

#gluster volume clear-locks test-volume /file1 kind granted inode 0,0-0

 

3  清除granted POSIX锁:

 

# cat/tmp/dump/data1.20284.dump.1409049672

===========================================================

xlator.features.locks.vol1-locks.inode]

path=/file1

mandatory=0

posixlk-count=15

posixlk.posixlk[0](ACTIVE)=type=WRITE,whence=0, start=8, len=1, pid =23848,

……

posixlk.posixlk[1](BLOCKED)=type=WRITE, whence=0, start=0, len=1, pid = 1,owner=30404146522d436c-69656e7432, transport=0x1206980, , blocked

===========================================================

 

#gluster volume clear-locks test-volume /file1 kind granted posix 0,8-1

 

 清除blocked POSIX锁:

 

#gluster volume clear-locks test-volume /file1 kind blocked posix 0,0-1

阅读(2995) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~