Share via


Disk not mounted after VM stop/start

Question

Tuesday, January 31, 2017 6:01 PM

I stopped (did not deallocate) and started my Linux VM the other day, only to find that a disk that was mounted is gone. I've updated and rebooted the VM from the SSH CLI before with no problems.

The big problem is that I don't know which disk was mounted, so I can't just re-mount it. How can I find out what was mounted before the VM stopped?

All replies (1)

Wednesday, February 1, 2017 12:44 PM

Hello,

To ensure the drive is remounted automatically after a reboot it must be added to the /etc/fstab file. In addition, it is highly recommended that the UUID (Universally Unique IDentifier) is used in /etc/fstab to refer to the drive rather than just the device name (i.e. /dev/sdc1). Using the UUID avoids the incorrect disk being mounted to a given location if the OS detects a disk error during boot and any remaining data disks then being assigned those device IDs. To find the UUID of the new drive, you can use the blkid utility:

bash

sudo -i blkid

You can now test that the file system is mounted properly by unmounting and then remounting the file system, i.e. using the example mount point /datadrive created in the earlier steps:

Copy

bash

sudo umount /datadrive

sudo mount /datadrive

If the mount command produces an error, check the /etc/fstab file for correct syntax. If additional data drives or partitions are created, enter them into /etc/fstab separately as well.

Make the drive writable by using this command:

Copy

bash

sudo chmod go+w /datadrive

Check here; For more information on this scenario.

Regards,
Sumanth BM

Kindly click "Mark as Answer" on the post that helps you, this can be beneficial to other community members reading the thread. And Vote as Helpful.