LINBIT / windrbd

DRBD driver for windows
GNU General Public License v2.0
51 stars 20 forks source link

drbd mount drive random access #15

Closed skdia15 closed 3 years ago

skdia15 commented 3 years ago

hi

old issue: drbd device ntfs filesystem not recognized #13

When there is only one resource, it is mounted as the set drive I try two resources were created and tested.

res1.res
device minor 1;
res2.res
device minor 2;

When

drbdadm up all
drbdadm primary all

Drive is set randomly, res1 => d:, e:, e:, d: ... res2 => e:, d:, d: e: ...

I couldn't change it through the disk manager Can this also be changed through drbd configurations?

johannesthoma commented 3 years ago

Hi skdia15,

Thanks for your bug report. I will try to reproduce and fix in the next days, ok?

Best wishes,

johannesthoma commented 3 years ago

Could you please post the relevant parts of your drbd config (the disk and device sections would be interresting),

Thanks,

skdia15 commented 3 years ago

Hi Johannes

The settings are as follows:

Physical 1 - Metadata 500MB, NTFS 500GB Physical 2 - Metadata 500MB, NTFS 500GB

resource "res1" {
    protocol    C;
    on test-102 {
        node-id     1;
        address     10.10.100.102:9006;
        disk            "cfeabfa4-0065-4181-bf57-96fcfc5e7131";     
        meta-disk   "3870f717-e369-459f-a230-78700e673edd";
        device      minor 1;
    }
    on test-103 {
        node-id     2;
        address     10.10.100.103:9006;
        disk            "93fef287-981f-41d7-9609-34b65f7c1eaa";     
        meta-disk   "9345e313-7268-4a47-bac0-75423c4c7d30";
        device      minor 1;
    }
}
resource "res2" {
    protocol    C;
    on test-102 {
        node-id     1;
        address     10.10.100.102:9007;
        disk            "b197d4fc-8e3d-4df9-b31b-aa61b93baec9";     
        meta-disk   "19d9578a-8b38-4ee4-ac8f-7e4e32735639";
        device      minor 2;
    }
    on test-103 {
        node-id     2;
        address     10.10.100.103:9007;
        disk            "89bf59af-4c9f-4e1a-b9d8-0bde800f95a9";     
        meta-disk   "ae342459-96e9-42ec-b22d-1ad9ca3bcecf";
        device      minor 2;
    }
}

Thank you

johannesthoma commented 3 years ago

Hi skdia15,

Thanks for sending the config. Just an idea ... did you try drive letters that are not in use for sure on your system (like P: and O:)? Windows sometimes reserves D: for a DVD drive ...

Best wishes,

skdia15 commented 3 years ago

Hi Johannes

Thanks for providing the idea

I try P: and O: and other drive letters But, same result

And second resource(res2.res) cannot change drive letter in disk manager I get an error that says in Disk Manager "The operation could not be completed because the disk management console view is out of date"

image

Finally, CD-ROM and USB device are not in use

johannesthoma commented 3 years ago

Hi skdia15,

Sorry for the delay I was fixing bugs in other parts of WinDRBD.

Did you try to call drbdadm primary / secondary individually? that is

drbdadm primary res1
sleep 5
drbdadm primary res2

? I found some races when doing primary/secondary on resources too fast, something with the PnP interface of WinDRBD. I will try to fix those until then please use the method above (also for secondary).

Best regards,

johannesthoma commented 3 years ago

Hi skdia15,

Are there partition tables on both resources (that is did you initialize the virtual WinDRBD disks with Partition manager)? It may not work if there are no partition tables on the devices.

Please check and let me know,

skdia15 commented 3 years ago

Hi Johannes

I tested it with a sleep time, but the result was the same.

1st.
drbdadm primary res1 ==> e:
sleep 5
drbdadm primary res2 ==> d:

2st.
drbdadm primary res1 ==> d:
sleep 5
drbdadm primary res2 ==> e:

I am using two physical disks (GPT) Created using disk manager as you told me

https://github.com/LINBIT/windrbd/issues/13#issuecomment-765362767

If there is any difference The meta area and data area in the disk are separated by partitions

Could this be a problem?

johannesthoma commented 3 years ago

Hi skdia15,

Sorry for the unresponsiveness .. I am right now fixing bugs on the back end of WinDRBD and am preparing the 1.0.0-rc10 release. One idea that came to my mind is: the resources have the same size right? What if you changed one to have 499GB instead of 500GB. Does that change anything?

Also could you send me the output of the mountvol command?

One last question: have you considered a Linbit support contract already? That would speed up things a lot and would make things much easier for me even if it is just basic support ... you can also write me an eMail on that topic (johannes@johannesthoma.com)

Thanks and best regards,

skdia15 commented 3 years ago

Hi Johannes

At first time sent an email to sales(sales@linbit.com) but I didn't get a reply Other team will send e-mails for technical support.

Below is the test content I tested by changing the disk size, but the results were the same

Initial state when the resource is not loaded

mountvol

image

drbdadm up res1
drbdadm up res2
drbdadm primary res1
sleep 3
drbdadm primary res2

image Mounted as e: drive Can't find res2 drives

drbdadm secondary res1
drbdadm secondary res2
sleep 5
drbdadm primary res1
sleep 3
drbdadm primary res2

image Mounted as d: drive Can't find res2 drives

drbdadm secondary res1
drbdadm secondary res2
sleep 5
drbdadm primary res2
sleep 3
drbdadm primary res1

image Mounted as e: drive Can't find res1 drives

I'll wait for good results Thanks

johannesthoma commented 3 years ago

Hi skdia15, I will talk to the Linbit sales team that should not happen.. I apologize. Could you please write the email again I then will immediately have somebody reply to you.

Regarding the mountvol it seems that the root cause is that both disks have the same GUID.. I will check once I am in the office..

Best regards

Johannes

johannesthoma commented 3 years ago

Hi skdia15, I tried to reproduce your issue but without success .. did you by any chance make some progress? I will keep on trying ....

Best regards,

skdia15 commented 3 years ago

Hi Johannes

Are there any changes to the issue?

While checking the Windows log, it was confirmed that the following log occurred repeatedly.

EventViewer > Windows Logs > System

The system failed to flush data to the transaction log. Corruption may occur in VolumeId: drbd1, DeviceName: \Device\Drbd2.
({Access Denied}
A process has requested access to an object, but has not been granted those access rights.)

image

Best regards

johannesthoma commented 3 years ago

Hi to those who have a similar issue (WinDRBD device drive letter changes when doing secondary / primary): Assignment of drive letters is out of scope of WinDRBD, you need to tell Windows which drive letters to assign with Windows tools like mountvol for example.

Let's assume the drive letter is D: and you want to change it to E:

1.) find the GUID of the WinDRBD disk device using mountvol utility (see the drive letter assigned). Running

    mountvol

will show all assigned drives.

2.) Remove the drive letter:

mountvol D:\ /d

3.) Assign a new drive letter

mountvol E:\ \\?\Volume{<GUID>}\

(note that if you are using cygwin shell you need to quote the \'es as in

mountvol 'E:\' '\\?\Volume{<GUID>}\'

)

That's it. Windows should remember the new settings in some registry key so you should have to do this only once. If not please call Microsoft support for a solution :)