Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solve the problem of the lack of hard disk space caused by the large capacity of MongoDB online

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Because 135 cannot add hard drives, data cannot be deleted. So the method of mount to the space of another machine is adopted. As follows:

1. Vim / etc/exports on 137

Added: / mnt/data/mongodb 192.168.10.135 (rw,no_root_squash)

Then: exportfs-rv

2. Operate on 135and the space of mount 137is local.

Mount-t nfs-o rw 192.168.10.137:/mnt/data/mongodb / data/mongodb

Add to: / etc/fstab:

192.168.10.137:/mnt/data/mongodb / data/mongodb nodev,rw,rsize=32768,wsize=32768 0 0

[note: I loaded it in the 20.2 server as follows:

192.168.20.21:/home/files / cheyooh/files nfs defaults,rw 0 0

]

3. Stop 135mongodb, kill-2 PID

4. The original startup method: toolbox/services/toolbox-mongodb/bin/mongod-dbpath=/data/toolbox-mongodb/db/-fork-logpath=/data/toolbox-mongodb/mongo27017.log

Change to: toolbox/services/toolbox-mongodb/bin/mongod-- dbpath=/data/mongodb/db/-- fork-- logpath=/data/mongodb/db/mongo27018.log

In this way, the write data space of mongodb has been transferred to 137.

5 、 End

=

Errors and Solutions:

1. NFS service startup: rpc.nfsd: writing fd to kernel failed: errno 111( Connection refused)

Solution:

Solution:

# service rpcbind restart

# service nfs start

2. Nfs mount error wrong fs type, bad option, bad superblock

Solution: # yum-y install nfs-utils

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report