Closed JustOneMoreDog closed 3 years ago
Thanks for the thorough debugging. It looks like there's a bug in my code here:
if (!matches) {
reject("Failed to parse output of ebsnvme-id: " + stdout);
} if (matches[0] === volume.VolumeId) {
resolve(device);
} else {
resolve(null);
}
That "if" on the same line as the } should have an "else" written before it. However fixing that will not resolve the problem, the root cause is that your instance has NVMe instance store drives attached with names that my code doesn't expect to find (it expects all NVMe devices to have a corresponding vol-xxx name). I'll test out that instance type you're using and get the routine fixed for it.
Of course happy to help in any way I can. I need to archive about a thousand snapshots so this tool has been an absolute life saver. Do you have any recommendations for a good instance type that would work the best? It would seem that the tool needs a lot of hard drive speed hence why I was trying to use an NVME instance. I moved back to using a m5a.large and it is working currently
On Tue, Aug 18, 2020, 1:44 PM Nicholas Sherlock notifications@github.com wrote:
Thanks for the thorough debugging. It looks like there's a bug in my code here:
if (!matches) { reject("Failed to parse output of ebsnvme-id: " + stdout); } if (matches[0] === volume.VolumeId) { resolve(device); } else { resolve(null); }
That "if" on the same line as the } should have an "else" written before it. However fixing that will not resolve the problem, the root cause is that your instance has NVMe instance store drives attached with names that my code doesn't expect to find (it expects all NVMe devices to have a corresponding vol-xxx name). I'll test out that instance type you're using and get the routine fixed for it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thenickdude/snap-to-s3/issues/14#issuecomment-675620401, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKBLTI7KYU66YXSOU6J5CN3SBK4ZVANCNFSM4QDS4JOQ .
Actually the speed is entirely capped by how long it takes Amazon to load the blocks from S3 that back the snapshot into EBS, and I don't think the instance type can speed this up.
The way to get more speed is to transfer multiple snapshots simultaneously, the speed scales up nicely with the number of simultaneous processes. You can set --upload-streams
to 1 to reduce snap-to-s3's memory usage to allow you to pack more processes onto the same instance.
That makes complete sense actually. Very good point. I had it backwards. Thank you so much!
On Tue, Aug 18, 2020, 5:49 PM Nicholas Sherlock notifications@github.com wrote:
Actually the speed is entirely capped by how long it takes Amazon to load the blocks from S3 that back the snapshot into EBS, and I don't think the instance type can speed this up.
The way to get more speed is to transfer multiple snapshots simultaneously, the speed scales up nicely with the number of simultaneous processes. You can set --upload-streams to 1 to reduce snap-to-s3's memory usage to allow you to pack more processes onto the same instance.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thenickdude/snap-to-s3/issues/14#issuecomment-675737375, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKBLTIYSBLJW27MTI7UQ5HLSBLZNJANCNFSM4QDS4JOQ .
Thanks for the bug report, this has now been fixed in snap-to-s3@0.4.4
I have been trying to figure out what is going on here for a while but am stuck due to my very limited understanding of Javascript.
So I went into the code and tried to modify it but with no luck
I have no clue what I am doing with Javascript so I could be completely wrong here but it would seem like there is a missing null check and or a null case not being handled?
This is what I get when I run the above modified code
Any help on this would be greatly appreciated
For reference the instance type I am using is M5ad.large