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

%3CLINGO-SUB%20id%3D%22lingo-sub-2938533%22%20slang%3D%22en-US%22%3ERobocopy%20did%20something%20weird%20and%20now%20my%20iSCSI%20volume%20shows%20it's%20at%20100%25%20capacity%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2938533%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20really%20appreciate%20some%20help%20resolving%20this%20issue.%26nbsp%3B%20I%20was%20using%20robocopy%20to%20copy%20the%20contents%20from%20one%20iSCSI%20volume%20to%20another%20-%20moving%20folder%20redirection%20contents%20from%20the%20old%20to%20the%20new%20location.%26nbsp%3B%20There%20was%20about%20600-700GB%20worth%20of%20data%20that%20needed%20to%20be%20migrated.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20sure%20what%20happened%20but%20I%20noticed%20that%20I%20no%20domain%20system%20could%20access%20the%20redirected%20folders.%26nbsp%3B%20I%20checked%20my%20TrueNAS%20target%20to%20see%20that%20the%20iSCSI%20share%20was%20at%20100%25.%26nbsp%3B%20I%20looked%20at%20the%20Win2k22%20initiator%20which%20showed%20the%20iSCSI%20volume%20as%20offline.%26nbsp%3B%20I%20tried%20to%20get%20it%20online%20using%20disk%20management%2C%20but%20I%20had%20no%20luck.%26nbsp%3B%20So%2C%20I%20used%20%22diskpart%22%20to%20bring%20it%20online.%26nbsp%3B%20The%20drive%20properties%20shows%20that%201.174T%20used%20out%20of%2014T.%26nbsp%3B%20I%20used%20%22shrink%20querymax%22%20to%20see%20how%20much%20space%20I%20could%20reclaim%2C%20which%20was%20around%2012T.%26nbsp%3B%20However%2C%20when%20I%20used%20%22shrink%22%20I%20was%20told%20the%20disk%20was%20write%20protected.%26nbsp%3B%20I%20cleared%20that%20attribute%20from%20the%20disk%2C%20but%20as%20soon%20as%20I%20do%20that%2C%20the%20volume%20goes%20down.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%2C%20I'm%20a%20bit%20stuck.%26nbsp%3B%20I%20can't%20clear%20the%20attribute%20without%20having%20the%20drive%20and%20volume%20go%20offline%2C%20but%20whenever%20I%20bring%20the%20drive%20and%20volume%20online%2C%20the%20attribute%20goes%20right%20back%20to%20read-only.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20any%20all%20help%20will%20be%20greatly%20appreciated%20to%20help%20me%20solve%20this%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SameerSheikh_0-1636371873017.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325160iC577198ADB6AFE06%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22SameerSheikh_0-1636371873017.png%22%20alt%3D%22SameerSheikh_0-1636371873017.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SameerSheikh_1-1636371900028.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325161i61DE02A4A47E677E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22SameerSheikh_1-1636371900028.png%22%20alt%3D%22SameerSheikh_1-1636371900028.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SameerSheikh_2-1636372078964.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325164iC6403B21796917B3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22SameerSheikh_2-1636372078964.png%22%20alt%3D%22SameerSheikh_2-1636372078964.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2938533%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eiscsi%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EStorage%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2942146%22%20slang%3D%22en-US%22%3ERe%3A%20Robocopy%20did%20something%20weird%20and%20now%20my%20iSCSI%20volume%20shows%20it's%20at%20100%25%20capacity%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2942146%22%20slang%3D%22en-US%22%3EIf%20you%20use%20%22robocopy.exe%20%2FMIR%22%20from%20one%20Volume-Root%20to%20another%20Volume-Root%2C%20you%20have%20to%20specifically%20exclude%20%22System%20Volume%20Information%22.%20If%20you%20did%20not%20do%20that%2C%20you%20effectively%20mirrored%20the%20sysvolinfo%20folder%20from%20the%20source%20filesystem%20to%20the%20destination%20filesystem%2C%20which%20may%20explain%20a%20lot%20of%20your%20problems.%3CBR%20%2F%3EThere%20could%20be%20other%20reasons%20for%20your%20problems%20as%20well%2C%20but%20that%20would%20be%20the%20first%20that%20came%20to%20my%20mind.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20want%20to%20copy%20whole%20volumes%20with%20robocopy%20you%20have%20to%20make%20sure%20not%20to%20include%20%22System%20Volume%20Information%22%20in%20your%20copy%20job.%20This%20is%20a%20hidden%20directory%20inside%20any%20NTFS%2C%20exFAT%20or%20ReFS%20Volume%20which%20contains%20(somtimes%20vital)%20additional%20volume%20information%20fo%20the%20filesystem.%20Additionally%2C%20if%20there%20are%20any%20reparse%20points%20or%20symlinks%20in%20your%20source%2C%20you%20should%20only%20copy%20the%20links%2C%20not%20the%20contents.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20correct%20way%20to%20mirror%20a%20volume%20with%20robocopy.exe%20would%20be%20something%20like%20this%3A%3CBR%20%2F%3Erobocopy.exe%20X%3A%5C%20Y%3A%5C%20%2FMIR%20%2FXJ%20%2FXD%20%22System%20Volume%20Information%22%3CBR%20%2F%3Eadd%20to%20that%20all%20additional%20switches%20you%20want.%3CBR%20%2F%3EThis%20would%20give%20you%20a%20full%20copy%20of%20the%20volume%20contents%2C%20without%20destroying%20the%20target%20sysvolinfo%20directory%20and%20without%20recursive%20copy%20of%20symlinks%20and%20reparse%20points.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2959397%22%20slang%3D%22en-US%22%3ERe%3A%20Robocopy%20did%20something%20weird%20and%20now%20my%20iSCSI%20volume%20shows%20it's%20at%20100%25%20capacity%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2959397%22%20slang%3D%22en-US%22%3EThe%20diskpart%20screenshot%20shows%20that%20all%20disk%20space%20is%20allocated%20to%20partitions.%20It%20doesn't%20mean%20that%20partitions%20are%20full.%20it%20just%20means%20that%20you%20won't%20be%20able%20to%20create%20new%20partitions%20as%20all%20disk%20space%20is%20already%20allocated.%20It%20has%20nothing%20to%20do%20with%20the%20free%20space.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20write%20protected%20disk%20issue%20you%20need%20address%20on%20the%20iSCSI%20server%20side%20(TrueNAS).%20Disconnect%20the%20iSCSI%20disk%20and%20repartition%20inside%20TrueNAS%2C%20then%20reconnect%20it%20again.%3C%2FLINGO-BODY%3E
Occasional 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".