Manage the block storage volumes in your IDrive® Compute account.
Information Included in the Article
- How do I expand the file system for an extended volume?
- I have created a volume. How do I configure and mount it manually?
- 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?
- Is there any limit on the number of volumes that can be created?
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 file system.
Note: You must mount the volumes before performing the below steps.
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
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
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.
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/vdbThe volume can be formatted using several other file systems such as ext4 etc.
- Mount the volume.
sudo mount /dev/vdb /mnt/volume_1
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 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.
Is there any limit on the number of volumes that can be created?
There is no limit to the number of volumes that can be created and Each volume can range anywhere from 1 GB to 1 TB in size. However, users can create volumes up to 8 TB for a particular region in an account. Contact support if you have additional requirements.