zfs rename
command? It works instantaneously. No data will be re-written.testpool/media
/mnt/testpool/media/
zfs rename testpool/media testpool/media1
testpool/media
testpool/media1
and testpool/media
testpool/media1
to testpool/media/center
zfs rename testpool/media1 testpool/media/center
testpool/media1
remains in tact, however, it is now located under testpool/media/center
, as well as its contents under /mnt/testpool/media/center/
Amazing info, 30 seconds later:I just tried this out on a playground pool and it worked
gcp
added into Scale.media
to media-old
dataset, it was reflected immediately into UI. Related to dataset options, they are all preserved. In my case, they all showed as inherited, except the recordsize
, which kept the previous 1M custom value I've set (new media
dataset was created with 128k recordsize
). This reassured me the dataset rename did not affected in any way how data is stored inside the dataset. It was a pain when I moved all files from a 128k recordsize
dataset to another 1M recordsize
dataset. All this is explained into guide.ok, i understand.You mean that you already have a "center" dataset under default/media/center?
If that's the case, you're already set.
The zfs command will ("should") prevent you from overriding an existing dataset if you try to rename an old dataset to a new name that already exists as a dataset in your pool.
mc
or rsync
etc.This is a completely separate question. A new thread would be better.My question might be related to the discussion here, what's the best way to move files from a Linux system to TrueNAS Scale?
rsync -avhHxxs --progress /home/shig/mydata/ shig@192.168.1.100:/mnt/mypool/mydata/
I used rsync in the same way as aboveThis is a completely separate question. A new thread would be better.
But while we're here:
You can rsync directly from the Linux client to TrueNAS with a user account over SSH.
Something like this, as long as you've got your accounts, permissions, and datasets configured properly.
rsync -avhHxxs --progress /home/shig/mydata/ shig@192.168.1.100:/mnt/mypool/mydata/
No need to make multiple trips through NFS or SMB. Just rsync directly, bypassing everything else.
This is a completely separate question. A new thread would be better.
But while we're here:
You can rsync directly from the Linux client to TrueNAS with a user account over SSH.
Something like this, as long as you've got your accounts, permissions, and datasets configured properly.
rsync -avhHxxs --progress /home/shig/mydata/ shig@192.168.1.100:/mnt/mypool/mydata/
No need to make multiple trips through NFS or SMB. Just rsync directly, bypassing everything else.
Just tried and it works perfectly(my directories has Japanese names though, will figure out with exa and ripgrep to get a list). Thanks!I used rsync in the same way as above
I know I can zfs send between different pools but don't know I can even send/recivce with remote machine.If you are running ZFS as some Linux distros have started providing that option at install time, you can use the standard zfs send/recv, which quite honestly, I prefer due to it being more efficient; particularly for incremental changes on large files like VM images.
Typically, it's done through ssh and instead of the usual:I know I can zfs send between different pools but don't know I can even send/recivce with remote machine.
My Linux machine is not running zfs but it will be a good reading for me(found this https://pthree.org/2012/12/20/zfs-administration-part-xiii-sending-and-receiving-filesystems/). Thanks for that tip.
zfs send pool1/dataset1@snapshot | zfs recv pool2/dataset2
zfs send pool1/dataset1@snapshot | ssh nas2 zfs recv nas2/dataset2