what is happening here? Resource usage with cp -Rf * ../blah/ followed by cp -Rf .* ../blah/

Status
Not open for further replies.

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
Why is the target disk (first image) being used constantly while the source disks are all pretty much idle (second image)?
Target:
f043d581b30c9241007688a91a29a892.png

http://screenshotlink.ru/f043d581b30c9241007688a91a29a892.png

Source:
001fbde7d86bf401d896b9852c04eede.png

http://screenshotlink.ru/001fbde7d86bf401d896b9852c04eede.png

What happened before this? I am transferring all existing ZFS data from /mnt/ZFS_MOUNT/ to /mnt/TargetTransferDisk/ as follows:
[root@freenas] /mnt/TargetTransferDisk# cp -Rf ../ZFS_MOUNT/* .

That copy finished in about 3 hours or so (with the target disk being used for 150MB - 200MB on average).

Then, to be certain I wouldn't miss anything, I gave the following command:
[root@freenas] /mnt/TargetTransferDisk# cp -Rf ../ZFS_MOUNT/.* .

That command has been running now for about a good 9 hours... The command still isn't done and I get the weird screenshots above...

Anyone an idea what's happening here technically? I can't explain it :)

Peace!

Devvie

PS: no other tasks are running, I'm rebuilding this NAS after a few years due to hardware upgrades and some set backs : ) I'm still on 9.3, but my question here is not about FreeNAS perse, but more a BSD question in nature... When the cp * command finished all disks showed 0 bytes disk usage - confirming no other tasks are running on it nor or any media files indexed (there are none) or is a workstation in the network working on it... I'm just rebuilding by first making a backup of all existing ZFS data. Thank you ;p
 
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Don't expect people to follow links to image hosts. Especially if they end in dubious TLDs like .ru, .ua or .cn.

Post your images directly to the forum, or, even better, grab the text from the console.
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
it's a png... don't exagerate ;p

Anyone actually willing to help can even do it without the pictures...
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
the /.* copy command is STILL not done working... What the frack is it doing for 16 hours with 50MB - 80MB data IO on the target disk and hardly any data IO on the source disks that make up the ZFS pool? What is BSD doing here??
 
Last edited:

styno

Patron
Joined
Apr 11, 2016
Messages
466
Are you copying the contents of the .snapshot directory right now?
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
oh good one : )

Let me check...

EDIT: I don't think snapshots are an issue here... I'm still looking for the .snapshot folder but the following command gave <15MB of USED data...
zfs list -t snapshot

The .* copy command is now running for close to a day... Target still heavily being used, source disks more or less idling...

Thank you for thinking along - it's weird, right? I copied all "real" "*" data within 3 hours - within my estimates of how long it could take to backup my data. I'll look a bit more.

Picture below: "Pipi" = the ZFS_MOUNT source folder given above...
http://screenshotlink.ru/3dcc6b239c805139392abaff7a55da4e.png
3dcc6b239c805139392abaff7a55da4e.png
 
Last edited:

styno

Patron
Joined
Apr 11, 2016
Messages
466
Oi, my bad, snapshots are in /mnt/yourpool/.zfs/snapshot
Used data can be small but the view in the snapshot directory refers to the actual filesystem at the time of the snapshot. With 4 snapshots active you'll be copying your data 4 times.
Any reason why you are not using the buitin zfs send/receive options to replicate your data?
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
Yes, a very good reason even: I did not know about it : )
I quickly looked around for an export function, couldn't find one so started copying. Just the "*" went as expected.

I just read a bit more about snapshot folders (https://forums.freenas.org/index.php?threads/where-are-zfs-snapshots-actually-stored.3919/) and I more or less understand some magic is involved with snapshots (though I don't seem to have a folder .zfs anywhere according to "ls -lias")
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
Yup, it's hidden, just cd into it and your golden.
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
zfs send | zfs receive

omg... I'll give this a look tomorrow; that's too much for me right now : )

Thank you so far - still curious if anyone has other ideas... Just in case I'm missing something here : )
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
Yup, it's hidden, just cd into it and your golden.
I really don't think it's there... If I go to /mnt/ZFS_MOUNT/SET1/ and do an ls -lias, there's no .zfs :/
 

devnullius

Patron
Joined
Dec 9, 2015
Messages
289
UPDATE: ok, my 10TB disk just gave a filesystem full error for the cp.

I do need a new strategy to backup my ZFS pools :)

Looking at the target disk, I think some kind of recursion is happening... I now have in /mnt/TARGET_DISK another folder TARGETDISK and also another folder /mnt/TARGET_DISK/ZFS_MOUNT. Those folders shouldn't be there. So somewhere in unix, this is not ok to do: cp -Rf .* ../blah (while cp -Rf * ../blah works like a charm from the same folder).
 
Last edited:
Status
Not open for further replies.
Top