⬆️ ⬇️

Selectel cloud - no hindrance to Gentoo launch

Tonight I tried to install Gentoo in the selectel.ru virtual machine.



First you need to register and create a virtual machine with some axis.

For tests, I chose Debian mini.

After creation, I connect another hard disk, at least 2Gb in size.

We create sections on it, we format it.

When formatting it is necessary to take into account that in the standard configuration (stage3 + portage) there are a lot of small files, so the inode can end up faster than disk space. By default, they are 125568 at 1.9 gb, which is not enough to unpack stage3 and portage.



Format the partition size 1.9 gb:

mkfs.ext3 -i 8192 /dev/xvda1 - we get 251136 inode

mkfs.ext3 -i 4096 /dev/xvda1 - we get 502272 inode

')



Next you need to configure the configs according to the handbook, with the existing system write off the ip, nfs settings to the ball for the kernel modules.

There is no need to install the kernel and bootloader, so all you need to do is install syslog, cron, logrotate, nfs-utils.

Do not forget to include sshd in autoload.

It is also desirable to add a new "physical" console xvc0 in inittab and securetty.



Next you need to get in the support xen-tools and memory-on-demand, put them in the file system and write scripts for their autorun.



By performance (selected profile: 1 cpu, 130-310 mb ram), I was surprised by the speed of the emerge - sync, it worked for 10 seconds, I have not seen this yet.



The compilation itself comes at a normal speed, 13 packages gathered in 6-7 minutes.



At the price / cost of resources, the entire installation cost a little less than 2 rubles.

I made a table, how and at what moments the funds were written off:



NameMachine timeMemoryDisk: ReadIODisk: WriteIODisk: ReadDisk: WriteNet: receiveNet: sendWritten offTotal
rub.hour.rub.GB * hourrub.million piecesrub.million piecesrub.GBrub.GBrub.GBrub.GBrub.rub.
one0.020.020.020.040.160.0480.200.060.111.10.10one0.010.05000.620.62
20000000.010,003000.010.10.020.1000.040.66
3000000000000000000.66
four000.010.020000000.010.10.010.05000.030,69
five000000000000000000,69
60.010.01000.020,0060.150.0450.020.20.111.10.030.15000.341.03
70000000.090.027000.030.300000.121.15
eight0.010.010.020.040.080.0240.010,0030.010.10.010.100000.141.29
90.170.170.010.020.050.0150.030,0090.020.20.020.2000.010.010.311.60
ten0.030.03000.030,0090.010,0030.020.20.010.100000.101.70


Legend:

  1. After creating virtualka and its start
  2. we put on debian bzip2
  3. download stage3
  4. unpacking stage3
  5. download portage
  6. unpacking portage
  7. emerge --sync
  8. Configuration
  9. emerge syslog (13 packages)
  10. emerge logrotate (4 package)




Turn off the virtual.

After that, selectel experts changed which of the disk images will be system and can be loaded into Gentoo.



Summary disk space:

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/xvda1 1882348 1305368 476576 74% /




Loose inodes:

Filesystem Inodes IUsed IFree IUse% Mounted on

/dev/xvda1 502272 184045 318227 37% /




Top slice:





process list after reboot



pastebin.com/5eqpGizB

Source: https://habr.com/ru/post/110978/



All Articles