How to mount datastore to Proxmox Backup server maked another PBS?
- User
How to mount datastore to Proxmox Backup server maked another PBS?
Assistant
To mount a datastore from one Proxmox Backup Server (PBS) to another, follow these steps. This example assumes you want to access a datastore from a remote PBS (source) on a local PBS (target) using NFS (a common protocol for shared storage):
Prerequisites
- Network Accessibility: Ensure both PBS nodes can communicate over the network.
- Source PBS Setup: The source PBS must export the datastore via NFS.
- Firewall Rules: Allow NFS traffic (ports
111,2049,20048) between the nodes.
Step 1: Export the Datastore on the Source PBS
On the source PBS (the server hosting the datastore you want to share):
-
Install NFS Server (if not already installed):
apt update && apt install nfs-kernel-server -
Locate the Datastore Path:
- Check existing datastores in
/etc/proxmox-backup/datastore.cfg(e.g.,datastore: my-datastore, path /mnt/datastore). - Confirm the path (e.g.,
/mnt/datastore).
- Check existing datastores in
-
Export the Datastore via NFS: Edit
/etc/exportsand add:/mnt/datastore <target-pbs-ip>(rw,sync,no_subtree_check)Replace
<target-pbs-ip>with the IP of the target PBS. -
Apply the Export:
exportfs -ra systemctl restart nfs-kernel-server
Step 2: Mount the Datastore on the Target PBS
On the target PBS (where you want to access the remote datastore):
-
Add the NFS Storage:
- Open the Proxmox Backup Server web interface (
https://<target-pbs-ip>:8007). - Go to Datastore > Add.
- Open the Proxmox Backup Server web interface (
-
Configure the NFS Storage:
- ID: A unique name (e.g.,
remote-datastore). - Type: Select
NFS. - Server: IP/hostname of the source PBS.
- Export: Path exported on the source PBS (e.g.,
/mnt/datastore). - Options (optional): Add mount options like
rw(read-write) orasync.
Example configuration:
Server: 192.168.1.100 Export: /mnt/datastore - ID: A unique name (e.g.,
-
Verify the Mount:
- Check the datastore list in the PBS UI. The remote datastore should appear.
- Use
pvesm statusin the CLI to confirm:pvesm status | grep remote-datastore
Alternative: Mount via SSH (If NFS is Unavailable)
If NFS is not an option, use SSH-based storage (requires
sshaccess):- On the Target PBS:
- Create a mount point (e.g.,
/mnt/remote-datastore). - Mount the source PBS directory via SSHFS:
apt install sshfs sshfs root@<source-pbs-ip>:/mnt/datastore /mnt/remote-datastore - Add the directory as a datastore in the PBS UI (Type: Directory, path
/mnt/remote-datastore).
- Create a mount point (e.g.,
Important Notes
- Permissions: Ensure the target PBS has read/write access to the exported directory.
- Backup Conflicts: Avoid writing backups to the same datastore from multiple PBS instances unless coordinated.
- Performance: Network-mounted datastores may have higher latency than local storage.
For advanced configurations (e.g., replication between PBS nodes), refer to the Proxmox Backup Server Documentation.
- User
Jak dodać datastore utworzone na innym PBS dp proxmox backup server będące na dysku USB?
Assistant
Oto kroki, aby dodać datastore z innnego serwera Proxmox Backup Server (PBS), który jest zlokalizowany na dysku USB, do Twojego lokalnego PBS:
Warunki wstępne
- Źródłowy PBS (z dyskiem USB) musi być dostępny w sieci.
- Dysk USB na źródłowym PBS musi być poprawnie zamontowany i skonfigurowany jako datastore.
- Firewall na obu serwerach musi zezwalać na ruch NFS (porty:
111,2049,20048).
Krok 1: Sprawdź konfigurację źródłowego PBS
Na źródłowym PBS (gdzie jest podłączony dysk USB):
-
Znajdź ścieżkę do datastore'u:
- Sprawdź plik konfiguracyjny datastore'ów:
cat /etc/proxmox-backup/datastore.cfg - Przykładowy wpis:
datastore: usb-datastore path /mnt/usb/pbs-data - Ścieżka do datastore'u to
/mnt/usb/pbs-data.
- Sprawdź plik konfiguracyjny datastore'ów:
-
Zapisz dane źródłowego PBS:
- IP źródłowego PBS: np.
192.168.1.100. - Nazwa datastore'u:
usb-datastore.
- IP źródłowego PBS: np.
Krok 2: Udostępnij datastore przez NFS (na źródłowym PBS)
Aby udostępnić datastore z dysku USB innym serwerom:
-
Zainstaluj serwer NFS (jeśli nie jest zainstalowany):
apt update && apt install nfs-kernel-server -
Eksportuj ścieżkę datastore'u:
- Edytuj plik
/etc/exports:nano /etc/exports - Dodaj linię z IP docelowego PBS:
Przykład:/mnt/usb/pbs-data <docelowy-pbs-ip>(rw,sync,no_subtree_check)/mnt/usb/pbs-data 192.168.1.200(rw,sync,no_subtree_check)
- Edytuj plik
-
Zastosuj zmiany:
exportfs -ra systemctl restart nfs-kernel-server
Krok 3: Dodaj datastore na docelowym PBS
Na docelowym PBS (gdzie chcesz dodać datastore):
-
Dodaj datastore przez interfejs webowy:
- Wejdź w Datastore > Add.
- Wybierz typ NFS:
- Server: IP źródłowego PBS (np.
192.168.1.100). - Export: Ścieżka do datastore'u na źródłowym PBS (np.
/mnt/usb/pbs-data). - ID: Nadaj nazwę (np.
remote-usb-datastore).
- Server: IP źródłowego PBS (np.
[image: Przykładowa konfiguracja NFS] open
-
Sprawdź poprawność:
- W interfejsie PBS powinien pojawić się nowy datastore.
- W CLI docelowego PBS wykonaj:
pvesm status | grep remote-usb-datastore
Jeśli NFS nie działa: Alternatywa przez SSHFS
Jeśli nie możesz użyć NFS, zamontuj datastore przez SSH:
- Na docelowym PBS:
- Zainstaluj
sshfs:apt install sshfs - Utwórz punkt montowania:
mkdir /mnt/remote-usb-datastore - Zamontuj datastore z źródłowego PBS:
sshfs root@192.168.1.100:/mnt/usb/pbs-data /mnt/remote-usb-datastore - Dodaj w PBS jako datastore typu Directory wskazujący na
/mnt/remote-usb-datastore.
- Zainstaluj
Uwagi
- Uprawnienia: Upewnij się, że użytkownik
www-data(używany przez PBS) ma dostęp do ścieżki na źródłowym PBS:chown -R www-data:www-data /mnt/usb/pbs-data - Stabilność USB: Dysk USB powinien być trwale zamontowany na źródłowym PBS (np. przez
/etc/fstab). - Wydajność: Dostęp przez sieć może być wolniejszy niż lokalny datastore.
Jeśli masz problemy, podaj więcej szczegółów (np. błędy w logach), a pomożemy je rozwiązać! 😊
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.