Bobcares

Mount SolusIO VPS image files at CR filesystem Quickly

by | Nov 27, 2021

Wondering how to mount SolusIO VPS image files at CR filesystem? We can help you.

As part of our Server Management Services, we assist our customers with several SolusIO queries.

Today, let us see how the mount works.

 

Mount SolusIO VPS image files at CR filesystem

For the article purpose, let us assume there is a VPS with UUID 1234e9b-2d3c-4692-8c5a-b08adc84f791.

Moving ahead, let us see how our Support Techs mount the VPS image at the CR filesystem.

  • LVM-based or file-based raw image

To begin with, we connect to CR via SSH.

Then we find out the path to the image file:

virsh domblklist 1234e9b-2d3c-4692-8c5a-b08adc84f791 | grep vda | awk {‘print $2’}
/var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc

After that, we go ahead and map the image partitions:

kpartx -a -v /var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc
add map loop1p1 (253:0): 0 716800 linear 7:1 2048
add map loop1p2 (253:1): 0 83165184 linear 7:1 718848

Later, we create a directory and mount the corresponding partition:

mkdir /mnt/storage
mount /dev/mapper/loop1p2 /mnt/storage

However, we need to make note that, for mounting partitions with ntfs (Windows VPS images) it is necessary to install ntfs-3g package.

Finally, once we finish the work with partition, we unmount the partition and unmap the image:

umount /mnt/sysimage
kpartx -d /var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc
  • File-based qcow2 image

On the other hand, in this case, first we connect to CR via SSH.

After that, we find out the path to the image file:

virsh domblklist 1234e9b-2d3c-4692-8c5a-b08adc84f791 | grep vda | awk {‘print $2’}
/var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc

Then we proceed with the installation of the libguestfs-tools-c package:

yum install libguestfs-tools-c

Later, we create a directory and mount the image using the image path from step 2:

mkdir /mnt/storage
guestmount -a /var/lib/libvirt/images/295/aad5e792c6b484891b7bf140210028bc -i –rw /mnt/storage

Once we finish the work with partition, we unmount the partition and unmap the image:

fusermount -u /mnt/sysimage

[Need help with either case? We are available 24*7]

 

Conclusion

In short, we can mount SolusIO VPS image files for LVM-based or file-based raw images and File-based qcow2 images. Today, we saw how our Support Techs perform the same.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.