Lxc storage volume move issue


I am getting the below error while moving storage volume on the lxc system to another one, ZFS is the backend, the lxd version is 5 and the command used is "lxc storage volume move "

Error: Failed storage volume creation: Error transferring storage volume: Problem with zfs receive: ([exit status 1 read tcp read: connection reset by peer]) cannot receive new filesystem stream: incomplete stream

Any help would be much appreciated.

Thank you

Please can you show the command you ran? It sounds like there may be an issue with the source volume or a network issue.

Hello Thomas,

The command is "lxc storage volume move ".

We had moved the CT to another machine which is okay now. We will post more details if we encounter similar issue again.

Thank you

we are getting similar issue again while moving the storage volume,
The error on the source machine is as follows:

root@machine1:~# lxc storage volume move default/vm-a machine2:default/vm-a
Error: Failed storage volume creation: Error transferring storage volume: Got error reading source

at the same time on the destination machine an error popup as below and the lxd is getting down.

ERROR  [2022-05-25T14:28:18+02:00] Error during migration sink                   err="Got error reading source"
panic: runtime error: slice bounds out of range [:-1]

goroutine 130686 [running]:
io.ReadAll({0x7f47c46af3f0, 0xc001246040})
        /usr/local/go/src/io/io.go:646 +0x197
github.com/lxc/lxd/lxd/storage/drivers.(*zfs).CreateVolumeFromMigration(_, {{0xc000e140f0, 0x10}, {0xc000e140a0, 0x7}, 0xc000a5a450, {0x183abad, 0x6}, {0xc0010e7800, 0xa}, ...}, ...)
        /root/lxd5.0/lxd-5.0.0/lxd/storage/drivers/driver_zfs_volumes.go:708 +0x1ac
github.com/lxc/lxd/lxd/storage.(*lxdBackend).CreateCustomVolumeFromMigration(0xc000172180, {0xc001181300, 0x7}, {0x1b4ae50, 0xc001246040}, {{0xc0010e77c8, 0x8}, {0x0, 0x0}, 0xc000afdda0, ...}, ...)
        /root/lxd5.0/lxd-5.0.0/lxd/storage/backend_lxd.go:3435 +0xeb6
main.(*migrationSink).DoStorage.func1(_, _, {{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...})
        /root/lxd5.0/lxd-5.0.0/lxd/migrate_storage_volumes.go:327 +0x264
        /root/lxd5.0/lxd-5.0.0/lxd/migrate_storage_volumes.go:403 +0x166
created by main.(*migrationSink).DoStorage.func2
        /root/lxd5.0/lxd-5.0.0/lxd/migrate_storage_volumes.go:385 +0x118

Any help would be much appreciated.
Thank you

Ah thanks, that’s useful, I think that issue is already fixed via shared/network: Always return 0 on error by monstermunchkin · Pull Request #10365 · lxc/lxd · GitHub and will be in lxd 5.2 and LXD 5.0.1

Can you let us know if this issue persists after those lxd versions as there have been quite a few optimized refresh fixes see Optimized refresh broken · Issue #10186 · lxc/lxd · GitHub

Hello Thomas,

Thank you for that. We will update the lxd version and check if the issue still occurring. Also, we had moved many containers to this machine and the issue had happened only with this container. All other containers moved before and after this one had no issues. Is there any chance something has gone wrong with this one?

Thank you

You could try doing lxc export <instance> <filename>.tar.gz to export it and the move the file to the target machine and do lxc import <filename>.tar.gz to move it using the backup subsystem?