TalAloni / iSCSIConsole

User-Mode iSCSI Target Server
GNU Lesser General Public License v3.0
195 stars 57 forks source link

Always crash when click "add physical disk" #8

Open ToomsDK opened 2 years ago

ToomsDK commented 2 years ago

Error1

Always crash when click "add physical disk"

Get this error every time, can it not just skip disk with errors and then show others


Exception: System.IO.IOException: Failed to get disk 0 online status, Win32 Error: 32 Source: ISCSIConsole at DiskAccessLibrary.Win32.PhysicalDisk.GetOnlineStatus(Boolean& isReadOnly) at ISCSIConsole.SelectPhysicalDiskForm.SelectPhysicalDiskForm_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

same error with 1.5.1 and 1.5.2

TalAloni commented 1 year ago

Thank you, I will look into it when I'll have time

wisperC4 commented 1 year ago

hello, i'm in the same situation win11 , try to mount a volume on physical disk 0 ( c:\ , d:\ e:\ 3 partitions, trying to mount e: or d: is crashing , c: is windows system, do not touch it. Regards

wisperC4 commented 1 year ago

i can mount it with read only flag, i think windows lock in write this volume

TalAloni commented 1 year ago

wisperC4. this is not the same situation, in your case you can see the list of physical disks unlike the issue the OP reported. Adding a physical disk for write access require that the disk will be available for the exclusive use of the program (i.e. no mounted volumes)

Gerry546 commented 1 year ago

I can confirm that this problem is not only on Win11, I ran into this problem today as well (windows 11) and also tried it on two windows 10 systems. One did have a problem (company laptop, more restrictive policies likely) and my home pc. On my homepc it seems to work like a charm. So I guess it has something to do with specific policies being active or not?

june-park-stradvision commented 6 months ago

hello. An exception occurs when try to connect an sdcard with two partitions (vfat and ext4) as a physical disk.

To add, If I first physically mounted a single partition disk and divided it into two partitions (vfat + ext4) in wsl2, everything worked properly.

When reconnecting later, it is not physically mounted with two partitions.

add physical: image

add volume: image

june-park-stradvision commented 5 months ago

How do I force an SD card to go offline? diskpart does not allow me to change it to offline, stating, "The operation is not supported on removable media."