Howdy,
I'm wanting to move a Data partition over to a new set of drives that
are encrypted. I decided the easiest way to do this is to put the new
drives on the NAS box and mount them like I do when I backup my large
Video directory only copy the Data files instead. So, on the NAS box, I
set up the three drives, 2 16TB and the famous 20TB drive, with LVM and dm-setup. Once I had that setup, I mounted in just like I would the
Video directory. I also ran exportfs -a so it would see the newly
mounted drive set and make it available. On my main rig, I then mounted
it using the same command I would for the Video directory for backups.
Then I took the same command for backing up my video but just replaced
the source and target with the Data path instead of video. Basically, everything is set up the same, I just replaced everything with the
drives I want info copied to in both mounting drives and commands.
This is the error I get.
rsync: [generator] recv_generator: mkdir "/mnt/TV_Backup/Data/random directory" failed: Permission denied (13)
I know to run the rsync command as a user, not root. I have to do that
when updating my video backups. I recall getting a error, could be this
one, at first but setting something to make it work. I can't recall
what I had to do tho. I also have no notes on this. I'm sure I'm
missing something but no idea what. Anyone ran into this before and
remember what to do to fix it? Internet searches aren't helping either.
Thanks.
Dale
:-) :-)
Michael wrote:
OK, I am confused ... :-/
If you want to update the contents of a fs over the network, then rsync is your tool. Why is NFS coming into this at all?
Assuming the user IDs are the same across systems, add '--numeric-ids'. That's all.
Well, I mount the drives on the NAS box over the network with nfs on my
main rig. It's just how I set it up. For some reason, it just won't
work this time. It works when I do my video backups tho. :/
It does mount fine and everything shows up. It's just that it won't let
me create a directory or anything to copy files over.
You get your system fixed?
Installing (411 of 481) ...
Michael wrote:
On Tuesday, 20 May 2025 14:27:51 British Summer Time Dale wrote:
Michael wrote:
OK, I am confused ... :-/
If you want to update the contents of a fs over the network, then rsync >>> is
your tool. Why is NFS coming into this at all?
Assuming the user IDs are the same across systems, add '--numeric-ids'. >>> That's all.
Well, I mount the drives on the NAS box over the network with nfs on my
main rig. It's just how I set it up. For some reason, it just won't
work this time. It works when I do my video backups tho. :/
NFS has other advantages, but running rsync through it ain't one of them.
Are the directories exported in the *same* way?
Do you use (rw) as an option?
Have you set up anonuid and anongid options in the exports for the IDs you want the remote users to acquire when connecting over NFS?
It does mount fine and everything shows up. It's just that it won't let >> me create a directory or anything to copy files over.
Can you drag & drop individual files using the GUI or CLI, without rsync?
Check the above suggestions in case one of them works for you.
However, I still think you should use rsync directly, since we're talking about updating remote data to match your local data - it is what it was designed for.
I had a idea. I checked permissions of things while connected to the
new data drive set. Then I pulled the backup drive set from the safe
and hooked it up. I then checked the permissions of it. There is
something different between the two. Could this be the problem. This
is the info, removing unneeded bits. This is the data drive set.
root@nas ~ # mount | grep /mnt
/dev/mapper/data on /mnt/backup type ext4 (rw,relatime)
root@nas ~ # ls -al /mnt/
total 24
drwxr-xr-x 6 root root 4096 May 12 23:43 .
drwxr-xr-x 17 root root 4096 Mar 23 10:05 ..
drwxr-xr-x 2 root root 4096 May 20 09:32 backup
root@nas ~ #
root@Gentoo-1 / # mount | grep TV_Backup
10.0.0.5:/mnt/backup on /mnt/TV_Backup type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,nocto,prot o=tcp,nconnect=4,timeo=600,retrans=2,sec=sys,clientaddr=10.0.0.4,local_lock= none,addr=10.0.0.5) root@Gentoo-1 / # ls /mnt/
total 68
drwxrwxr-x 17 dale users 4096 Oct 22 2024 .
drwxr-xr-x 18 root root 4096 Sep 11 2024 ..
drwxr-xr-x 2 root root 4096 May 20 09:32 TV_Backup
root@Gentoo-1 / #
This is the backup drive set which works fine.
root@nas ~ # mount | grep /mnt
/dev/mapper/backup on /mnt/backup type ext4 (rw,relatime)
root@nas ~ # ls -al /mnt/
total 24
drwxr-xr-x 6 root root 4096 May 12 23:43 .
drwxr-xr-x 17 root root 4096 Mar 23 10:05 ..
drwxr-xr-x 4 1000 users 4096 Aug 4 2024 backup
root@nas ~ #
root@Gentoo-1 / # mount | grep TV_Backup
10.0.0.5:/mnt/backup on /mnt/TV_Backup type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,nocto,prot o=tcp,nconnect=4,timeo=600,retrans=2,sec=sys,clientaddr=10.0.0.4,local_lock= none,addr=10.0.0.5) root@Gentoo-1 / # ls /mnt/
total 68
drwxrwxr-x 17 dale users 4096 Oct 22 2024 .
drwxr-xr-x 18 root root 4096 Sep 11 2024 ..
drwxr-xr-x 4 dale users 4096 Aug 4 2024 TV_Backup
root@Gentoo-1 / #
The difference is on the NAS box. Permissions are set to 1000:users. I don't recall setting that. So, I reconnected the data drive set and
changed the permissions to match the backup drive set. As I type, it is doing the backups.
I wonder, why does it have to be set that way???? Oh, you can bet I put
this info in a file, for me to forget I have when I run into this
again. :/
Dale
:-) :-)
P. S. Is there a better way to do this? I'm not worried about security
as it only goes between one box through my router to the other box. I
just need to be able to go both ways.
Michael wrote:
On Tuesday, 20 May 2025 17:30:34 British Summer Time Dale wrote:
I had a idea. I checked permissions of things while connected to the
new data drive set. Then I pulled the backup drive set from the safe
and hooked it up. I then checked the permissions of it. There is
something different between the two. Could this be the problem. This
is the info, removing unneeded bits. This is the data drive set.
root@nas ~ # mount | grep /mnt
/dev/mapper/data on /mnt/backup type ext4 (rw,relatime)
root@nas ~ # ls -al /mnt/
total 24
drwxr-xr-x 6 root root 4096 May 12 23:43 .
drwxr-xr-x 17 root root 4096 Mar 23 10:05 ..
drwxr-xr-x 2 root root 4096 May 20 09:32 backup
root@nas ~ #
root@Gentoo-1 / # mount | grep TV_Backup
10.0.0.5:/mnt/backup on /mnt/TV_Backup type nfs4
(rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,nocto,p >> rot
o=tcp,nconnect=4,timeo=600,retrans=2,sec=sys,clientaddr=10.0.0.4,local_l >> ock= none,addr=10.0.0.5) root@Gentoo-1 / # ls /mnt/
total 68
drwxrwxr-x 17 dale users 4096 Oct 22 2024 .
drwxr-xr-x 18 root root 4096 Sep 11 2024 ..
drwxr-xr-x 2 root root 4096 May 20 09:32 TV_Backup
root@Gentoo-1 / #
This is the backup drive set which works fine.
root@nas ~ # mount | grep /mnt
/dev/mapper/backup on /mnt/backup type ext4 (rw,relatime)
root@nas ~ # ls -al /mnt/
total 24
drwxr-xr-x 6 root root 4096 May 12 23:43 .
drwxr-xr-x 17 root root 4096 Mar 23 10:05 ..
drwxr-xr-x 4 1000 users 4096 Aug 4 2024 backup
root@nas ~ #
root@Gentoo-1 / # mount | grep TV_Backup
10.0.0.5:/mnt/backup on /mnt/TV_Backup type nfs4
(rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,nocto,p >> rot
o=tcp,nconnect=4,timeo=600,retrans=2,sec=sys,clientaddr=10.0.0.4,local_l >> ock= none,addr=10.0.0.5) root@Gentoo-1 / # ls /mnt/
total 68
drwxrwxr-x 17 dale users 4096 Oct 22 2024 .
drwxr-xr-x 18 root root 4096 Sep 11 2024 ..
drwxr-xr-x 4 dale users 4096 Aug 4 2024 TV_Backup
root@Gentoo-1 / #
The difference is on the NAS box. Permissions are set to 1000:users. I >> don't recall setting that. So, I reconnected the data drive set and
changed the permissions to match the backup drive set. As I type, it is >> doing the backups.
I wonder, why does it have to be set that way???? Oh, you can bet I put >> this info in a file, for me to forget I have when I run into this
again. :/
Dale
:-) :-)
P. S. Is there a better way to do this? I'm not worried about security >> as it only goes between one box through my router to the other box. I
just need to be able to go both ways.
Normally, /mnt is owned by root:root. Plain users are not allowed to create mountpoints at will.
UID 1000 would be the first user you set on this PC, e.g. 'dale'.
That makes sense then. I learned early on that I can not rsync as
root. It just plain doesn't like that at all. Works as a user tho. I
guess I could set up a group, called backup perhaps, and then put the
stuff under /mnt in that group and make it writable by the group
backup. I think that would work. Thing is, the NAS box doesn't have
any users, only root. It doesn't usually run much anyway, maybe a hour
or two each week.
I tend to put things that are mounted temporarily under /mnt. Things
that are more permanent, my video collection for example, actually
mounts to a mount point on my Desktop. That way I can click on the
little icon and go to whatever video I want. It may not make much sense
to anyone else but it works for me. ;-)
You get your OS back up and running?
Dale
:-) :-)
Michael wrote:
On Monday, 19 May 2025 14:39:21 British Summer Time Dale wrote:
Howdy,
I'm wanting to move a Data partition over to a new set of drives that
are encrypted. I decided the easiest way to do this is to put the new
drives on the NAS box and mount them like I do when I backup my large
Video directory only copy the Data files instead. So, on the NAS box, I >> set up the three drives, 2 16TB and the famous 20TB drive, with LVM and
dm-setup. Once I had that setup, I mounted in just like I would the
Video directory. I also ran exportfs -a so it would see the newly
mounted drive set and make it available. On my main rig, I then mounted >> it using the same command I would for the Video directory for backups.
Then I took the same command for backing up my video but just replaced
the source and target with the Data path instead of video. Basically,
everything is set up the same, I just replaced everything with the
drives I want info copied to in both mounting drives and commands.
This is the error I get.
rsync: [generator] recv_generator: mkdir "/mnt/TV_Backup/Data/random
directory" failed: Permission denied (13)
I know to run the rsync command as a user, not root.
I have to do that
when updating my video backups. I recall getting a error, could be this >> one, at first but setting something to make it work.
If you want to update the contents of a fs over the network, then rsync is your tool. Why is NFS coming into this at all?
I did some digging. I found some info on rsync to a networked system.
I switched to that method. This is the command I used.
time rsync -uivr --progress /home/dale/Desktop/Data/* root@10.0.0.5:/mnt/backup
My old way did act odd. It would read a lot of data from the main rig, transfer across the network and then write to the NAS drive. Then
repeat. It did not do it in a continuous way tho. It did them one at a time. Read a while. Transfer. Then write a while. Repeat. Overall, it was kinda slow, ish.
With this new method it is doing it all at the same time in a continuous
flow but slower.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 489 |
Nodes: | 16 (2 / 14) |
Uptime: | 28:04:30 |
Calls: | 9,665 |
Files: | 13,716 |
Messages: | 6,168,600 |