Robocopy did something weird and now my iSCSI volume shows it's at 100% capacity

Copper Contributor

Hello All,

 

I'd really appreciate some help resolving this issue.  I was using robocopy to copy the contents from one iSCSI volume to another - moving folder redirection contents from the old to the new location.  There was about 600-700GB worth of data that needed to be migrated. 

 

I'm not sure what happened but I noticed that I no domain system could access the redirected folders.  I checked my TrueNAS target to see that the iSCSI share was at 100%.  I looked at the Win2k22 initiator which showed the iSCSI volume as offline.  I tried to get it online using disk management, but I had no luck.  So, I used "diskpart" to bring it online.  The drive properties shows that 1.174T used out of 14T.  I used "shrink querymax" to see how much space I could reclaim, which was around 12T.  However, when I used "shrink" I was told the disk was write protected.  I cleared that attribute from the disk, but as soon as I do that, the volume goes down.

 

So, I'm a bit stuck.  I can't clear the attribute without having the drive and volume go offline, but whenever I bring the drive and volume online, the attribute goes right back to read-only.

 

Any any all help will be greatly appreciated to help me solve this problem.

 

SameerSheikh_0-1636371873017.png

SameerSheikh_1-1636371900028.png

SameerSheikh_2-1636372078964.png

 

5 Replies
If you use "robocopy.exe /MIR" from one Volume-Root to another Volume-Root, you have to specifically exclude "System Volume Information". If you did not do that, you effectively mirrored the sysvolinfo folder from the source filesystem to the destination filesystem, which may explain a lot of your problems.
There could be other reasons for your problems as well, but that would be the first that came to my mind.

If you want to copy whole volumes with robocopy you have to make sure not to include "System Volume Information" in your copy job. This is a hidden directory inside any NTFS, exFAT or ReFS Volume which contains (somtimes vital) additional volume information fo the filesystem. Additionally, if there are any reparse points or symlinks in your source, you should only copy the links, not the contents.

The correct way to mirror a volume with robocopy.exe would be something like this:
robocopy.exe X:\ Y:\ /MIR /XJ /XD "System Volume Information"
add to that all additional switches you want.
This would give you a full copy of the volume contents, without destroying the target sysvolinfo directory and without recursive copy of symlinks and reparse points.
Hello,

Thank you for the reply. Now I know what to do to copy over the content from the other redirected folders.

But this doesn't solve the problem that I'm having, so any suggestions on what I can now do to fix this issue?
The diskpart screenshot shows that all disk space is allocated to partitions. It doesn't mean that partitions are full. it just means that you won't be able to create new partitions as all disk space is already allocated. It has nothing to do with the free space.

The write protected disk issue you need address on the iSCSI server side (TrueNAS). Disconnect the iSCSI disk and repartition inside TrueNAS, then reconnect it again.
A bit orthogonal question:
Sameer, could you please run "fsutil fsinfo sectorinfo f:"?
Does it say "Trim supported" or "Trim Not Supported"?

With respect to the write protected issue, if it's a result of TrueNAS, then why can I remove the write protection through DiskPart?

 

The problem with repartitioning is that I'll lose everything on that iSCSI disk/volume.  So, this isn't an acceptable option.  I need to be able to resolve the issue without destroying the data.

Nothing different has happened with the TrueNAS server. I did not change anything on that server; the iSCSI share was working perfectly before I ran robocopy: robocopy seems to have broken everything.

 

As for disconnecting and reconnecting, I've disconnected and reconnected the iSCSI disk/volume many times, but that hasn't improved anything.

 

Here's the output of the command you requested:

 

SameerSheikh_0-1636845251808.png

 

It shows "Trim supported".