[SOLVED] Keep getting exit codes

Bartjuuh

New Member
Jan 4, 2020
6
0
1
Hello everyone,
I recently bought a server. This server has 2x 4core xeon and 28gb ram. I installed Proxmox on it and when I try to make a directory it keeps spitting out exit codes.
https://pastebin.com/P0yfmngC
Can some one explain what I am doing wrong because I do not understand what is going on here. I have tried serveral disks and it gives me exit code 2, 3 or 4. Most recent one is 3!
Greetings Bartjuuh
 
What is the output of the following?
Code:
fdisk -l

By "make a directory" you mean using a new hdd as directory storage?

In this case something like this might get you going. Beware, might destroy data if you don't adapt to your use case exactly!

Code:
fdisk /dev/sdb (with g, n, w (rest default))
mkfs.ext4 /dev/sdb1
mkdir /media/newDisk
mount /dev/sdb1 /media/newDisk
touch /media/newDisk/template/iso/test.iso
 
What is the output of the following?
Code:
fdisk -l
Code:
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: TOSHIBA MQ01ABD0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E2BCB132-98F7-4F94-AA6C-4CFE6F69DAF2

Device     Start       End   Sectors   Size Type
/dev/sda1   2048 976773134 976771087 465.8G Linux filesystem


Disk /dev/sdb: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: KINGSTON SUV400S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A65FD3A0-6686-4B20-9250-EE7857A9CA25

Device       Start       End   Sectors   Size Type
/dev/sdb1       34      2047      2014  1007K BIOS boot
/dev/sdb2     2048   1050623   1048576   512M EFI System
/dev/sdb3  1050624 234441614 233390991 111.3G Linux LVM

Partition 1 does not start on physical sector boundary.


Disk /dev/sdc: 2.7 TiB, 2999497785344 bytes, 5858394112 sectors
Disk model: PERC H700      
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: 0x00000000


Disk /dev/mapper/pve-swap: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/pve-root: 27.8 GiB, 29796335616 bytes, 58195968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
By "make a directory" you mean using a new hdd as directory storage?
Yes I think I meant this. What I was trying to do is to get an folder in the directory page in my vps

In this case something like this might get you going. Beware, might destroy data if you don't adapt to your use case exactly!

Code:
fdisk /dev/sdb (with g, n, w (rest default))
mkfs.ext4 /dev/sdb1
mkdir /media/newDisk
mount /dev/sdb1 /media/newDisk
touch /media/newDisk/template/iso/test.iso
Is some thing like this right?
Code:
root@vps:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): g
Created a new GPT disklabel (GUID: 1A717C6B-BE06-744F-8D99-84D5B36A8B37).

Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-976773134, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-976773134, default 976773134):

Created a new partition 1 of type 'Linux filesystem' and of size 465.8 GiB.
Partition #1 contains a ntfs signature.

Do you want to remove the signature? [Y]es/[N]o: Y

The signature will be removed by a write command.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@vps:~# mkfs.ext4 /dev/sda1
mke2fs 1.44.5 (15-Dec-2018)
Creating filesystem with 122096385 4k blocks and 30531584 inodes
Filesystem UUID: b30459a4-e1ef-471b-8b2c-0a73add946f1
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000

Allocating group tables: done                           
Writing inode tables: done                           
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done    

root@vps:~# mkdir /media/ISOs
root@vps:~# mount /dev/sda1 /media/ISOs
root@vps:~# touch /media/ISOs/template/iso/test.iso
touch: cannot touch '/media/ISOs/template/iso/test.iso': No such file or directory
I think I need to upload the image (iso) now? And this folder I created won't show up in the Directory tab on the proxmox environment?
 
Is some thing like this right?
Yes.

Once you have mounted the partition you can go to the Proxmox VE GUI. Choose Datacenter->Storage->Add and enter the mount path in the field directory. You can then upload your ISO files in the web interface.
 
Yes.

Once you have mounted the partition you can go to the Proxmox VE GUI. Choose Datacenter->Storage->Add and enter the mount path in the field directory. You can then upload your ISO files in the web interface.
Thanks this worked for me!!

I want to have access to the server from anywere I am but don't want to give all my information to the open internet. Should I use a proxy or some sort of firewall?
 
Great!

Proxmox VE has an integrated firewall that is based on iptables. You could also install a firewall like pfSense in a virtual machine.
 
In my case I've got the error:
Code:
command '/sbin/sgdisk -n1 -t1:8300 /dev/sdb' failed: exit code 3
This was due to a dos partition table.
Your drive must have a GPT partition table.

After converting my partition table to GPT the problem was solved
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!