Frequently Asked Questions
Volumes
Volumes
If your question is not addressed below, contact us through our feedback form and we will get back to you shortly.
- What is Block Storage volume in IDrive® Compute?
- Is my data stored in the block storage volume secure?
- How do I create a block storage volume?
- I have created a volume. How do I configure and mount it manually?
- How can I attach a block storage volume to an instance?
- How can I increase the size of the volume?
- How do I rename a volume?
- How can I delete a volume?
- How can I detach a Volume?
- How do I unmount a volume?
- How do I expand the file system for an extended volume?
- How do I backup a volume?
- How do I restore the data backed up from a volume?
- How do I expand a filesystem when restoring backup to a larger volume?
- Are there any charges for adding block storage volumes?
What is Block Storage volume in IDrive® Compute?
IDrive® Compute provides you the flexibility to update the storage capacity of your virtual machines by attaching high-speed network-based block devices. A block storage volume is managed independently and can be effortlessly attached and detached from an instance, even when it is running without needing any reboot. You can attach multiple storage volumes to an instance to store bulk of data as per your business demands.
An IDrive® Compute block storage volume can also be resized to a higher disk capacity depending on your changing requirements.
Is my data stored in the block storage volume secure?
Yes. The data stored in a block storage volume can be accessed only by you or the users authorized by you. The data will be accessible only when it is attached to an instance.
Read how to create a file system in a disk encrypted with LUKS on your block storage volume.
How do I create a block storage volume?
To create a block storage volume,
- Sign in to your IDrive® Compute account.
- Click the Volumes tab.
- Click Add Volume. A slider window will open.
- Select an instance to attach this volume.
- Choose a Region from the dropdown menu.
- Enter a Name for the volume.
- Enter the required size for the volume. Volume size can range from 1 GB to 1 TB.
- Click Create Volume.
Note: Volumes will be charged additionally at $0.10/GB/month.
I have created a volume. How do I configure and mount it manually?
Once a volume is created and attached to an instance, it can be configured manually.
To mount a volume, login to the instance and follow these steps:
Note: These steps are for an instance running on centOS operating system in which a volume is available on the path /dev/vdb.
- Create a mount point.
sudo mkdir /mnt/volume_1
- Format the volume.
sudo mkfs.xfs /dev/vdb
- Mount the volume.
sudo mount /dev/vdb /mnt/volume_1
The volume can be formatted using several other file systems such as ext4 etc.
Once you have mounted the volume it will be available in the path /mnt/volume_1.
To make the mount persistent, update the /etc/fstab file.
/dev/vdb /mnt/volume_1 defaults,nofail,discard,noatime 0 2
Note: Your data will be available even if the volume is detached from the current instance and attached to another one.
How can I attach a block storage volume to an instance?
To attach a block storage volume to an instance,
- Sign in to your IDrive® Compute account.
- Go to the Volumes tab.
- Click Actions against the volume you want to attach to an instance and select Attach.
- In the slider window, select an instance from the drop-down menu.
- Click Attach.
You can easily detach the volume from the instance and attach it to another instance whenever required.
How can I increase the size of the volume?
To increase the size of the volume,
- Sign in to your IDrive® Compute account.
- Click the Volumes tab.
- Hover on the required volume, click Actions, and select Extend.
- Enter the required storage space.
- Click Extend.
To rename a volume,
- Sign in to your IDrive® Compute account.
- Click the Volumes tab.
- Hover on the required volume, click Actions, and select Rename.
- Enter a new name and click Save Changes.
To delete a volume,
- Sign in to your IDrive® Compute account.
- Click the Volumes tab.
- Hover on the required volume, click Actions, and select Delete.
- Click Delete.
You can detach a volume only if it is attached to an instance.
To detach a volume from an instance,
- Sign in to your IDrive® Compute account.
- Go to the Volumes tab.
- Hover on the volume that is attached to an instance, click Actions, and select Detach.
- Click Detach.
A volume that is no longer used can be detached from the instance. Before detaching the volume, it is recommended to unmount it to ensure data integrity. When you unmount a volume, its file system becomes inaccessible to the operating system of the instance and it cannot read or write from the volume.
To unmount a volume, login to the instance and follow these steps:
Note: These steps are for an instance running on centOS operating system in which a volume is available on the path /dev/vdb and it is already mounted.
- Get the mount point of the volume using this command:
sudo df --human-readable
Look for 'Mounted On' Field value for the mount point. Let us assume it to be /mnt/volume_1. - Make sure that mount point is not in use, otherwise, it will report an error while unmounting.
- Unmount it via the following command:
sudo umount /mnt/volume_1
On successful execution of the command, the volume will be unmounted.
- Edit the /etc/fstab file to delete any entries referencing the volume. Now you can safely resize or detach the volume from the instance.
How do I expand the file system for an extended volume?
If you choose to extend your existing volume, then you will have to expand its filesystem to use the new space. There can be different types of filesystems (XFS, ext4 etc.) on your existing volume. Once the volume is resized and attached to the instance, follow the below commands to expand the filesystem.
Note: You must mount the volumes before performing the below steps.
XFS filesystem
When a volume has an XFS filesystem, it can be extended using xfs_growfs tool. Pass the proper mount point name in the below command:
$ sudo xfs_growfs /mnt/<mount-point-name>
Running the command may generate a command output like this when executed successfully:
meta-data=/dev/vdb isize=512agcount=8, agsize=65536 blks
=sectsz=512attr=2, projid32bit=1
=crc=1finobt=0 spinodes=0
data =bsize=4096blocks=524288, imaxpct=25
=sunit=0 swidth=0 blks
naming=version 2bsize=4096ascii-ci=0 ftype=1
log=internalbsize=4096blocks=2560, version=2
=sectsz=512sunit=0 blks, lazy-count=1
Realtime =noneextsz=4096blocks=0, rtextents=0
data blocks changed from 524288 to 786432
ext4/ext2 filesystem
When a volume has an ext4/ext2 filesystem, it can be extended using resize2fs tool. Pass the proper device name in the below command:
$ sudo resize2fs dev/vdb
A sample output of the above command will be:
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/vdc is mounted on /mnt/temp; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/vdc is now 1310720 blocks long.
To backup the data in a volume,
- Sign in to your IDrive® Compute account.
- Click the Volumes tab.
- Hover on the required volume, click Actions, and select Create Backup.
- Enter a name for the backup and click Create Backup. You can view the progress in the Backups tab.
In order to ensure consistent data backup, you must detach the volume from any instances before starting backup.
How do I restore the data backed up from a volume?
To restore data from a volume backup,
- Sign in to your IDrive® Compute account.
- Click the Volumes tab and go to Backups.
- Hover on the backup you want to restore, click Actions, and select Restore.
- Select Restore to a new volume, add a name for the new volume and click Restore Backup.
This will create a new volume (listed under the Volumes tab) and restore the data. - Select Restore to an existing volume, choose an available volume from the drop-down list, and click Restore Backup.
This will restore data to the selected volume.
Note: Only volumes that are online and are equal or greater than in size of the backup will be listed in the drop-down.
How do I expand a filesystem when restoring backup to a larger volume?
When a volume backup is restored to a volume whose size is larger than the backup size, the filesystem size after restore will be the same as the size of volume backup. The filesystem needs to be expanded in such a scenario to use the extra space on the volume.
Based on the filesystem type on the volume, follow these steps to extend it.
Are there any charges for adding block storage volumes?
Yes, block storage volumes are charged at $0.10 /GB / Month.