mount xfs disk failure

Tonvin 1 Reputation point
2022-12-27T14:43:17.17+00:00

I created a disk from a snapshot,
the new disk /dev/sdd UUID same with original disk /dev/sdc,
when i attached it /dev/sdd to VM,
it was mounted automatically on the same directory (/web) ,
how can i mount the disk to another directory?
thanks very much.

274315-1672151824333.jpg

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,035 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
668 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. srbhatta-MSFT 8,586 Reputation points Microsoft Employee
    2022-12-29T04:52:21+00:00

    Hello @Tonvin ,
    Welcome to Microsoft QnA.
    You can mount your disk to another directory using the 'mount' command.

    To mount the disk to a different directory, you can use the mount command.

    Here's an example of how to do it:

    First, create the directory where you want to mount the disk (mount-point). For example:

    mkdir /mnt/new_disk  
    

    Next, use the mount command to mount the disk to the new directory. Make sure to specify the device file of the disk (e.g. /dev/sdd) and the path to the new mount point (e.g. /mnt/new_disk):

    mount /dev/sdd /mnt/new_disk  
    

    This will mount the disk at the new mount point. You can then access the files on the disk by going to the new mount point (e.g. cd /mnt/new_disk).

    If you want the disk to be mounted automatically every time the system boots, you can add an entry to the /etc/fstab file. This file contains a list of file systems that are to be mounted automatically when the system starts.

    Here's an example of how you could add an entry to /etc/fstab to mount the disk at the new mount point on boot:

    # /etc/fstab

    /dev/sdd	/mnt/new_disk	ext4	defaults	0	2  
    

    This will mount the disk at the /mnt/new_disk mount point using the ext4 file system with the default options when the system starts.

    Hope this helps! Let me know if you have any questions. Thank you :)

    --------
    Please accept as answer and upvote if the above information is helpful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.