Mounting Guide: Remote Log Files Collection on Data Collector
  • 23 May 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Mounting Guide: Remote Log Files Collection on Data Collector

  • Dark
    Light

Article summary

Windows

To create a VHD, follow these steps:

  1. Open Disk Management. In the search box on the taskbar, enter Computer Management, and select Disk Management.

  2. Click on the Action menu, and select Create VHD.

  3. After the Create and Attach Virtual Hard Disk dialog box opens, specify the location on the physical computer where you want the VHD file to be stored.

    1. Under Location, select the Browse button and locate the folder you want to store the VHD.

    2. Enter a name for the drive in the File name field.

    3. Select Virtual Disk files (*.vhd) from the Save as Type dropdown menu.

    4. Select Save.

  4. Enter Virtual hard disk size.

  5. Select Dynamically expanding or Fixed size under Virtual hard disk type section.

  6. Select OK.

To make a VHD available for use (either one you've created or another existing VHD), follow the below steps:

  1. Open Computer Management and select Disk Management.

  2. On the ‘Action’ menu, select Attach VHD.

  3. After the “Attach Virtual Hard Disk” dialog box opens, select the Browse button, and find your .vhd file.

  4. Now that you've selected the .vhd file, you return to the “Attach Virtual Hard Disk” dialog box. Select OK.

Follow the instructions below to initialize the disk and configure its volume attachment.

  1. Right-click on Disk. Select Initialize Disk and click on Save.

    initialize_2
  2. Right-click on Disk and select New Simple Volume. Click on Next.

  3. Specify the size of the volume you want to create. Click Next. Assign any letter from the drop-down and click Next. Give a volume name, click Next, and then click Finish.

  4. You can see the Volume 5(F:) disk is visible in File Explorer.

Ubuntu

To create a VHD, follow these steps:

  1. Use the command dd to create a file.

    sudo dd if=/dev/zero of=<path_to_virtual_hard_disk> bs=<bytes> count=<count>
  2. Format the disk with the desired file system.

    sudo mkfs -t <file_system_type> <path_to_virtual_hard_disk>

    To format it with the ext4 file system, execute the following command:

    sudo mkfs -t ext4 <path_to_virtual_hard_disk>
  3. Mount Virtual Hard Disk:

    To mount it in the directory, first create the directory, and then mount it using the following command.

    sudo mount -o loop <path_to_virtual_hard_disk> <location_to_mount>

    Check whether the virtual hard disk is mounted or not using the lsblk command.

    As you can see in the below screenshot, a hard disk of 512 MB is successfully mounted in the specified directory.

    To mount the VHD automatically during the boot, create a fstab entry. For that, open the fstab file using your favorite text editor.

    Add the following line at the end:

    <path_to_virtual_hard_disk> <location_to_mount> <file_system_type> <mount_options> 0 0

Note

The steps for mounting a hard disk are the same for both Ubuntu and RHEL.

RHEL

To create a VHD, follow these steps:

  1. Use the command dd to create a file.

    sudo dd if=/dev/zero of=<path_to_virtual_hard_disk> bs=<bytes> count=<count>
    rhel_1
  2. Format the disk with the desired file system.

    sudo mkfs -t <file_system_type> <virtual hard disk>

    To format it with the ext4 file system, execute the following command:

    sudo mkfs -t ext4 <virtual hard disk>
  3. Mount Virtual Hard Disk:

    To mount it in the directory, first create the directory, and then mount it using the following command.

    sudo mount -o loop <path_to_virtual_hard_disk> <location_to_mount>

    Check whether the virtual hard disk is mounted or not using the lsblk command.

    As you can see in the below screenshot, a hard disk of 512 MB is successfully mounted in the specified directory.

    To mount the VHD automatically during the boot, create a fstab entry. For that, open the fstab file using your favorite text editor.

    Add the following line at the end:

    <path_to_virtual_hard_disk>    <location_to_mount> <file_system_type>  <mount_options> 0   0

EC2 Linux with EBS

Prerequisites:

  • AWS Account

  • EC2 Instance

To create a Virtual volume on the AWS cloud and mount it to EC2, follow these steps:

  1. Open AWS. Navigate to EC2 Service

  2. Open Volume from an EC2 > Elastic Block Store > Volumes

  3. Create Volume

  4. Provide disk size and necessary details, and keep the availability zone the same as the ec2 region.

  5. Once EBS Volume is created then select the newly created volume and attach it to the ec2 instance.

  6. Select the Instance in which you want to mount the volume and also select the recommended device name based on your OS.

  7. Execute the below command to list out all the devices in the Linux machine.

  8. Check whether the filesystem is involved or not. If not then configure the filesystem. To configure filesystem in new disk execute this command:

    mkfs -t xfs /dev/xvdbf
  9. Create a directory where you want to mount the disk, and then mount the disk to that directory.

  10. Now check whether drive is mounted or not using the command below.

  11. To configure automount on boot, please do following steps:

    1. Open the /etc/fstab file in a text editor and add the following line at the end of the file and save it.

      <Mount Disk Name>  <Mount Directory Path>   <filesystemtype>   defaults,nofail   0   2

Note

To mount volumes on any other Cloud Virtual Machines, please refer to their official documentation.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence