Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property ACF::$fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields.php on line 138

Deprecated: Creation of dynamic property acf_loop::$loops is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 28

Deprecated: Creation of dynamic property ACF::$loop is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 269

Deprecated: Creation of dynamic property ACF::$revisions is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/revisions.php on line 397

Deprecated: Creation of dynamic property acf_validation::$errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 28

Deprecated: Creation of dynamic property ACF::$validation is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 214

Deprecated: Creation of dynamic property acf_form_customizer::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 28

Deprecated: Creation of dynamic property acf_form_customizer::$preview_fields is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 29

Deprecated: Creation of dynamic property acf_form_customizer::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 30

Deprecated: Creation of dynamic property ACF::$form_front is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-front.php on line 598

Deprecated: Creation of dynamic property acf_form_widget::$preview_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 34

Deprecated: Creation of dynamic property acf_form_widget::$preview_reference is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 35

Deprecated: Creation of dynamic property acf_form_widget::$preview_errors is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 36

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the all-in-one-wp-migration domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp_plugin/wp_plugin.php on line 23

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 54

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1539

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 828

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php on line 6131

Deprecated: Creation of dynamic property acf_field_oembed::$width is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 31

Deprecated: Creation of dynamic property acf_field_oembed::$height is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 32

Deprecated: Creation of dynamic property acf_field_google_map::$default_values is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-google-map.php on line 33

Deprecated: Creation of dynamic property acf_field__group::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-group.php on line 31

Deprecated: Creation of dynamic property acf_field_clone::$cloning is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 34

Deprecated: Creation of dynamic property acf_field_clone::$have_rows is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 35

Deprecated: Creation of dynamic property jh_acf_field_table::$settings is deprecated in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-content/plugins/advanced-custom-fields-table-field/class-jh-acf-field-table.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/functions.php:6131) in /var/www/vhosts/studiogo.tech/httpdocs/upcloudold/wp-includes/rest-api/class-wp-rest-server.php on line 1902
{"id":24395,"date":"2016-05-11T12:16:22","date_gmt":"2016-05-11T09:16:22","guid":{"rendered":"https:\/\/upcloud.com\/community\/tutorials\/adding-removing-storage-devices"},"modified":"2016-05-11T12:16:22","modified_gmt":"2016-05-11T09:16:22","slug":"adding-removing-storage-devices","status":"publish","type":"tutorial","link":"https:\/\/studiogo.tech\/upcloudold\/tutorial\/adding-removing-storage-devices\/","title":{"rendered":"Adding and removing storage devices"},"content":{"rendered":"\n

Adding and removing storage disks on a cloud server at your UpCloud Control Panel<\/a> is easy, but the changes also require actions on the operating system level. Whether you are looking to increase data storage or make other changes to the disk configurations, this guide will help you to perform the required operations on Linux and Windows hosts.<\/p>\n\n\n\n

The server must be powered down before attaching or removing storage devices.<\/p>\n\n\n\n

\n
Test hosting on UpCloud!<\/a><\/div>\n<\/div>\n\n\n\n

Adding a new disk<\/h2>\n\n\n\n

Start by logging into your UpCloud Control Panel<\/a>. Shut down the server in question and go to the Storage<\/i> tab in your server settings. Create a new disk by clicking the Add new device<\/em> button.<\/p>\n\n\n\n

\"Current<\/figure>\n\n\n\n

In the disk configuration window, select the Create a new disk option,\u00a0and give the new disk a name\u00a0and size in gigabytes as\u00a0required. Then click\u00a0Add\u00a0a storage device\u00a0<\/em>to confirm.<\/p>\n\n\n\n

\"Adding<\/figure>\n\n\n\n

After the attaching process is complete, you can power the server up again.<\/p>\n\n\n\n

\"New<\/figure>\n\n\n\n

Once your server is up and running, you can continue with the process at the OS level. Find the operating system-specific instructions below for Linux distributions and Windows servers.<\/p>\n\n\n\n

Linux operations<\/h2>\n\n\n\n

Connect to your server, for example, using SSH. Check the names of the storage disks currently attached with the following command.<\/p>\n\n\n\n

lsblk<\/pre>\n\n\n\n
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nvda 253:0 0 25G 0 disk\n\u2514\u2500vda1 253:1 0 25G 0 part \/\nvdb 253:16 0 25G 0 disk\n<\/pre>\n\n\n\n

The disk you are looking for is usually the last on the list, and will not have partitions on it like vdb<\/em> in the example above.<\/p>\n\n\n\n

Partitioning and formatting the disk<\/h3>\n\n\n\n

Create a new partition on the new disk using fdisk.<\/em> Replace the disk<\/em><\/span> in the command below with the new disk name.<\/p>\n\n\n\n

sudo fdisk \/dev\/disk<\/span><\/pre>\n\n\n\n

The utility will open its own command prompt showing Command (m for help):<\/em> instead of the usual user@host:\/$.<\/em> The following one-letter commands will be entered in the fdisk<\/em> utility.<\/p>\n\n\n\n

First, start a new partition configuration with n<\/em>. Use default values by just pressing enter on each of the options, or type in the required parameter if no default value is given.<\/p>\n\n\n\n

> n\n# Primary p, partition 1, start sector 2048, end sector at disk end.<\/pre>\n\n\n\n

If you are looking to install an OS on the new disk, make it bootable with command a<\/em>.<\/p>\n\n\n\n

> a\n# Partition 1 if asked.<\/pre>\n\n\n\n

Afterwards, you can check that the partition was configured properly, it should show something along the lines of the example underneath.<\/p>\n\n\n\n

> p\nDevice     Boot  Start  End       Sectors   Size  Id  Type\n\/dev\/vdb1  *     2048   52428799  52426752  25G   83  Linux<\/pre>\n\n\n\n

If everything is in order, write partition changes to the disk with the command w<\/em>. In case there was a mistake in the setup, delete the faulty partition by entering the command d<\/em> and then create a new one again with command n<\/em>.<\/p>\n\n\n\n

> w<\/pre>\n\n\n\n

Once fdisk<\/em> has finished writing the partition table to the disk it will exit and return you to the usual command prompt. Check that the new partition shows up using the lsblk<\/em> command.<\/p>\n\n\n\n

lsblk<\/pre>\n\n\n\n
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nvda    253:0    0  25G  0 disk\n\u2514\u2500vda1 253:1    0  25G  0 part \/\nvdb    253:16   0  25G  0 disk\n\u2514\u2500vdb1 253:17   0  25G  0 part<\/pre>\n\n\n\n

You should now see both storage disks and their partitions with their correct sizes. The disks will be named something like vda<\/em> or vdb<\/em> and their partitions with the added partition identifier number e.g. vda1<\/em>\u00a0and\u00a0vdb1<\/em>. Notice that some of the commands below require you to enter the disk name while others use the partitions.<\/p>\n\n\n\n

Set up the partition with a file system type appropriate for your server. Ubuntu and other Debian variants should use EXT4 while CentOS 7 hosts might be using XFS instead.<\/p>\n\n\n\n

# Creating an EXT4 file system on Debian, Ubuntu or CentOS 6.5\nsudo mkfs.ext4 \/dev\/partition<\/span><\/pre>\n\n\n\n
# Creating an XFS file system on CentOS 7.0\nsudo mkfs.xfs \/dev\/partition<\/span><\/pre>\n\n\n\n

With the formatting complete, you will next need to create a mounting point for the device.<\/p>\n\n\n\n

Mounting a new disk manually<\/h3>\n\n\n\n

Mounting a disk is as simple as making a new directory to which you wish to attach the disk, for example, \/disk1<\/em> at your root directory.<\/p>\n\n\n\n

sudo mkdir \/disk1<\/span><\/pre>\n\n\n\n

Then, mount the new storage disk on your system at the mounting point you just created.<\/p>\n\n\n\n

sudo mount \/dev\/partition<\/span> \/disk1<\/span><\/pre>\n\n\n\n

The added storage space will now be available as a directory on your system.<\/p>\n\n\n\n

df -h<\/pre>\n\n\n\n
Filesystem  Size  Used  Avail  Use%  Mounted on\n\/dev\/vda1    25G  1.4G    23G    6%  \/\n\/dev\/vdb1    25G   44M    24G    1%  \/disk1<\/pre>\n\n\n\n

That is it, you can then start using the new storage space.<\/p>\n\n\n\n

Remounting a new disk automatically<\/h3>\n\n\n\n

To enable the new storage disk to mount automatically at boot, you still need to add it to the fstab<\/tt> file. The\u00a0fstab<\/tt>\u00a0file contains descriptive information about the various file systems on your server and needs to be maintained properly. Each file system is described on a separate line in the order they should be mounted.<\/p>\n\n\n\n

Start by checking the UUID of the new disk using the command below.<\/p>\n\n\n\n

blkid<\/pre>\n\n\n\n
\/dev\/vda1: UUID=\"9dbc7ddd-5c2b-4e66-b284-ffd3f146c80b\" TYPE=\"ext4\" PARTUUID=\"861dadf7-01\"\n\/dev\/vdb1: UUID=\"3dfce0f1-1c50-455d-adbc-16bd1c0560a2\" TYPE=\"ext4\" PARTUUID=\"3b9f0276-01\"<\/pre>\n\n\n\n

Note down the UUID of the new disk, usually the last on the list. Most systems use the UUID to identify disk devices in the fstab<\/tt> file but the \/dev\/partition<\/span> denomination would also work.<\/p>\n\n\n\n

Next, open the fstab file with your favourite text editor and add the new disk description similar to the examples according to your OS. Remember to set the <UUID of the new disk> like on the first line.<\/p>\n\n\n\n

Below are shown examples of the fstab<\/tt> file from Ubuntu and CentOS.<\/p>\n\n\n\n

# On Ubuntu or Debian\nnano \/etc\/fstab<\/pre>\n\n\n\n
# <file system>                          <mount point> <type> <options>      <dump> <pass>\nUUID=9dbc7ddd-5c2b-4e66-b284-ffd3f146c80b \/             ext4   errors=remount-ro 0      1\nUUID=new_disk_uuid                        \/disk1        ext4   defaults          1      2<\/pre>\n\n\n\n
# On CentOS\nvi \/etc\/fstab<\/pre>\n\n\n\n
# <file system>                          <mount point> <type> <options> <dump> <pass>\nUUID=e0c76c31-e8c6-49a1-879c-238266e0fb07 \/             xfs    defaults  1      1\nUUID=new_disk_uuid                        \/disk1        xfs    defaults  1      2<\/pre>\n\n\n\n

Once you have added the description of the new disk device, save the file and exit the editor.<\/p>\n\n\n\n

All done! The new disk will now be always automatically mounted at boot.<\/p>\n\n\n\n

Windows operations<\/h2>\n\n\n\n

Start by opening the Disk Management<\/em>\u00a0panel by\u00a0right-clicking the Windows Start button and selecting Disk Management from the appearing list. Alternatively, type\u00a0diskmgmt.msc\u00a0in the search or run window and then press enter.<\/p>\n\n\n\n

The newly attached storage device should be listed as the last disk in the bottom part of the window. Start by right-clicking the new disk and selecting Online<\/em> to enable the device.<\/p>\n\n\n\n

\"Windows<\/figure>\n\n\n\n

Next, you will need to initialize it by right-clicking the disk and selecting Initialize Disk<\/em>.<\/p>\n\n\n\n

\"Windows<\/figure>\n\n\n\n

In the next window, initialize the newly attached disk by selecting MBR<\/em> and clicking OK.<\/p>\n\n\n\n

\"Windows<\/figure>\n\n\n\n

Before the new disk can be accessed you will need to format it. Right-click the unallocated partition and select New Simple Volume.<\/em> Go through the wizard, the default options are fine for most cases.<\/p>\n\n\n\n

\"Windows<\/figure>\n\n\n\n

The formatting might take a moment depending on the size of the new volume. You can continue using the server normally until the process is completed.<\/p>\n\n\n\n

\"Windows<\/figure>\n\n\n\n

Once the volume creation wizard is done formatting the new partition, the device will show a blue indicator and report the status as\u00a0Healthy<\/em>.<\/p>\n\n\n\n

Done! You can then start using the added storage space as usual.<\/p>\n\n\n\n

Unmounting a disk<\/h2>\n\n\n\n

Detaching a storage disk is a considerably simpler process than attaching one.<\/p>\n\n\n\n

To ensure data integrity on your cloud server after the detachment, check that the host does not have active services using the disk being removed. Once you are sure it is safe to detach the device proceed with the steps below for either Linux or Windows hosts.<\/p>\n\n\n\n

Linux<\/h3>\n\n\n\n

Unmount the disk being removed with the command underneath.<\/p>\n\n\n\n

sudo umount mounting_point<\/span>\n# For example\nsudo umount \/disk1<\/pre>\n\n\n\n

If you are permanently removing a disk that was configured to automount at boot, you will also need to remove the disk in question from the fstab<\/tt> file.<\/p>\n\n\n\n

# On Ubuntu and Debian\nnano \/etc\/fstab\n# Or on CentOS\nvi \/etc\/fstab<\/pre>\n\n\n\n

Delete the line describing the disk you want to remove. These are usually easiest to identify according to their mounting points. Then save the file and exit the editor.<\/p>\n\n\n\n

Then, shut down your server either with the Shutdown request at your control panel or by using the command below in your server terminal.<\/p>\n\n\n\n

sudo shutdown -h now<\/pre>\n\n\n\n

When the server is powered down, continue to your UpCloud control panel<\/a> to remove the disk.<\/p>\n\n\n\n

Windows<\/h3>\n\n\n\n

Open the Disk Management<\/em>\u00a0panel by\u00a0right-clicking the Windows Start button and selecting Disk Management from the appearing list. Alternatively, type\u00a0diskmgmt.msc\u00a0in the search or run window and then press enter.<\/p>\n\n\n\n

Right-click the disk you wish to remove and select Offline to turn off the device.<\/p>\n\n\n\n

\"Windows<\/figure>\n\n\n\n

Shut down your server at Windows over a Remote Desktop Connection or through the web console at your UpCloud control panel<\/a>.<\/p>\n\n\n\n

Detaching a disk<\/h2>\n\n\n\n

With your server powered down, go to your UpCloud control panel<\/a> and open the Storage<\/em> tab under the server settings.<\/p>\n\n\n\n

There are two ways of removing storage disks.<\/p>\n\n\n\n

    \n
  1. Detaching a disk simply frees the storage to be attached again and keeps the data for later use.<\/li>\n\n\n\n
  2. Deleting a disk removes the device from the server and deletes the data permanently.<\/li>\n<\/ol>\n\n\n\n

    Scheduled backups will continue even while the disk is detached according to the\u00a0settings and retention time. Any backups made from the original storage disk are retained when deleting devices and can be used to restore deleted storage.<\/p>\n\n\n\n

    Click the eject icon on the storage you wish to remove but not delete.<\/p>\n\n\n\n

    \"Detaching<\/figure>\n\n\n\n

    Alternatively, if you are sure to not need the device any longer, you can click the bin icon to delete the storage device permanently.<\/p>\n\n\n\n

    \"Deleting<\/figure>\n\n\n\n

    Once the removal operation is complete, you can start up your server again.<\/p>\n\n\n\n

    If you are later confident that your cloud server runs as it should without the removed device, you can delete the detached\u00a0storage at your UpCloud control panel in the Storage<\/a>\u00a0section.<\/p>\n","protected":false},"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","community-category":[108,109,110],"class_list":["post-24395","tutorial","type-tutorial","status-publish","hentry","community-category-quick-start","community-category-upcloud-services","community-category-storage"],"acf":[],"_links":{"self":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial\/24395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/types\/tutorial"}],"replies":[{"embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/comments?post=24395"}],"wp:attachment":[{"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/media?parent=24395"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/studiogo.tech\/upcloudold\/wp-json\/wp\/v2\/community-category?post=24395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}