/bitnami auto mounted on sdc1, impossible to add a new disk because it conflicts

Keywords: General - Linux - Technical issue - Other
bnsupport ID: 6a597c97-5fad-0e0c-1ce8-3f6adc33a567
Description:
Hello,
On Azure Debian with a bitnami stack, We experience troubles adding a new hard disk, because coming from nowhere we know, a drive which is not defined in Azure or /etc/fstab takes /dev/sdc1. When we add a disk in Azure, it is also sdc1. In this case, /bitnami is wrong, and bitnami doesn’t launch. umount sdc1 put everything back to normal, and bitnami starts correctly. But it’s not a clean solution, as we need to umount sdc1 when we reboot the machine. Any idea ?

Please let me know if you need more informations to answer me.

Thanks in advance :slight_smile:
Cyril

Hi @cyrilpeltier

Thanks for using Bitnami LAMP!

I am trying to understand the issue in order to be able to reproduce it. Here is the list of disks attached to your instance at the time bnsupport was executed:

-----------------------------------
Check free amount of disk space
-----------------------------------
Running: df -h
In: /opt/bitnami

Output:

Filesystem      Size  Used Avail Use% Mounted on
udev             32G     0   32G   0% /dev
tmpfs           6.3G   17M  6.3G   1% /run
/dev/sda1        30G  2.5G   26G   9% /
tmpfs            32G     0   32G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            32G     0   32G   0% /sys/fs/cgroup
/dev/sdb1        79G   57M   75G   1% /mnt/resource
/dev/sda15      124M  278K  124M   1% /boot/efi
/dev/sdc1       2.0T  1.1G  1.9T   1% /opt
/dev/sdd1       2.0T  1.4T  561G  71% /mnt/spiorbis_opt
tmpfs           6.3G     0  6.3G   0% /run/user/1000

What is the new volume you have created and tried to mount? Is it /dev/sdd1? So, if I understood correctly, the issue appears after following these actions:

  1. Create a new Bitnami LAMP instance in Azure
  2. Create a new Azure Hard Disk
  3. Attach the new disk to the Bitnami LAMP instance
  4. Restart the instance (?)

Do you need to restart the instance for the issue to appear (without unmounting the disk)? Are those steps correct?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Thank you for your answer

The issue is that after rebooting, my disk attached by Azure is sdc1. And it’s overwritten by another sdc1, where the mount point is /bitnami.

If I’m not clear, in fact there are two sdc1, one from Azure, one automatically mounted but don’t know where. On startup, I have a /bitnami I can umount, that causes the sda1 get bitnami as subfolder, then I can launch bitnami.

sdd1 is another drive.

Kind regards,
Cyril

The 4 steps are the one to reproduce the issue.

After start, “umount /bitnami” allows to lauch via ctlscript.sh start

The unknown disk isn’t in fstab.

Please note that after the point 3. we did the following:

Stop bitnami services
Copy /opt to a new disk
rename /opt to /opt-backup
umount the disk
mount it on /opt/bitnami
restart the services

Then the /bitnami appeared

Kind regards,
Cyril

Hello @cyrilpeltier,

Could you please take a look at this similar previous case?

Hello, thank you for your answer.

I mounted /bitnami for sdc1 device, but MySQL doesn’t launch anymore.

The thread you reffer to has no other solution as I understand the answers, is it a ticket under investigation ?

Kind regards
Cyril

Hi again @cyrilpeltier

I have tried to replicate your issue but was unsuccessful to do so. I have three disks attached to my LAMP instance in azure:

  • OS disk: The one that contains the OS, the bitnami stack, and all its automation (the vast majority of the bitnami stack lives inside the /opt/bitnami subfolder). It is meant to be mounted at /.
  • Data Disk 0: Extra 512GB harddrive
  • Data Disk 1: Extra 16GB harddrive

This is the current output of some useful commands in my machine:

