From ed714fcc4415d9514e18e92e73a047f441958dbe Mon Sep 17 00:00:00 2001 From: Luca Wunderlich Date: Sun, 31 Dec 2023 14:44:38 +0100 Subject: [PATCH 1/4] Using Local Block Storage on Netcup Linux Server --- .../how-to-use-local-block-storage/01-de.md | 130 ++++++++++++++++++ .../how-to-use-local-block-storage/01-en.md | 130 ++++++++++++++++++ 2 files changed, 260 insertions(+) create mode 100644 community-tutorials/how-to-use-local-block-storage/01-de.md create mode 100644 community-tutorials/how-to-use-local-block-storage/01-en.md diff --git a/community-tutorials/how-to-use-local-block-storage/01-de.md b/community-tutorials/how-to-use-local-block-storage/01-de.md new file mode 100644 index 0000000..f5e1760 --- /dev/null +++ b/community-tutorials/how-to-use-local-block-storage/01-de.md @@ -0,0 +1,130 @@ +--- +title: Einbinden von lokalem Blockspeicher unter Netcup Linux Server +description: Lernen Sie, wie Sie unter einem Netcup Linux-Server zusätzliche Festplatten einbinden und nutzen können. Dieses Tutorial richtet sich an Benutzer mit SSH-Zugriff und bietet Schritt-für-Schritt-Anleitungen für die Einrichtung. +updated_at: 2023-12-31 +slug: how-to-use-local-block-storage +author_name: Luca Wunderlich +author_url: https://github.com/lucawun +author_image: +author_bio: +tags: [local-block-storage, backup, more-storage] +netcup_product_url: https://www.netcup.de/vserver/local-block-storage +language: de +available_languages: en,de +--- + +# Einführung + +In diesem Tutorial zeigen wir Ihnen, wie Sie zusätzliche Festplatten unter Linux auf einem Netcup-Server einbinden und nutzen können. + +# Anforderungen + +Die Anleitung richtet sich an Benutzer, die bereits Zugriff auf ihren Server über SSH haben. **Hinweis:** Stellen Sie sicher, dass Ihr Benutzer die erforderlichen Berechtigungen hat. + +Sie können zu Beginn einer jeden SSH-Session das folgende Kommando ausführen: ```bash sudo -i + +# Schritt 1 - Übersicht über verfügbare Festplatten + +Um eine Übersicht über alle erkannten Festplatten zu erhalten, verwenden Sie den Befehl: + +``` +fdisk -l +``` + +In unserem Beispiel haben wir zwei Festplatten: /dev/sda (die Systemfestplatte) und /dev/vda (eine zusätzliche 50 GiB-Festplatte). + +# Schritt 2 - Partition erstellen + +Verwenden Sie `cfdisk`, um eine Partition auf der zusätzlichen Festplatte zu erstellen: + +``` +cfdisk /dev/vdb1 +``` + +Wählen Sie im Auswahlmenü "dos" für eine MBR-Partitionstabelle. Danach erstellen Sie eine 50 GiB-Partition als Primärpartition. + +# Schritt 3 - Partition formatieren + +Verlassen Sie `cfdisk` und überprüfen Sie, ob die Partition erstellt wurde: + +``` +fdisk -l +``` + +Formatieren Sie die Partition (in unserem Beispiel als ext4): + +``` +mkfs.ext4 /dev/vdb1 +``` + +# Schritt 4 - Partition einbinden + +Erstellen Sie einen Ordner für die Festplatte (in unserem Beispiel "lbstorage"): + +``` +mkdir /lbstorage +``` + +Binden Sie die Partition in den Ordner ein: + +``` +mount /dev/vdb1 /lbstorage +``` + +# Schritt 5 - Automatische Einbindung nach Neustart + +Finden Sie die UUID der Partition: + +``` +blkid /dev/vdb1 +``` + +Öffnen Sie die `/etc/fstab`-Datei und fügen Sie die UUID hinzu: + +``` +nano /etc/fstab +``` + +Fügen Sie am Ende der Datei die Zeile ein (ersetzen Sie die UUID durch die richtige): + +``` +UUID=your_uuid_here /lbstorage ext4 defaults 0 0 +``` + +Speichern Sie die Datei. + +# Fazit + +Die zusätzliche Festplatte ist nun einsatzbereit und wird automatisch nach einem Neustart eingebunden. + +# License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicence, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +# Contributor's Certificate of Origin + +By making a contribution to this project, I certify that: + +1. The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or + +2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or + +3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. + +4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved. diff --git a/community-tutorials/how-to-use-local-block-storage/01-en.md b/community-tutorials/how-to-use-local-block-storage/01-en.md new file mode 100644 index 0000000..8e5b8af --- /dev/null +++ b/community-tutorials/how-to-use-local-block-storage/01-en.md @@ -0,0 +1,130 @@ +--- +title: Using Local Block Storage on Netcup Linux Server +description: Learn how to attach and utilize additional hard drives on a Netcup Linux server. This tutorial is designed for users with SSH access and provides step-by-step instructions for setup. +updated_at: 2023-12-31 +slug: how-to-use-local-block-storage +author_name: Luca Wunderlich +author_url: https://github.com/lucawun +author_image: +author_bio: +tags: [local-block-storage, backup, more-storage] +netcup_product_url: https://www.netcup.de/vserver/local-block-storage +language: de +available_languages: en,de +--- + + # Introduction + +In this tutorial we will show you how to integrate and use additional hard disks under Linux on a Netcup server. + +# Requirements + +The tutorial is aimed at users who already have access to their server via SSH. **Note:** Make sure that your user has the required authorizations. + +You can execute the following command at the beginning of each SSH session: ```bash sudo -i + +# Step 1 - Overview of available hard disks + +To get an overview of all recognized hard disks, use the command: + +``` +fdisk -l +``` + +In our example, we have two hard disks: /dev/sda (the system hard disk) and /dev/vda (an additional 50 GiB hard disk). + +# Step 2 - Create a partition + +Use `cfdisk` to create a partition on the additional disk: + +``` +cfdisk /dev/vdb1 +``` + +Select "dos" in the selection menu for an MBR partition table. Then create a 50 GiB partition as the primary partition. + +# Step 3 - Format partition + +Exit `cfdisk` and check that the partition has been created: + +``` +fdisk -l +``` + +Format the partition (in our example as ext4): + +``` +mkfs.ext4 /dev/vdb1 +``` + +# Step 4 - Mount the partition + +Create a folder for the hard disk (in our example "lbstorage"): + +``` +mkdir /lbstorage +``` + +Mount the partition in the folder: + +``` +mount /dev/vdb1 /lbstorage +``` + +# Step 5 - Automatic mounting after reboot + +Find the UUID of the partition: + +``` +blkid /dev/vdb1 +``` + +Open the `/etc/fstab` file and add the UUID: + +``` +nano /etc/fstab +``` + +Add the line at the end of the file (replace the UUID with the correct one): + +``` +UUID=your_uuid_here /lbstorage ext4 defaults 0 0 +``` + +Save the file. + +# Conclusion + +The additional hard disk is now ready for use and is automatically mounted after a reboot. + +# License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicence, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +# Contributor's Certificate of Origin + +By making a contribution to this project, I certify that: + +1. The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or + +2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or + +3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. + +4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved. From 0bef1dde6d5b44d4dae19799c7717bd30f5e6b13 Mon Sep 17 00:00:00 2001 From: Christoph <98811118+netcupChristophW@users.noreply.github.com> Date: Tue, 30 Jan 2024 07:35:37 +0100 Subject: [PATCH 2/4] Update 01-de.md --- .../how-to-use-local-block-storage/01-de.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/community-tutorials/how-to-use-local-block-storage/01-de.md b/community-tutorials/how-to-use-local-block-storage/01-de.md index f5e1760..ef61552 100644 --- a/community-tutorials/how-to-use-local-block-storage/01-de.md +++ b/community-tutorials/how-to-use-local-block-storage/01-de.md @@ -1,6 +1,6 @@ --- -title: Einbinden von lokalem Blockspeicher unter Netcup Linux Server -description: Lernen Sie, wie Sie unter einem Netcup Linux-Server zusätzliche Festplatten einbinden und nutzen können. Dieses Tutorial richtet sich an Benutzer mit SSH-Zugriff und bietet Schritt-für-Schritt-Anleitungen für die Einrichtung. +title: Einbinden von local Blockstorage mit einem netcup Linux Server +description: Lernen Sie, wie Sie das Feature local Blockstorage einrichten können. updated_at: 2023-12-31 slug: how-to-use-local-block-storage author_name: Luca Wunderlich @@ -15,13 +15,13 @@ available_languages: en,de # Einführung -In diesem Tutorial zeigen wir Ihnen, wie Sie zusätzliche Festplatten unter Linux auf einem Netcup-Server einbinden und nutzen können. +In diesem Tutorial zeigen wir Ihnen, wie Sie local Blockstorage unter Linux auf einem netcup Server einbinden und nutzen können. # Anforderungen -Die Anleitung richtet sich an Benutzer, die bereits Zugriff auf ihren Server über SSH haben. **Hinweis:** Stellen Sie sicher, dass Ihr Benutzer die erforderlichen Berechtigungen hat. +Die Anleitung richtet sich an Benutzer, die bereits Zugriff auf ihren Server über SSH haben. Bitte stellen Sie sicher, dass Ihr Benutzer die erforderlichen Berechtigungen hat. -Sie können zu Beginn einer jeden SSH-Session das folgende Kommando ausführen: ```bash sudo -i +Sie können zu Beginn einer jeden SSH-Session das folgende Kommando ausführen: ```bash sudo -i``` # Schritt 1 - Übersicht über verfügbare Festplatten @@ -95,7 +95,7 @@ Speichern Sie die Datei. # Fazit -Die zusätzliche Festplatte ist nun einsatzbereit und wird automatisch nach einem Neustart eingebunden. +Ihr local Blockstorage wird automatisch nach einem Neustart eingebunden und ist einsatzbereit. # License From 6eab4f6b985715ba6460712950278b3ee1b5617e Mon Sep 17 00:00:00 2001 From: Christoph <98811118+netcupChristophW@users.noreply.github.com> Date: Tue, 30 Jan 2024 07:35:48 +0100 Subject: [PATCH 3/4] Rename 01-de.md to 02-de.md --- .../how-to-use-local-block-storage/{01-de.md => 02-de.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename community-tutorials/how-to-use-local-block-storage/{01-de.md => 02-de.md} (100%) diff --git a/community-tutorials/how-to-use-local-block-storage/01-de.md b/community-tutorials/how-to-use-local-block-storage/02-de.md similarity index 100% rename from community-tutorials/how-to-use-local-block-storage/01-de.md rename to community-tutorials/how-to-use-local-block-storage/02-de.md From 9e55a8b1c70d459ad78b5b2f8568e90ded2e12e1 Mon Sep 17 00:00:00 2001 From: Christoph <98811118+netcupChristophW@users.noreply.github.com> Date: Tue, 30 Jan 2024 07:37:04 +0100 Subject: [PATCH 4/4] Update 01-en.md --- .../how-to-use-local-block-storage/01-en.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/community-tutorials/how-to-use-local-block-storage/01-en.md b/community-tutorials/how-to-use-local-block-storage/01-en.md index 8e5b8af..7913125 100644 --- a/community-tutorials/how-to-use-local-block-storage/01-en.md +++ b/community-tutorials/how-to-use-local-block-storage/01-en.md @@ -1,6 +1,6 @@ --- -title: Using Local Block Storage on Netcup Linux Server -description: Learn how to attach and utilize additional hard drives on a Netcup Linux server. This tutorial is designed for users with SSH access and provides step-by-step instructions for setup. +title: Using local Blockstorage on netcup Linux Server +description: Learn how to attach an local Blockstorage updated_at: 2023-12-31 slug: how-to-use-local-block-storage author_name: Luca Wunderlich @@ -15,13 +15,13 @@ available_languages: en,de # Introduction -In this tutorial we will show you how to integrate and use additional hard disks under Linux on a Netcup server. +In this tutorial we will show you how to integrate and use additional hard disks under Linux on a netcup server. # Requirements -The tutorial is aimed at users who already have access to their server via SSH. **Note:** Make sure that your user has the required authorizations. +The tutorial is aimed at users who already have access to their server via SSH. Please make sure that your user has the required authorizations. -You can execute the following command at the beginning of each SSH session: ```bash sudo -i +You can execute the following command at the beginning of each SSH session: ```bash sudo -i``` # Step 1 - Overview of available hard disks @@ -95,7 +95,7 @@ Save the file. # Conclusion -The additional hard disk is now ready for use and is automatically mounted after a reboot. +The additional disk is now ready for use and will automatically be mounted after a reboot. # License