Categories
Proxmox

How to Add Storage Dive to Proxmox 7

If you are here you are most likely looking to add a HDD or SSD to your Proxmox server. This is just what the tutorial will be showing you how to do.

The first this that you are going to do is open your Proxmox web interface. With you web interface open setart by selecting your server on the left, then on the right select Shell.

Now with Shell open you will need to run a command to show the available drives on your Proxmox server.

$ lsblk

Now that we know what the drive that we are using is called (sdb for this How to) it is time to install some software. We will use Parted for this How to because I find it easier to work with and it supports drives larger the 2tb.

The first thin that you need to do to install Parted is update you repositories you can do that by running

$ apt update

Now that the repositories are up to date it is time to install Parted

$ apt install parted -y

Ok with Parted installed it is time to start preparing the drive for use with Proxmox. The first step is going to apply a drive type label.

$ parted /dev/[drive name] mklabel gpt

The next command will partition you full drive.

$ parted -a opt /dev/[drive name] mkpart primary ext4 0% 100%

This next command gives your drive a name this name just makes it easier to work with, the name that I will be giving the drive today is Storage.

$ mkfs.ext4 -L [your drive name] /dev/[found drive name fallowed by 1]

Now we need to make a folder for Proxmox to mount the drive to to do this you will run.

$ mkdir -p [path of mount folder]

With the mount folder made it is finally time to update fstab for the new drive you do this so that the drive will auto mount with reboots. To open fstab and edit it we will use the command.

$ nano /ect/fstab

Inside of fstab you need to add a line so that the drive will auto mount.

# LABEL=[your drive name] [mount path] ext4 defaults 0 2

to exit and save press control + x the y to save and enter

Because we don’t wont to reboot the server right now run

$ mount -a

to mount the new drive to Proxmox

With the drive mounted you can close Shell, and go back to working with the web interface. To start adding your new drive to Proxmox web interface select Datacenter then select Storage.

Inside of Storage Click Add dropdown then select Directory.

Once you have selected Directory it is time to fill out some info. For ID give your drive a name, for Directory enter the path to your mount point, then select what you will be using this drive to do in the Contents dropdown. After all this info has been entered click Add.

Now you shoud see your drive show up under your server in the web interface.

Categories
Proxmox

How to unlock a LXC (Linux container) in Proxmox 7

If you had a backup or other operation fail, then you know the pain of having the a locked contained this short tutorial today is going to show you just how easy it is to unlock your container in Proxmox 7

The first thing that you’re going to want to do after discovering your locked container is to take note of the container ID number, today the container ID number that were going to be looking at is 1005. After taking note of the container ID number were going to select the Proxmox server that we want to use then we’re going to select the shell terminal.

After the shell terminal has fully loaded we want to enter the command PCT unlock then the container ID number after this command has been entered just press the enter key and it will run. If you see no error messages it has successfully completed and your container should be unlocked

$ pct unlock [ container ID number ]

Below you can see that our command has successfully unlocked our container. That is just how easy it is to unlock your container after a backup operation has failed.