$ lsblk -f -o name,size,fstype,label,model,uuid,serial,fsavail,fsuse%,mountpoint
NAME     SIZE FSTYPE LABEL MODEL        UUID                                 SERIAL                           FSAVAIL FSUSE% MOUNTPOINT
sda       30G              Virtual_Disk                                      60022480a40443c0dfe71aa2d60a39f0
├─sda1  29.9G ext4                      d66717ba-dff3-40ab-b764-b80dc5e592d7                                    25.8G     7% /
├─sda14    3M
└─sda15  124M vfat                      ABBE-E8B4                                                              123.5M     0% /boot/efi
sdb       10G              Virtual_Disk                                      60022480c92250cb057cd55af7f4c403
└─sdb1    10G ext4                      b3816c67-976d-412e-a25e-d193d4aa0e20                                     9.2G     0% /mnt/resource
sdc      512G              Virtual_Disk                                      600224803fe60f1ce971c3d1e0988ab5
└─sdc1   512G ext4                      5031c990-40b8-4027-8004-cac13058b2d6                                   477.1G     0% /bitnami
sdd       16G ext4         Virtual_Disk d43ff6a8-89ed-4873-8a2d-f480ed58a97b 600224809478e92a259aae0c11165821   14.8G     0% /other

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            959M     0  959M   0% /dev
tmpfs           194M  2.9M  191M   2% /run
/dev/sda1        30G  2.0G   26G   8% /
tmpfs           967M     0  967M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           967M     0  967M   0% /sys/fs/cgroup
/dev/sda15      124M  278K  124M   1% /boot/efi
/dev/sdb1       9.8G   37M  9.3G   1% /mnt/resource
/dev/sdc1       503G  264M  478G   1% /bitnami
tmpfs           194M     0  194M   0% /run/user/1000
/dev/sdd         16G   45M   15G   1% /other

As you can see, OS Disk is /dev/sda1 and it is mounted at /. Data Disk 0 is /dev/sdc1 and it is mounted at /bitnami. This is like that because, as the thread that my colleague shared mentions, the first extra disk detected by the automation is mounted at that location so as to deal with application persistence. Lastly, Data Disk 1 is /dev/sdd and I have manually mounted it at /other.

When I stop & re-start the instance, I need to manually mount Data Disk 1 again, but the remaining drives are correctly mounted and everything works as expected.

I have noticed that you want to mount your volume under /opt. If you recall, the bitnami stack lives within a subfolder of that directory (/opt/bitnami) and you may experience trouble with this approach. Is there any reason you want to mount this volume at this specific path?

It would also be helpful if you could share the output of the following commands, as well as a screenshot of the hard drives associated with your instance in the Azure Portal (just like I did):

$ lsblk -f -o name,size,fstype,label,model,uuid,serial,fsavail,fsuse%,mountpoint
$ df -h

but MySQL doesn’t launch anymore.

Can you please share the contents of the /opt/bitnami/mysql/logs/mysqld.log file?

$ tail -n 40 /opt/bitnami/mysql/logs/mysqld.log

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Thank you for your answer, I’m sorry but I reinstalled a machine from scratch without bitnami stack.

The reason I wanted to have a separate drive for /opt was the data stored in /opt/bitnami/mysql, and a very big database.

Sorry for giving up this quickly, but I need to make the lamp machine soon, I prefered to try without bitnami and a problem came out of nowhere.

Kind regards
Cyril

Hi @cyrilpeltier

I am sorry to hear that!

The reason I wanted to have a separate drive for /opt was the data stored in /opt/bitnami/mysql, and a very big database.

By default, if you attach a new hard disk to your instance it is mounted at /bitnami. The application is itself configured to detect this path and store data there, so you don’t need to mount at /opt for that purpose.

In any case, should you experiment any further issues with any bitnami stacks in the future, feel free to open a new thread. Our team will be more than happy to provide you assistance :slightly_smiling_face:

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Thanks a lot for your help :slight_smile:

Have a nice day
Cyril