Dino Geek, try to help you

How can I use an additional hard drive for storing OpenVZ containers?


Here are the steps you need to follow:

1. Firstly, you need to make sure that the additional hard drive has been properly installed and recognized by the system. To do this, open Terminal and type `lsblk` or `fdisk -l`. This will display all the storage devices connected to your machine.

1. After confirming that your additional hard drive is recognized by the system, you need to partition, format and mount it. To partition a drive, you can use `fdisk` or `parted`. After partitioning, you can format the partition with `mkfs.ext4 /dev/sdb1`, assuming `sdb` is your additional hard drive and `1` is the partition number you want to format.

1. After formatting, you need to mount the partition to a certain directory. For example, if you mount it under `/home/vz`, all data under this directory will be stored on your additional hard drive. To do this, you can use `mount /dev/sdb1 /home/vz`.

1. However, the mount will be lost after system reboot. To make it permanent, you have to add an entry to `/etc/fstab` like this: `/dev/sdb1 /home/vz ext4 defaults 0 0`.

1. Now, open the OpenVZ configuration file at `/etc/vz/vz.conf` and edit VE_PRIVATE and VE_ROOT so that they point to mount point of your hard drive.

\`\`\` VE\_ROOT=/home/vz/root/$VEID VE\_PRIVATE=/home/vz/private/$VEID \`\`\` `$VEID` will be replaced by OpenVZ with the ID of the container.

1. Restart your OpenVZ service with `service vz restart`.

Now, new OpenVZ containers you create will be stored on your additional hard drive. Existing containers, however, won’t be moved automatically – you’ll need to move them manually from the old storage to the new one.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use