Cart

    Sorry, we could not find any results for your search querry.

    Attaching Block Storage to a FreeBSD VPS

    With Block Storage, you have the possibility to add an extra disk with considerable storage capacity to your VPS. This is useful, for example, for storing data such as media or backups. Follow the steps below to order a Block Storage and use it on your VPS with a (Free) BSD-based operating system. A separate manual is available for Windows Server and Linux. If you already own a Block Storage that you want to use for this, you start with 'Configuring Block Storage


     

    Ordering Block Storage

     

    Step 1

    Go to the 'VPS' tab in your control panel.


     

    Step 2

    Scroll down to 'Order extras' and click 'Order' behind 'Extra storage, up to 40TB’.

     cp vps extra big storage


     

    Step 3

    Choose the size of the drive and whether you want to use offsite backups for your Block Storage drive. When you're done, click 'Continue' and continue the ordering process.

    transip order big storage

    Please note! It can always take a while before the new drive is visible and linked.


     

    Step 4

    After completing the order, you will return to the overview page. You will now see 'Block Storage X TB' in the VPS console. You can manage your Block Storage by clicking on the gear behind it.

    cp vps big storage attached


     

    Configuring Block Storage

    Follow the steps below as a user with root privileges.

     

    Step 1

    Execute the following code before and after linking the Block Storage to your server.

    sysctl kern.disks

    After connecting the Block Storage drive, a new vtbdX has been added. This is the Block Storage drive. Replace X with the letter or number of your Block Storage drive (in this example 1) in the commands that contain vtbdX.


     

    Step 2

    PLEASE NOTE: Step 2 overwrites existing partitions and file systems. ONLY do this if the drive has been wiped or has not yet been partitioned. Go to step 3 if you are linking Block Storage to another server or if you have reinstalled your BladeVPS.

    Run the following commands to partition the disk and set up a filesystem.

    gpart create -s GPT vtbdX
        gpart add -t freebsd-ufs vtbdX
        newfs -U /dev/vtbdXp1

     

    Step 3

    Now mount the Block Storage drive. Perform the following commands in succession:

    mkdir /mnt/bigstorage
        echo "/dev/vtbdXp1 /mnt/bigstorage ufs rw 0 0" | sudo tee -a /etc/fstab
        mount /mnt/bigstorage
        df -h | grep bigstroage

     

    Step 4

    Finally, you test whether you can write to the Block Storage drive:

    touch /mnt/bigstorage/testfile && rm /mnt/bigstorage/testfile

    If you do not see an error message when executing the above command, you have successfully connected the Block Storage drive to your VPS.


     

    This concludes our tutorial on adding Block Storage to a FreeBSD server.

     

     

    Need help?

    Receive personal support from our supporters

    Contact us