释放sanlock,内存释放专家


注:黄色为注释

1、Sanlock查询:

[root@server ~]# sanlock client status -o p

daemon 4687917f-eae0-4298-89e8-220009d5d7f6.server.com

p -1 helper

p -1 listener

p -1 status

s 28f83d64-cf4e-45cf-87d8-6a262075e198:1:/rhev/data-center/mnt/192.168.5.111\:_home_vms/28f83d64-cf4e-45cf-87d8-6a262075e198/dom_md/ids:0

p 2435 

r 28f83d64-cf4e-45cf-87d8-6a262075e198:SDM:/rhev/data-center/mnt/192.168.5.111\:_home_vms/28f83d64-cf4e-45cf-87d8-6a262075e198/dom_md/leases:1048576:7 p 2435

[root@server ~]# sanlock client status -o p|s

-bash: s: command not found

[root@server ~]# sanlock client status -o s

daemon 4687917f-eae0-4298-89e8-220009d5d7f6.server.com

p -1 helper

p -1 listener

p -1 status

p 2435 

s 28f83d64-cf4e-45cf-87d8-6a262075e198:1:/rhev/data-center/mnt/192.168.5.111\:_home_vms/28f83d64-cf4e-45cf-87d8-6a262075e198/dom_md/ids:0

r 28f83d64-cf4e-45cf-87d8-6a262075e198:SDM:/rhev/data-center/mnt/192.168.5.111\:_home_vms/28f83d64-cf4e-45cf-87d8-6a262075e198/dom_md/leases:1048576:7 p 2435

[root@server ~]# sanlock client gets

s 28f83d64-cf4e-45cf-87d8-6a262075e198:1:/rhev/data-center/mnt/192.168.5.111:_home_vms/28f83d64-cf4e-45cf-87d8-6a262075e198/dom_md/ids:0 

2、Sanlock关闭释放

[root@server ~]# sanlock client shutdown -f 1

shutdown

shutdown done 0

注:

  sanlock client shutdown

       Ask the sanlock daemon to exit.  Without the force option (-f 0), the command will be ignored if any lockspaces exist.  With the force option (-f 1),

       any registered processes will be killed, their resource leases released, and lockspaces removed.

3、再次查询sanlock

[root@server ~]# sanlock client gets

gets error -111

注:

  sanlock client gets

       Print lockspaces being managed by the sanlock daemon.  The LOCKSPACE string will be followed by ADD or REM if the lockspace is currently being  added

       or removed.  Add -h 1 to also show hosts in each lockspace.

[root@server ~]# sanlock client status -o s

[root@server ~]# sanlock client status -o s

[root@server ~]# 


相关内容