Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently 'reorganizing' file structure within a RAIDZ1 volume. Moving directories from one dataset to another, which are both contained on the same volume.

SSH'ed into the machine and did a good old fashioned:

mv * destination

Shouldn't this be instantaneous? I understand it's spread across three drives, but at the same time, the files themselves don't really need to move - I just expected it to tweak the pointers for these files and be, well, basically instantaneous. It's definitely not. I have about 500G of data to move and it's been running for about half an hour now. o.O

Why isn't it near instant?

Specs: CPU: Intel G3220
MB: Gigabyte GA-B85-HD3
MEM: Kingston DDR3-1600 8GB
DISK: 3x2TB WD Green in RAIDZ1 volume

share|improve this question
    
Got any snapshots? –  MadHatter Mar 26 at 16:27
    
No snapshots, this is a brand new install that I setup just yesterday and then copied the files from an existing NTFS drive to this volume. –  miR Mar 26 at 16:29

1 Answer 1

up vote 6 down vote accepted

You are thinking about things from the wrong level, is all.

If you move a file within the confines of a single ZFS dataset, it will react similarly to what you're expecting. If you move a file within the confines of a pool, but between datasets, it is a real move. Yes, technically the data just went from point A to point B and both points are on the same platters - but from ZFS' perspective, it moved houses.

ZFS datasets are separate filesystems. Real filesystems. They can have different block sizes, compression settings, etc. Moving a file between two ZFS filesystems, even on the same pool, is a real move - bits get read and then written again, as opposed to just updating a pointer.

Functionally it is roughly analogous to moving a file between two ext4 filesystems that are technically coming from 2 partitions of the same hard disk - the two filesystems, despite sharing underlying hardware, are logically disparate and so no 'pointer' change can happen, it must physically move the file, even though it's really only copying data from one location to another on the same underlying drive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.