Discussion:
[rsnapshot-discuss] cp -al command failing - "cannot create hard link"
Phill Edwards
2016-05-05 11:03:23 UTC
Permalink
I've just got rsnapshot up and running on a QNAP TS-410 NAS. It's
configured to backup files to a CIFS share on a second D-Link NAS which is
mounted on QNAP. When I ran rsnapshot for the 1st time everything got
backup up pretty much OK (there was a warning that I haven't investigated
yet).

But on running it on day 2, I'm getting errors related to creating hard
links:

# /share/MD0_DATA/.qpkg/Entware-ng/bin/rsnapshot daily
echo 5564 > /opt/var/run/rsnapshot.pid
/opt/bin/cp -al \
/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.0 \
/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder1/HDTV_SetTopBox.doc’
to ‘/mnt/rf/nd/0/04
0aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.0/nas-homes/share/homes/fred/Fred_Folder1/HDTV_SetTopBox.doc’:
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder1/Motorola_T505.pdf’
to ‘/mnt/rf/nd/0/040
aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.0/nas-homes/share/homes/fred/Fred_Folder1/Motorola_T505.pdf’:
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder1/tvpalm.txt’
to ‘/mnt/rf/nd/0/040aa9057f
c9a5f60e7348b346830549edacaee5/Backups/daily.0/nas-homes/share/homes/fred/Fred_Folder1/tvpalm.txt’:
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder2/SunnyBoy_2015-12-16.GIF’
to ‘/mnt/rf/nd
/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.0/nas-homes/share/homes/fred/Fred_Folder2/SunnyBoy_2015-12-16.GIF’:
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/TeamClashes.txt’
to ‘/mnt/rf/nd/0/040aa9057fc9a5f60e
7348b346830549edacaee5/Backups/daily.0/nas-homes/share/homes/fred/TeamClashes.txt’:
No such file or directory

I ran "cp --help" and it says the "a" and "l" options are supported so I
don't think it's an issue with cp. Can anyone advise how to start
trouble-shooting this? Could it be something to do with the way the share
is mounted - perhaps something odd about the CIFS share that doesn't allow
hard links?

TIA,
Phill
Phill Edwards
2016-05-05 11:09:17 UTC
Permalink
BTW, I meant to add that the daily.1 directrory and sub-directrories got
created properly, but no hard links could be created in those directrories.

I also found that there some directories called cp_al1 and cp_al2 got
created at the same level as daily.0 and daily.1. I'm not sure if this is
normal or a symptom of the problem.

Regards,
Phill
Post by Phill Edwards
I've just got rsnapshot up and running on a QNAP TS-410 NAS. It's
configured to backup files to a CIFS share on a second D-Link NAS which is
mounted on QNAP. When I ran rsnapshot for the 1st time everything got
backup up pretty much OK (there was a warning that I haven't investigated
yet).
But on running it on day 2, I'm getting errors related to creating hard
# /share/MD0_DATA/.qpkg/Entware-ng/bin/rsnapshot daily
echo 5564 > /opt/var/run/rsnapshot.pid
/opt/bin/cp -al \
/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.0 \
/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder1/HDTV_SetTopBox.doc’
to ‘/mnt/rf/nd/0/04
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder1/Motorola_T505.pdf’
to ‘/mnt/rf/nd/0/040
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder1/tvpalm.txt’
to ‘/mnt/rf/nd/0/040aa9057f
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/Fred_Folder2/SunnyBoy_2015-12-16.GIF’
to ‘/mnt/rf/nd
No such file or directory
/opt/bin/cp: cannot create hard link
‘/mnt/rf/nd/0/040aa9057fc9a5f60e7348b346830549edacaee5/Backups/daily.1/nas-homes/share/homes/fred/TeamClashes.txt’
to ‘/mnt/rf/nd/0/040aa9057fc9a5f60e
No such file or directory
I ran "cp --help" and it says the "a" and "l" options are supported so I
don't think it's an issue with cp. Can anyone advise how to start
trouble-shooting this? Could it be something to do with the way the share
is mounted - perhaps something odd about the CIFS share that doesn't allow
hard links?
TIA,
Phill
Helmut Hullen
2016-05-05 12:56:00 UTC
Permalink
Hallo, Phill,
Post by Phill Edwards
I've just got rsnapshot up and running on a QNAP TS-410 NAS. It's
configured to backup files to a CIFS share on a second D-Link NAS
which is mounted on QNAP.
What file system? "cifs" is a network system, no disc system.
Post by Phill Edwards
When I ran rsnapshot for the 1st time
everything got backup up pretty much OK (there was a warning that I
haven't investigated yet).
But on running it on day 2, I'm getting errors related to creating
Are you root on both systems?

Viele Gruesse!
Helmut
Nico Kadel-Garcia
2016-05-06 10:34:59 UTC
Permalink
Post by Helmut Hullen
Hallo, Phill,
Post by Phill Edwards
I've just got rsnapshot up and running on a QNAP TS-410 NAS. It's
configured to backup files to a CIFS share on a second D-Link NAS
which is mounted on QNAP.
What file system? "cifs" is a network system, no disc system.
Post by Phill Edwards
When I ran rsnapshot for the 1st time
everything got backup up pretty much OK (there was a warning that I
haven't investigated yet).
But on running it on day 2, I'm getting errors related to creating
Are you root on both systems?
Viele Gruesse!
Helmut
CIFS..... is not your friend for anything reliant on hardlinks. If the
NAS supports NFS, use that instead.

Loading...