While Emergency Mode is active, you can still access your VPS via SSH. The disk for your machine is mounted under the /mnt
directory. This folder includes different directories named sda
, which is the name of your VPS disk.
As multiple partitions exist to ensure your machine loads, you may see several numbered sda
directories by running the command ls
while inside the /mnt
directory:
root@machine:/mnt# ls
sda sda1 sda14 sda15
To identify what directory refers to your main partition, you can use this command:
lsblk
The command will output all devices: look for the sda
device and its partitions. The partition with the largest size is your VPS disk main partition.
The table will also include a MOUNTPOINTS column. That’s the directory the partition is mounted to. You can see an example below of what the output for lsblk
would look like:
root@machine:/# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 63.4M 1 loop /snap/core20/1974
loop1 7:1 0 111.9M 1 loop /snap/lxd/24322
loop2 7:2 0 53.3M 1 loop /snap/snapd/19457
loop3 7:3 0 40.9M 1 loop /snap/snapd/20290
loop4 7:4 0 63.5M 1 loop /snap/core20/2015
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 49.9G 0 part /mnt/sda1
├─sda14 8:14 0 4M 0 part
└─sda15 8:15 0 106M 0 part /mnt/sda15
/boot/efi
sdb 8:16 0 2.2G 0 disk
├─sdb1 8:17 0 2.1G 0 part /
├─sdb14 8:30 0 4M 0 part
└─sdb15 8:31 0 106M 0 part
sr0 11:0 1 4M 0 rom
The way partitions are organized depends on the operating system of your VPS. Therefore, the output of the lsblk
command may differ from the example above. The size of the main partition will also depend on your VPS plan 💡
Once you identify the directory where your main partition is mounted, access it and run the ls
command to see its files. Below is the expected output. Note that the files you see may also differ depending on your operating system:
root@machine:/mnt/sda1# ls
bin boot dev etc home lib lib32 lib64 libx32 lost+found media mnt opt proc root run sbin snap srv sys tmp usr var
If you're not familiar with the Linux Directory Structure, check this guide: Linux Directory Structure Explained for Beginners 💡
What to do if the MOUNTPOINTS column for the main storage partition is empty?
If the MOUNTPOINTS column is empty for the main partition, that means it isn’t mounted. You can easily mount it by using this command:
mount /dev/sda1 /path/to/mount
The /path/to/mount
can be anything. We recommend you name it after the partition number, e.g., if the main partition is sda2
, then use /mnt/sda2
.
Make sure to create the directory that will be used as the mountpoint first!