Page 1 of 1

Migrate Logs and Data to new drives

Posted: Tue May 03, 2016 6:02 am
by nathanplatt
Hi Guys,

I've installed a new raid group to my server and want to migrate the data to the larger raid. How can I do this?

Code: Select all

lsblk
NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda               8:0    0 232.9G  0 disk
├─sda1            8:1    0   500M  0 part  /boot
└─sda2            8:2    0 232.4G  0 part
  ├─centos-root 253:0    0    50G  0 lvm   /
  ├─centos-swap 253:1    0   7.9G  0 lvm   [SWAP]
  └─centos-home 253:2    0 174.5G  0 lvm   /home
sdb               8:16   0 465.8G  0 disk
└─sdb1            8:17   0 465.8G  0 part
  └─md0           9:0    0 465.7G  0 raid1 /raid
sdc               8:32   0 465.8G  0 disk
└─sdc1            8:33   0 465.8G  0 part
  └─md0           9:0    0 465.7G  0 raid1 /raid
sr0              11:0    1  1024M  0 rom

Re: Migrate Logs and Data to new drives

Posted: Tue May 03, 2016 9:35 am
by hsmith
I would copy over and mount /usr/local/nagioslogserver/elasticsearch/data to another location with more space. That directory is where the logs are stored. Make sure you stop elasticsearch and logstash before making changes like this.

Re: Migrate Logs and Data to new drives

Posted: Tue May 03, 2016 7:42 pm
by Box293
Here's a guide on moving /var/log

https://support.nagios.com/kb/article.php?id=473

The method is the same, boot the server in single user mode and then move the files and change the mount settings.