File size totally wrong in windows explorer

Status
Not open for further replies.

Gen8 Runner

Contributor
Joined
Aug 5, 2015
Messages
103
Hey,
i changed my system from a HP Gen8 Supermicro to a selfmade homeserver (Supermicro board, don't think hardwarefacts are relevant for this problem).

Therefore i copied the data from the HP by scp command to the new Supermicro-machine and now i am having problems with the file size, empty endless subfolders etc.

In total there are 9.2 TIB used on the new server.

Some examples:
1. A folder with ~5700 files and the real size of ~30GB is on my laptop stored.
On the server, windows explorer says, that it includes ~996.000 (!) files, with a size of more than 4,5 TIB.

2. A folder on the server with the real size of about 8 TIB, is shown in windows explorer with size of ~600 Gb, so much too less.

3. In one folder, is one empty folder. I cannot delete it (Filename too long or damaged file), but i can open it, get in the next level, where it shows up again with the same folderstructure, open it again etc.
Like an endless subfolder.
When i deleted this one by shell (rm -r /mnt/......), i deleted this one, but also folders and data in a completly other folder.

Any ideas for a solution? Do you need a log and where can i get this?

Thank's a lot.
Gen8 Runner

I added an example.
Mainfolder: Just the one mainfolders, where the subfolders are in marked and got the size by windows explorer.
Subfolders: Alle subfolders marked and got the size by windows explorer.
 

Attachments

  • Mainfolder size.png
    Mainfolder size.png
    12.3 KB · Views: 269
  • Subfolders marked.png
    Subfolders marked.png
    8 KB · Views: 241
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I think new size calculation code is due soon.

The interaction between Windows, Samba and ZFS is not a trivial one.
 

Gen8 Runner

Contributor
Joined
Aug 5, 2015
Messages
103
Alright Eric, so no solution, yet!?

But how can it happen in the shell when i try to:
Delete something in:
rm -r /mnt/Public/Data

And freenas deletes something in:
rm -r /mnt/Files/Data

Looks to me, like a totally different direction, but the Public/Data direction was the "empty" one with a few TIB. Weird.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I'd like to see the SCP command you ran. It sounds interesting. For the heck of it, I once created a samba share full of folders containing symlinks loops. It really caused lots of fun for automated tools that tried to enumerate files on the share. :D

From the sound of it, I'd look for symlink stupidity first. Do you have good backups? If so, destroy the offending dataset, create a new one and transfer the data back. FYI, windows explorer will hate your face if you have a path with more than 250-ish characters in it.
 

Gen8 Runner

Contributor
Joined
Aug 5, 2015
Messages
103
Well,
let me remember in complete:

At first i ran an rsync operation, but it took too long (worked with about ~200mbit).
So i destroyed the new dataset and started the SCP command.
I THINK it was (haven't stored it) "scp -r -C /mnt/Data/..... /mnt/.../...."
But even that was quite slow, so i started transport by FP (with 1 Gbit):
"wget -r -N -l0 --ftp-user=Public --ftp-password=******* --directory-prefix=/mnt/SuperMicroNAS1/SuperMicroNAS1/Public ftp://192.168.178.**/Public/*"

That was the last command i used for it. The data on the original dataset was totally fine and had no issues in folder structure.

My original dataset is now already destroyed. When i uses the rm -r /mnt/..... command and tried to delete this folder, i had to run the last snapshot, to get all data back - i was already sweating about huge data loss, but thanks to snapshot, everything went fine.
Quite weird: Even if explorer show's just those ~600Gb of data, all the data are totally fine and there is not just any file damaged, just the symlink loops (open, open, open, open, open...never ends).

What i already tried yesterday:
Made a copy from the one dataset, to the other:
"cp -r /mnt/Data /mnt/...."

It copied everything, dataset size is similar, but even the folder structure folders exist (empty folder with a few TiB etc.).
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Well,
let me remember in complete:

At first i ran an rsync operation, but it took too long (worked with about ~200mbit).
So i destroyed the new dataset and started the SCP command.
I THINK it was (haven't stored it) "scp -r -C /mnt/Data/..... /mnt/.../...."
But even that was quite slow, so i started transport by FP (with 1 Gbit):
"wget -r -N -l0 --ftp-user=Public --ftp-password=******* --directory-prefix=/mnt/SuperMicroNAS1/SuperMicroNAS1/Public ftp://192.168.178.**/Public/*"

That was the last command i used for it. The data on the original dataset was totally fine and had no issues in folder structure.

My original dataset is now already destroyed. When i uses the rm -r /mnt/..... command and tried to delete this folder, i had to run the last snapshot, to get all data back - i was already sweating about huge data loss, but thanks to snapshot, everything went fine.
Quite weird: Even if explorer show's just those ~600Gb of data, all the data are totally fine and there is not just any file damaged, just the symlink loops (open, open, open, open, open...never ends).

What i already tried yesterday:
Made a copy from the one dataset, to the other:
"cp -r /mnt/Data /mnt/...."

It copied everything, dataset size is similar, but even the folder structure folders exist (empty folder with a few TiB etc.).
If you're still having problems with the space used being displayed incorrectly in Explorer, try enabling the "zfs_space" VFS module in your share's config.
 

Gen8 Runner

Contributor
Joined
Aug 5, 2015
Messages
103
I enabled zfs_space, will see what happens.

Next try:
Destroyed the second vdev, built a new one and just copying the biggest part to it by cp -r /
When finished, check the size and for symlink loops. When everything is fine, i copy the rest (about 1TiB) by windows explorer.
 
Status
Not open for further replies.
Top