先停止 mongod 的服務,
語法: mongod --dbpath DB資料匣 --repair --repairpath 修復後的DB資料匣
範例: mongod --dbpath /data/db --repair --repairpath /data/db0
修復期間,會在 DB資料匣 建立一個 mongod.lock 以防止 MONGO 服務啟動
修復完畢,會自動被刪除掉。
要注意的是,修復好的DB 必須要注意其擁有者權限是否被更動為 root 了
不然 MONGO 服務就會啟動失敗,一旦啟動失敗 立刻查看 LOG 最後的紀錄原因。
參考資料
- THE END -
搜尋此網誌
2017年3月3日 星期五
2017年2月25日 星期六
Linux mount NFS Using TCP
The default transport protocol for NFS is UDP; however, the Red Hat Enterprise Linux 3 kernel includes support for NFS over TCP. To use NFS over TCP, include the -o tcp option to mount when mounting the NFS-exported file system on the client system. For example:
mount -o tcp shadowman.example.com:/misc/export /misc/local
If the NFS mount is specified in /etc/fstab:
server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr,tcp
If it is specified in an autofs configuration file:
myproject -rw,soft,intr,rsize=8192,wsize=8192,tcp penguin.example.net:/proj52
Since the default is UDP, if the -o tcp option is not specified, the NFS-exported file system is accessed via UDP.
The advantages of using TCP include the following:
The main disadvantage is that there is a very small performance hit due to the overhead associated with the TCP protocol.
Source:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/System_Administration_Guide/s1-nfs-mount.html
mount -o tcp shadowman.example.com:/misc/export /misc/local
If the NFS mount is specified in /etc/fstab:
server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr,tcp
If it is specified in an autofs configuration file:
myproject -rw,soft,intr,rsize=8192,wsize=8192,tcp penguin.example.net:/proj52
Since the default is UDP, if the -o tcp option is not specified, the NFS-exported file system is accessed via UDP.
The advantages of using TCP include the following:
- Improved connection durability, thus less NFS stale file handles messages.
- Performance gain on heavily loaded networks because TCP acknowledges every packet, unlike UDP which only acknowledges completion.
- TCP has better congestion control than UDP (which has none). On a very congested network, UDP packets are the first types of packet that are dropped. Which means if NFS is writing data (in 8K chunks) all of that 8K has to retransmitted. With TCP because of its reliability, one parts of that 8K data is transmitted at a time.
- Error detection. When a tcp connection breaks (due to the server going down) the client stops sending data and starts the reconnection process. With UDP, since its connection-less, the client continue to pound the network with data until server comes up.
The main disadvantage is that there is a very small performance hit due to the overhead associated with the TCP protocol.
Source:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/System_Administration_Guide/s1-nfs-mount.html
2017年2月15日 星期三
Ubuntu 文字轉圖形登入
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fxlrg
sudo apt-get install xserver-xorg-core
sudo apt-get install xserver-xorg
sudo apt-get install xorg
sudo apt-get install xorg openbox
sudo apt-get install xauth
sudo apt-get install ubuntu-desktop
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
echo mate-session> ~/.xsession
sudo systemctl restart xrdp
echo mate-session> ~/.xsession
sudo systemctl restart xrdp
2017年2月12日 星期日
解出 mRemoteNG 連線密碼
有時候忘記自己所設定的 連線密碼
參考
http://dynamic-datacenter.be/?p=168
參考
http://dynamic-datacenter.be/?p=168
- Open mRemote and go to “Tools” > “External Tools”
- Right-click in the white space and choose “New External Tool”
- In the External Tools Properties, fill in a “Display Name”, “Filename” and some “arguments”.
In this scenario I filled in"Password lookup"
,CMD
and"/k echo %password%"
. - Go to the connection where you would like to reveal the connection and right-click on it and choose “External tools” > “Password lookup.
2017年2月11日 星期六
LINUX KVM qcow2 轉 vmware vmdk 格式
LINUX KVM qcow2 轉 vmware vmdk 格式
範例:
qemu-img convert -p 192.168.1.2_sourcecontrol-2.qcow2 -O vmdk /var2/4esxi/192.168.1.2_sourcecontrol-2.vmdk
範例:
qemu-img convert -p 192.168.1.2_sourcecontrol-2.qcow2 -O vmdk /var2/4esxi/192.168.1.2_sourcecontrol-2.vmdk
2017年2月10日 星期五
ESXi mount NFS 網路磁碟機
mount NFS 網路磁碟機
例如:
esxcfg-nas -a -o 10.0.0.200 -s /volume2/Cluster nfs_cluster nfs_cluster
刪除 NFS 網路磁碟機
例如:
esxcfg-nas -d nfs_cluster
- The End -
例如:
esxcfg-nas -a -o 10.0.0.200 -s /volume2/Cluster nfs_cluster nfs_cluster
刪除 NFS 網路磁碟機
例如:
esxcfg-nas -d nfs_cluster
- The End -
訂閱:
文章 (Atom)