Azure VM - Adding data disk to Linux VM - Unexpected mounting points

Vito Pastrello 30 Reputation points
2023-01-31T14:49:15.8466667+00:00
  • Scenario – I'm try to add a data disk to an existing Linux VM but after reboot the mounting point are both /bitnami and the one specified in /etc/fstab. What can i do to avoid the automatic mounting on /bitnami directory?
  • Technology – Using a prebuilt bitnami Nginx / PHP-fpm virtual machine based on Debian 11.
  • Result – The datadisk is being mounted in two different directory. 05_findmnt_after_restart
  • Environment - This problem is encountered with a couple of our Wordrpess VM, deployed via hte Bitnami image from the Resource libraries. The VM OS is Debian 11 with a Ngix / PHP-fpm web server.
  • Things you’ve tried: I have followd this guide https://learn.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal?tabs=ubuntu
    I have tried the same procedure in a fresher VM and it have the same problem.
  • Screenshot/screencast: Screenshot of the steps: Attached the disk from the VM management portal 03_lsblk-f_after_adding_disk Add the disk in the /etc/fstab file 01_cat-fstab
  • Reboot the machine 04_lsblk-f_after_restart_disk 05_findmnt_after_restart
  • Give reproducible steps: The documentation followed is the official one https://learn.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal?tabs=ubuntu and the problem was encountered event in a fresher VM deploied only a couple of weeks agoo.
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
6,824 questions
0 comments No comments
{count} vote

Accepted answer
  1. deherman-MSFT 31,996 Reputation points Microsoft Employee
    2023-01-31T22:08:28.1433333+00:00

    @Vito Pastrello

    I was able to reproduce this issue by utilizing the same Bitnami image. The Bitnami daemon appears to be automatically mounting /dev/sdc1 when an ext4 file system is available. I confirmed that when I disable bitnami by running "systemctl disable bitnami" the /bitnami directory does not automatically get remounted on reboot. I am thinking that likely the issue is one of the script in "/opt/bitnami/scripts" but I was not able to pinpoint which script.

    Since this is not an image created or maintained by Azure I recommend reaching out to Bitnami for further assistance. You can file an issue on this GitHub page.

    Alternatively, I found that if I created an xfs filesystem for /dev/sdc1 instead of ext4 it was not automatically mounting the directory.

    Hope this helps! Let me know if you need anything else.


    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful