Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
slab [2021/04/25 08:09]
cubebuilder
slab [2021/05/09 14:31] (current)
kobi
Line 6: Line 6:
  
 ===== How to setup a storage slab on Linux ===== ===== How to setup a storage slab on Linux =====
-//[[http://doku.cubebuilder.me/doku.php?id=slab#how_to_setup_a_storage_slab_on_windows|For setting up your storage slab on Microsoft Windows please click here.]]//+//[[http://doku.cubebuilder.me/doku.php?id=slab#how_to_setup_a_storage_slab_on_microsoft_windows|For setting up your storage slab on Microsoft Windows please click here.]]//
  
 __** WARNING, please make sure you follow this guide correctly or you risk wiping your boot drive.**__ __** WARNING, please make sure you follow this guide correctly or you risk wiping your boot drive.**__
Line 12: Line 12:
 **Step 1)** Attach the slab to your desired KVM slice in the Storage Volumes section in [[https://manage.buyvm.net/|Stallion]]. **Step 1)** Attach the slab to your desired KVM slice in the Storage Volumes section in [[https://manage.buyvm.net/|Stallion]].
  
-**Step 2)** Run ''fdisk -l'' to find out what the device path is for the slab you've just attached.+**Step 2)** Run ''sudo lsblk -o name,vendor,model,size'' to find out what the device path is for the slab you've just attached.
  
 <code> <code>
-$ sudo fdisk -+$ sudo lsblk -o name,vendor,model,size
-Disk /dev/vda: 20 GiB21474836480 bytes41943040 sectors +
-Units: sectors of 1 * 512 = 512 bytes +
-Sector size (logical/physical): 512 bytes / 512 bytes +
-I/O size (minimum/optimal): 512 bytes / 512 bytes +
-Disklabel type: dos +
-Disk identifier: 0x19ed42f3+
  
-Device     Boot    Start      End  Sectors Size Id Type +NAME   VENDOR   MODEL             SIZE 
-/dev/vda1  *        2048 39843455 39841408  19G 83 Linux +sda    BUYVM    SLAB                250G 
-/dev/vda2       39843456 41940607  2097152   1G 82 Linux swap / Solaris +sr0    QEMU     QEMU DVD-ROM     1024M 
- +vda    0x1af4                      10G 
- +├─vda1                            9.5G 
-Disk /dev/sda: 256 GiB, 274877906944 bytes, 536870912 sectors +└─vda2                            512M
-Disk model: SLAB +
-Units: sectors of 1 * 512 = 512 bytes +
-Sector size (logical/physical): 512 bytes / 512 bytes +
-I/O size (minimum/optimal): 512 bytes / 512 bytes +
-Disklabel type: dos +
-Disk identifier: 0x716cfadf+
 </code> </code>
  
-In this case, there are 2 drives. One of them is the boot drive which is usually ''/dev/vda''. This is not the device you are looking for. What you're looking for is the newly attached slab's device path. You can usually tell which disk it is because every slab's Disk Model is "SLAB"In this case, the device path is /dev/sda.+In this case, you can see that the ''sda'' device has the vendor "BUYVM" and the model "SLAB" with a size of 250GBThis means that the device path will be ''/dev/sda''.
  
-**Step 3)** Now, you need to create a partition on your slab. To do this, we'll be using ''parted''. Please note that ''parted'' might not be installed by default on some systems. You should be able to install it with your system's package manager.+**Step 3)** Now that you've identified your slab's device path, you need to create a partition on your slab. To do this, you will be using ''parted''. Please note that ''parted'' might not be installed by default on some systems. You should be able to install it with your system's package manager.
  
-First, we're going to create the GUID Partition Table (GPT). To do this, run the following command:+First, you're going to create the GUID Partition Table (GPT). To do this, run the following command:
 <code> <code>
 parted /dev/sda mklabel gpt parted /dev/sda mklabel gpt
Line 54: Line 42:
 </code> </code>
  
-**Step 4)** Run fdisk -l again to see the new partition you just created (which should be ''/dev/sda1''). +This will create a partition using the entire slab's storage capacity
-<code> +
-$ fdisk -l +
-[... your boot drive ...]+
  
-Disk /dev/sda: 256 GiB274877906944 bytes536870912 sectors +**Step 4)** Run ''sudo lsblk -o name,vendor,model,size'' again to see the new partition you just created (which should be ''/dev/sda1''). 
-Disk modelSLAB +<code> 
-Units: sectors of 1 * 512 = 512 bytes +$ sudo lsblk -o name,vendor,model,size 
-Sector size (logical/physical): 512 bytes / 512 bytes +NAME   VENDOR   MODEL             SIZE 
-I/O size (minimum/optimal): 512 bytes / 512 bytes +sda    BUYVM    SLAB                250G 
-Disklabel type: dos +└─sda1 
-Disk identifier: 0x716cfadf+sr0    QEMU     QEMU DVD-ROM     1024M 
 +vda    0x1af4                      10G 
 +├─vda1                            9.5G 
 +└─vda2                            512M
  
-Device     Boot Start       End   Sectors  Size Id Type 
-/dev/sda1        2048 536870911 536868864  256G 83 Linux 
 </code> </code>
  
  
-**Step 5)** Now, you need to format the slab to have an actual filesystem. The most common filesystem is ext4 so we will be using that in this guide. To create an ext4 filesystem on your slab, run +**Step 5)** Now, you need to format the slab to have an actual filesystem. The most common filesystem is ext4 so will be using that in this guide. To create an ext4 filesystem on your slab, run 
 <code> <code>
 mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda1
Line 135: Line 121:
  
  
-===== How to setup a Storage Slab on Windows =====+===== How to setup a Storage Slab on Microsoft Windows =====
 ** WARNING, please make sure you follow this guide correctly or you risk wiping your boot drive.** ** WARNING, please make sure you follow this guide correctly or you risk wiping your boot drive.**
 +
 +**This guide should work on Windows Server 2012 R2, 2016 and 2019.**
  
 To setup your storage slab on Windows you need to make sure that the Slab is attached on the Stallion. To setup your storage slab on Windows you need to make sure that the Slab is attached on the Stallion.