1 2 Previous Next 21 Replies Latest reply on Jan 16, 2019 2:15 PM by lbomb

    How do I force a mount of a VMFS volume ?

    continuum Guru
    vExpertCommunity Warriors

      I have a Raid 10 volume with a 700 Gb vmfs-volume and cant mount it with Viclient.

       

      mountvmfs.png

       

      How can I mount it from cli ?

        • 1. Re: How do I force a mount of a VMFS volume ?
          vCloud9 Enthusiast

          Here is link to the community thread http://communities.vmware.com/message/1838111#1838111 which discusses how to force mount the volume through PowerCLI. Hope this is what you are looking for.

           

          -vCloud9

          • 2. Re: How do I force a mount of a VMFS volume ?
            continuum Guru
            Community WarriorsvExpert

            If I read that script correctly it either needs  a VMFS-uuid or a VMFS´-label.

            I have none of that
            The only way I can address that volume is by using either
            /dev/disks/naa.6001e4f0107c5800178e9061850eeba6:1
            or vml.02000000006001e4f0107c5800178e9061850eeba6504552432035:1

            • 3. Re: How do I force a mount of a VMFS volume ?
              vCloud9 Enthusiast

              Did you tried getting the UUID by running the following command from the ESXi console ls -lah /vmfs/volumes

               

              This article talks indepth about managing VMFS volumes http://www.harleystagner.com/vcdx/vcdx-enterprise-admin-notes-manage-vmfs-filesystems-using-command-line-tools.php

               

              -vCloud9

              • 4. Re: How do I force a mount of a VMFS volume ?
                continuum Guru
                vExpertCommunity Warriors

                yes - unless there is some super-hidden command to read the UUID or label of the vmfs-volume I have to assume that ESXi trashed that info.

                 

                I am ready to inject that details with dd or a hammer if I only knew how

                • 5. Re: How do I force a mount of a VMFS volume ?
                  rickardnobel Virtuoso

                  Ulli Hankeln wrote:

                   

                  I have a Raid 10 volume with a 700 Gb vmfs-volume and cant mount it with Viclient.

                   

                  For me the "Add storage" means = Create New VMFS on empty disk and not add an already existing VMFS partition. You have of course done a Rescan to see if the VMFS partition is not already visible?

                  • 6. Re: How do I force a mount of a VMFS volume ?
                    continuum Guru
                    vExpertCommunity Warriors

                    Hi Rick
                    I only posted that screenshot to show that ESXi "somehow" accepts the volume as VMFS.
                    But that is about as far as I can get.

                     

                    I dumped the first Gb into a textfile and read the strings - so I know that the info I would expect in the .*.sf files in the root of a VMFS volume seems to be there.
                    partedUtil also says that this is a VMFS volume.

                     

                    I guess what I need now is a way to write a UUID or VMFS-label to the volume

                    • 7. Re: How do I force a mount of a VMFS volume ?
                      a.p. Guru
                      User ModeratorsCommunity WarriorsvExpert

                      Did you already run

                      esxcli storage vmfs snapshot list

                      see http://kb.vmware.com/kb/1011387

                      You may also run a rescan and check for errors/warnings in the vmkernel log.

                       

                      André

                      • 8. Re: How do I force a mount of a VMFS volume ?
                        continuum Guru
                        Community WarriorsvExpert

                        yes - that command does not list anything

                         

                        checking the vmkernel log also gives no hints

                        • 9. Re: How do I force a mount of a VMFS volume ?
                          a.p. Guru
                          Community WarriorsUser ModeratorsvExpert

                          One more other thought on this. Is there a chance that the datastore name of the unmounted VMFS volume is the same as one of the already mounted datstores (e.g.  a default name)? Maybe it's possible to temporarily rename the existing datastores to "free up" the names!?

                           

                          André

                          • 10. Re: How do I force a mount of a VMFS volume ?
                            continuum Guru
                            vExpertCommunity Warriors

                            let me sum up what I tried so fars

                             

                            I created a dump of the whole LUN a la dd if=/dev/disks/blabla of=/vmfs/volumes/free-datastore/diskdump-flat.vmdk

                             

                            Then I copied that flat.vmdk to another ESXi , created a descriptorfile for it and use it inside a VM
                            Now I created a snapshot and boot the VM with a ESXi stateless LiveCD.

                             

                            That means I can rule out all misconfigurations a la dublicate VMFS-uuids or VMFS-labels.

                             

                            With that scenario I then tried
                            - rebuild the GPT-partitiontable assuming a start offset of 2048
                            - rebuild the GPT-partitiontable assuming a start offset of 128
                            - rebuild a MBR-partitiontable assuming a start offset of 2048

                             

                            - read the volume with latest vmfs-tools version 2.5 - compiled from source so that I get VMFS 5 support - result is "invalid magic number"

                             

                            - I created a new vmfs-volume using exactly the same disklayout and dumped the first 1 MB of the working volume to the bad volume

                             

                            I tried all tricks that would apply if the volumes was treated as a snapshot - but those tricks dont work
                            ESXi does not detect it as a snapshot

                             

                            I was able to extract vmdk descriptorfiles and vmx-files and vmware.logs and other stuff that you would expect to be inside the VMFS- headers
                            I used scalpel to carve out user data from inside the vmdks


                            I asked for help at the homepage of the vmfs-tools - see http://glandium.org/blog/?p=2539&cpage=1#comment-149313

                             

                            If you have further suggestions even bizar ones like using http://sanbarrow.com/gifs/wodoo.gif - please suggest them

                            • 11. Re: How do I force a mount of a VMFS volume ?
                              MauroBonder Champion
                              VMware EmployeesUser Moderators

                              Hi,

                              I don´t know if this will works for you, but....... (using esxcfg-volume -m

                              Command line

                              You need to use the esxcfg-volume command. It can be used in this way:
                              • Execute this command to list the volumes that are detected as snapshots/replicas:

                                # esxcfg-volume -l

                                The output appears similar to:

                                VMFS3 UUID/label: 49d22e2e-996a0dea-b555-001f2960aed8/VMFS_1
                                Can mount: Yes
                                Can resignature: Yes
                                Extent name: naa.60a98000503349394f3450667a744245:1 range: 0 - 97023 (MB)


                                Here the Datastore UUID is 49d22e2e-996a0dea-b555-001f2960aed8 and its last label is VMFS_1.


                              • To mount the volume without performing a resignaturing of that volume (this volume is unmounted when the ESX host is rebooted), run this command:

                                # esxcfg-volume -m <VMFS UUID|label>

                                For example:

                                # esxcfg-volume -m "VMFS_1"
                                # esxcfg-volume -m "49d22e2e-996a0dea-b555-001f2960aed8"



                              • To mount the volume without performing a resignaturing of that volume (this volume is mounted when the ESX host is rebooted), run this command:

                                # esxcfg-volume -M <VMFS UUID|label>


                                For example:

                                # esxcfg-volume -M "VMFS_1"
                                # esxcfg-volume -M "49d22e2e-996a0dea-b555-001f2960aed8"

                              1 person found this helpful
                              • 12. Re: How do I force a mount of a VMFS volume ?
                                a.p. Guru
                                User ModeratorsCommunity WarriorsvExpert

                                Well, I can't promise you anything, but if you can provide the first as well as the the last 34 data blocks (512 bytes/block) of the disk, I would be interested in taking a look at the partition table entires.

                                 

                                André

                                • 13. Re: How do I force a mount of a VMFS volume ?
                                  continuum Guru
                                  vExpertCommunity Warriors

                                  Andre - unfortunately the VMFS-volume is onlz 700Gb while the whole RAID-volume itself is 930 or something like that.

                                   

                                  # partedUtil getptbl /dev/disks/naa.6001e4f0107c5800178e9061850eeba6
                                  gpt
                                  121795 255 63 1956642816
                                  1 2048 1468003634 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

                                   

                                  thats the output of partedUtil against the original RAID

                                   

                                   

                                  which parts do you want to see ?

                                  • 14. Re: How do I force a mount of a VMFS volume ?
                                    a.p. Guru
                                    vExpertCommunity WarriorsUser Moderators

                                    Thinking of it and looking at the output of the partedUtil command, I think it's more an issue inside the VMFS partition than with the GPT partition table itself. Now since you were asking for even bizarre suggestions, I do have one. With the snapshot you have this should be easy to revert if it does not help.

                                    What happens if you use the pertedUtil command to resize the partition and then run the vmkfstools command to grow the VMFS datastore?

                                     

                                    André

                                    1 2 Previous Next