Resizing and Mounting a Device for Installation
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light

Resizing and Mounting a Device for Installation

  • Dark
    Light

The following instructions enable you to change the size of the given storage device and mount it properly, prior to installing Sisense on Linux. The instructions are for Ubuntu (e.g., v20) and may need to be modified for your Linux.

To resize and mount a device:

  1. Lists information about all available devices.

    sudo lsblk 

    Example response:

    ListAvailableDevices.png

    Note
    • There is only one disk, and the partition is set to only 15G for the standard Cloudshare template.
    • There is no mount at this point.
  2. Open the Parted command line tool.

    sudo parted 
    Example reponse:

    OpenParted.png

  3. Run the print command to show the size of the disks.

    print 
    Example response:

    Print.png

    Disk 3 needs to be resized.

  4. Resize disk 3 to 300 GB.

    resizepart 3 300GB 
    Example response:

    resize.png

  5. Check that the disk has been resized properly.

    print 
    Example response:

    CheckResize.png

  6. Exit Parted.

    quit 
    Note

    You may need to update /etc/fstab.

  7. Confirm that the resizing worked successfully.

    sudo lsblk 

    Example response:
    ConfirmResizing.png

    Note

    The SDA 3 device still needs to be resized.

  8. Display the physical volume.

    sudo pvdisplay
    Example response:

    ShowPhysicalVolume.png

  9. Resize the specific sda (in this case sda3).

    sudo pvresize /dev/sda3
    Example response:

    PV_resize.png

  10. Confirm that it has been resized to 300GB.

    sudo pvdisplay
    Example response:

    PV_display.png

  11. Extend the logical volume.

    sudo lvextend -L +150G ubuntu-vg/ubuntu-lv
    where the ubuntu-vg/ubuntu-lv name comes from the lsblk command above.
    Example response:
    LV_extend.png

  12. Resize the filesystem.

    sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
  13. Confirm that sda3 resized correctly.

    sudo lsblk

    Example response:
    ConfirmResizing_sda.png

  14. Create the logical volume.

    sudo lvcreate -n sisense ubuntu-vg -L 110G
    Example response:

    create_logical_volume.png

  15. DIsplay the logical volume.

    sudo lvdisplay
    Example response:

    Display_LV_part1.png

    Display_LV_part2.png

  16. Format the logical volume that was just created.

    sudo mkfs.xfs /dev/ubuntu-vg/sisense
    Example response:

    Format_LV_Created.png

  17. Confirm that the format completed successfully.

    sudo lsblk
    Example response:

    Confirm_Successful_Format.png

  18. Create the sisense directory under opt.

    sudo mkdir -p /opt/sisense 

  19. Add the entry to the /etc/fstab file.

    cat /etc/fstab
    Example response:

    Add_to_fstab.png

  20. Edit the /etc/fstab file.

    sudo nano /etc/fstab
  21. In the /etc/fstab file, insert the following line.

    /dev/ubuntu-vg/sisense /opt/sisense xfs defaults 1 2
    The LV path is entered as the mount: /dev/ubuntu-vg/sisense.
  22. Save the the /etc/fstab file.

  23. Mount the drive.

    sudo mount -a
  24. Confirm that the device is properly mounted and ready for installation.

    df -h
    Example response:

    Confirm_Mount.png


Was this article helpful?