I am trying to create snapshot for mongodb on centos 6.6.
root@ ~]# lvscan
File descriptor 12 (pipe:[23409]) leaked on lvscan invocation. Parent
PID 3579: /bin/bash
File descriptor 13 (pipe:[23409]) leaked on lvscan invocation. Parent
PID 3579: /bin/bash
ACTIVE '/dev/vg_test/lv_root' [50.00 GiB] inherit
ACTIVE '/dev/vg_test/lv_home' [411.49 GiB] inherit
ACTIVE '/dev/vg_test/lv_swap' [3.78 GiB] inherit
my mongodb data is in folder /home/db/mongodata. Command I need to run is
lvcreate -s -n mysnapshot -L450G /dev/mapper/vg_test-lv_home.
But this will take snapshot of whole volume.
- I want snapshot of only /home/db/mongodata. Is it possible?
- Also how to create this snapshot on another server directly rather than creating the snapshot on same machine and copying it to another server.
This query is related to https://stackoverflow.com/questions/29345965/creating-snapshot-for-mongodb/29346888?noredirect=1#comment46880237_29346888