Jump to content

cp --reflink won't work for vdisk files


Umizoomi

Recommended Posts

Hello Everyone,

 

I've been using unraid for about a month now and just this week bought the pro version. The main reason I'm using it is for playing gameswith 2 players on one machine. After hitting a few bumps, I've got this setup running smoothly. But there's still one thing I can't seem to figure out.

 

When I try to cp --reflink vdisks files, I'm getting an "cp: failed to clone 'file2' from 'file1': Invalid Argument". I can't find anything on Google or this forum regarding this issue. There are some topics talking about the fact that you have to use the absolute path, use the mounted folder and cp into the same directory. I'm doing all this, and it still doesnt work for me :L. Besides that, it does work for other files!

Following terminal output is given when im trying to cp --reflink an .img file:

root@Ux100:/mnt/cache/gamedisks# ls -lh
total 121G
-rw-rw-rw- 1 root root 50G Dec 22 11:30 fortnite.img
-rw-rw-rw- 1 root root 30G Dec 22 11:30 overwatch.img
-rw-rw-rw- 1 root root 70G Dec 22 11:30 worldofwarcraft.img
root@Ux100:/mnt/cache/gamedisks# cp --reflink /mnt/cache/gamedisks/fortnite.img /mnt/cache/gamedisks/fortnite_p2.img
cp: failed to clone '/mnt/cache/gamedisks/fortnite_p2.img' from '/mnt/cache/gamedisks/fortnite.img': Invalid argument
root@Ux100:/mnt/cache/gamedisks# ls -lh
total 121G
-rw-rw-rw- 1 root root 50G Dec 22 11:30 fortnite.img
-rw-rw-rw- 1 root root   0 Dec 22 12:36 fortnite_p2.img
-rw-rw-rw- 1 root root 30G Dec 22 11:30 overwatch.img
-rw-rw-rw- 1 root root 70G Dec 22 11:30 worldofwarcraft.img

And the following output when doing it with another file:

root@Ux100:/mnt/cache/gamedisks# echo "Hello.." > file1.txt
root@Ux100:/mnt/cache/gamedisks# cp --reflink file1.txt file2.txt
root@Ux100:/mnt/cache/gamedisks# echo "Is it me you're looking for?" >> file2.txt
root@Ux100:/mnt/cache/gamedisks# cat file1.txt
Hello..
root@Ux100:/mnt/cache/gamedisks# cat file2.txt
Hello..
Is it me you're looking for?
root@Ux100:/mnt/cache/gamedisks# ls -lh
total 121G
-rw-rw-rw- 1 root root   8 Dec 22 12:42 file1.txt
-rw-rw-rw- 1 root root  37 Dec 22 12:42 file2.txt
-rw-rw-rw- 1 root root 50G Dec 22 11:30 fortnite.img
-rw-rw-rw- 1 root root   0 Dec 22 12:36 fortnite_p2.img
-rw-rw-rw- 1 root root 30G Dec 22 11:30 overwatch.img
-rw-rw-rw- 1 root root 70G Dec 22 11:30 worldofwarcraft.img
root@Ux100:/mnt/cache/gamedisks#

gamedisks share settings:

mytgVEK.png

 

I'm really hoping someone knows what wrong here or atleast can send me into the right direction as I currently have no idea how to solve this.

 

Thanks!

Link to comment
1 minute ago, johnnie.black said:

Very strange, looks similar to this CentOS bug, though I have no issues doing it on my vdisks, are you on latest Unraid?

Yeah strange indeed. I've also come across that thread, altough I have no idea what they were talking about. I am on unraid version 6.6.5

What I did find out by now is that if I first create a copy of the file and then cp --reflink on the new file, it does work! I can then assign the original copied file and the reflinked to two different VM's and remove the original.

 

Could it be that you cannot --reflink on .img files created through the unraid UI?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...