Network and Storage Protocols

Will a moved file reference the same blocks?

rjordan
2,297 Views

I have someone planning on a large scale restructuring on their CIFS share's directory structure. When a file is moved, will it still point to the same blocks? I imagine the inodes for the source and destination directories will be updated accordingly so there will be no write operation. This is a function of WAFL and not the access method (CIFS), right? So if they use Windows' move or Robocopy it should behave the same.

1 ACCEPTED SOLUTION

Darkstar
2,297 Views

Depends on how you do the move, and from where to where.

If you move files from one volume to another, the blocks will NOT be reused. If you move a file inside a volume, the blocks will get reused as the file basically only gets a new name. You have to do a "real" move though, a "copy & delete original" style operation will of course not work and will always result in new data blocks being used.

There's no way around this as it is how WAFL works (i.e. block-level re-use only works inside the same volume)

-Michael

View solution in original post

1 REPLY 1

Darkstar
2,298 Views

Depends on how you do the move, and from where to where.

If you move files from one volume to another, the blocks will NOT be reused. If you move a file inside a volume, the blocks will get reused as the file basically only gets a new name. You have to do a "real" move though, a "copy & delete original" style operation will of course not work and will always result in new data blocks being used.

There's no way around this as it is how WAFL works (i.e. block-level re-use only works inside the same volume)

-Michael

Public