13 Replies Latest reply on Jan 15, 2019 10:08 AM by Ana Lorite

    Swap configuration after moving datastore

    Ana Lorite
      Share:|

      Hi!

       

      I've moved the datastore to a new larger disk. After allocate a new disk in the VMWare console, I've got this:

       

      Filename Type            Size    Used    Priority

      /dev/sda2 partition       8388604 0       -1

      /dev/sdb1 partition       7811068 0       -2

       

      I executed this command: tw_disk_utils --move datastore_data:/dev/sdd --new-swap 8000:/dev/sdd

       

      Now, I've got this:

      [tideway@dvrycon02 ~]$ swapon -s

      Filename                                Type            Size    Used    Priority

      /dev/sda2                               partition       8388604 1176772 -1

      /dev/sdb1                               partition       7811068 0       -2

      /dev/sdd1                               partition       7811068 0       -3

      [tideway@dvrycon02 ~]$ free

                   total       used       free     shared    buffers     cached

      Mem:       8062104    7958688     103416    3925628       3556    3961876

      -/+ buffers/cache:    3993256    4068848

      Swap:     24010740    1217852   22792888

       

      And the Disk Configuration is as following:

       

       

      My questions are:

      - can i remove safely the /dev/sdb  - Non BMC Discovery Disk?

      - what does it mean No enabled swap files were detected?

       

      Can you help me?

       

      Thank you in advance.

       

      Regards, Ana.

        • 1. Re: Swap configuration after moving datastore
          Mark Edwards

          If you follow this knowledge article you can safely remove the old disk, as ive just done the same thing:

           

          https://communities.bmc.com/docs/DOC-47825

          5 of 5 people found this helpful
          • 2. Re: Swap configuration after moving datastore
            Brian Morris

            I hope I'm wrong, but this doesn't look right. Where is your Datastore? I don't see it represented explicitly, but I suspect it's now "unknown filesystem" registered under /dev/sdb.  I think if you remove/delete /dev/sdb then you're also deleting your datastore.

             

            The new disk added in vmware should just be a separate disk drive and you can move the datastore using the UI. I suspect you've moved the datastore to /dev/sdd, as in your screenshot but that filesystem is mounted under /dev/sdb? What other commands did you run in between this? You can do all this with the UI, so there's really no need to run OS commands to add a disk and move your datastore anymore.

            • 3. Re: Swap configuration after moving datastore
              Ana Lorite

              Hi Brian Morris

               

              My datastore is in /dev/sdd as the captured window shows   I suppose you didn't see the horizontal scroll in the window. Am i right?

               

              Thanks!

              • 4. Re: Swap configuration after moving datastore
                Mark Edwards

                Clicking on the screenshot shows the configured disks.

                 

                Using the UI only, does not (currently) allow the addition of swap which in most cases is required.

                • 5. Re: Swap configuration after moving datastore
                  Ana Lorite

                  Hi Mark Edwards

                   

                  Thanks for your answer.

                   

                  I had this problem Swap partition in a new added disk (please check On that occasion I only moved the datastore) and today, I moved the datastore + create a new swap partition in order to avoid a underutilized disk.

                   

                  The question is: how can I know the swap partition in /dev/sdb is an unused one?

                   

                  Thanks!

                  • 6. Re: Swap configuration after moving datastore
                    Brian Morris

                    Yes you're right, I didn't see the whole graphic that looks much better!

                    • 7. Re: Swap configuration after moving datastore
                      Ana Lorite

                      According to the appliance specification, it is needed a swapp space between 16GB to 32GB.

                       

                       

                      So maybe tw_disk_utils --move datastore_data:/dev/sdd --new-swap 16000:/dev/sdd would be the correct command. Don't you think?

                       

                      Thanks!!

                       

                      Ana.

                      • 8. Re: Swap configuration after moving datastore
                        Brian Morris

                        It looks like this might be appropriate. Have you seen this about unmounting and turning Swap off for non-discovery disks?

                         

                        https://docs.bmc.com/docs/display/DISCO113/Unmounting+partitions#Unmountingpartitions-Swap

                        1 of 1 people found this helpful
                        • 9. Re: Swap configuration after moving datastore
                          Brian Morris

                          This screenshot is showing you dont have enough RAM, add some RAM to the system and this will be green.  Your Ram is 8GB (but discovery only has 7.7 available to it). Increase this to something higher like 10-12GB and your chart will be green.

                          • 10. Re: Swap configuration after moving datastore
                            Ana Lorite

                            Hi, Brian Morris

                             

                            Thanks for your answer.

                             

                            <<It looks like this might be appropriate. Have you seen this about unmounting and turning Swap off for non-discovery disks?>>

                             

                            Yes, I know this procedure but i want to be sure about to consider that swap partition as an unused one.

                             

                            <<This screenshot is showing you dont have enough RAM>>

                             

                            Yes, I noticed that. My customer asked for 16GB of RAM so I understand the needed swap will change.

                             

                            Regards, Ana.

                            • 11. Re: Swap configuration after moving datastore
                              Ana Lorite

                              Hi Brian Morris and all,

                               

                              After adding the RAM memory, the appliance specification is perfectly green but the swap space needed hasn't changed and the truth is I don't understand it.

                               

                               

                              So, according to the Disk Configuration, I cannot remove the /dev/sdb disk. Am I right? The swap thing in Discovery is complicated to understand and to manage.

                               

                              All these questions I am doing is because I woudn't like to have any underutilized disk. The IT Team or the Virtualize Team ask me and it seems the way that Discovery manage the disks doesn't work fine. And I want to know if the procedure I followed is the right one.

                               

                               

                              What does mean "No enabled swap files were detected"?

                               

                              Thanks again.

                               

                              Ana.

                              • 12. Re: Swap configuration after moving datastore
                                Brian Morris

                                Where are you seeing that you need more swap space? From the screens you're fine on swap space. 

                                 

                                I sent the procedure for removing that swap from the /dev/sdb disk (the Non-BMC Discovery Disk) and unmounting it and you said you were already aware of this. You should follow that and then remove that disk.

                                 

                                You can see if your swap is active and where using this command:  /sbin/swapon -s

                                You can also see it with: free -h

                                 

                                Maybe someone else knows this: What does mean "No enabled swap files were detected"?

                                 

                                It isn't an error though and doesn't mean there's a problem with swap or that you need more of it.  But admitedly, I can't find anywhere that defines exactly what this message indicates.,

                                • 13. Re: Swap configuration after moving datastore
                                  Ana Lorite

                                  Hi Brian Morris

                                   

                                  Thanks again for answering.

                                   

                                  <<Where are you seeing that you need more swap space? From the screens you're fine on swap space.>>

                                   

                                  I'm not saying that a need more swap space. Let's me summarize all of this.

                                   

                                  Finally I got to understand that the swap and the RAM aren't dependent. I waited to see that after adding RAM memory, the needed swap space was smaller. And it seems that the swap space depends only the OSI count.

                                   

                                   

                                  So, after moving the datastore to a new bigger disk: tw_disk_utils --move datastore_data:/dev/sdd --new-swap 8000:/dev/sdd

                                   

                                  • The appliance has 3 small swap partitions:

                                  [tideway@dvrycon02 ~]$ swapon -s

                                  Filename                                Type            Size    Used    Priority

                                  /dev/sda2                              partition      8388604 200    -1

                                  /dev/sdd1                              partition      7811068 0      -2

                                  /dev/sdb1                              partition      7811068 0      -3

                                   

                                  • The appliance has 4 disks:
                                    • /dev/sda  - System Disk: Swap Partition /dev/sda2 (8.6 GB)
                                    • /dev/sdb  - Non BMC Discovery Disk: Swap Partition /dev/sdb1 (8.0 GB)
                                    • /dev/sdc  - Additional Disk (Backup Data)
                                    • /dev/sdd  - Additional Disk (the new one, the datastore) Swap Partition /dev/sdd1 (8.0 GB)

                                   

                                  The /dev/sdb is underutilized and I can't remove it because it has a swap partition.

                                   

                                  So I thought that maybe, the correct command would be tw_disk_utils --move datastore_data:/dev/sdd --new-swap 16000:/dev/sdd so then I could remove the /dev/sdb disk in order to optimize the Disk Configuration. That's my goal.

                                   

                                   

                                  <<I sent the procedure for removing that swap from the /dev/sdb disk (the Non-BMC Discovery Disk) and unmounting it and you said you were already aware of this. You should follow that and then remove that disk.>>

                                   

                                  But If I remove that swap from /dev/sdb (8GB), I will have less than 16 GB and it is not the recommended value according to the Appliance Specification for a Datacentre resource wich is from 16GB to 32GB.

                                   

                                  Anyway, I could follow the note 4 of this procedureDiscovery: How to create a new swap partition for the Discovery appliance using tw_disk_utils, and how to remove an unused swap partition

                                   

                                  4. To add a swap file to an existing disk rather creating a swap partition on a new disk, see KA 000077945

                                   

                                  so I could "move" a swap partition but I don't find the KA 000077945 and I suspect that it is an obsolete procedure.

                                   

                                  <<Maybe someone else knows this: What does mean "No enabled swap files were detected"?>>

                                   

                                  I was doing a research. Swap space can take the form of:

                                  • dedicated swap partition (our case)
                                  • a swap file

                                  When running Linux on a virtual machine, if a swap partition is not present our only option is to create a swap file.

                                   

                                  Thank you very much for your time, Brian Morris

                                   

                                  Regards, Ana.