72 lines
1.8 KiB
Markdown
72 lines
1.8 KiB
Markdown
---
|
||
tags:
|
||
- Proxmox
|
||
- Mount
|
||
---
|
||
Detailed Steps:
|
||
|
||
1. **Connect and Identify the USB Drive:**
|
||
- Plug the USB drive into your Proxmox server.
|
||
- Use the `lsblk` command to list block devices and identify the correct device name (e.g., `/dev/sdb1`, `/dev/sdc1`). Pay attention to the size to ensure you've selected the correct drive.
|
||
|
||
Code
|
||
|
||
```
|
||
lsblk
|
||
```
|
||
|
||
1. **Format the USB Drive:**
|
||
- Use the appropriate command to format the drive with a suitable filesystem. For backups, `ext4` is a good choice.
|
||
|
||
Code
|
||
|
||
```
|
||
mkfs.ext4 /dev/sdX1
|
||
```
|
||
|
||
- Replace `/dev/sdX1` with the actual device name you identified.
|
||
- **Note:** If you are using the drive for Windows VMs, you might need to format it with NTFS.
|
||
|
||
1. **Create a Mount Point:**
|
||
- Create a directory where you want to mount the USB drive.
|
||
|
||
Code
|
||
|
||
```
|
||
mkdir /mnt/usb_storage
|
||
```
|
||
|
||
1. **Mount the USB Drive:**
|
||
- Mount the formatted drive to the created mount point.
|
||
|
||
Code
|
||
|
||
```
|
||
mount /dev/sdX1 /mnt/usb_storage
|
||
```
|
||
|
||
1. **Configure Automatic Mounting:**
|
||
- Edit the `/etc/fstab` file to ensure the drive is automatically mounted after a reboot.
|
||
|
||
Code
|
||
|
||
```
|
||
nano /etc/fstab
|
||
```
|
||
|
||
- Add a line similar to the following, replacing the UUID, mount point, and filesystem type as needed:
|
||
|
||
Code
|
||
|
||
```
|
||
UUID=your_uuid /mnt/usb_storage ext4 defaults,noatime,nofail 0 2
|
||
```
|
||
|
||
- To find the UUID, use `lsblk -o +UUID as root`.
|
||
- **Note:** The `nofail` option prevents the system from failing to boot if the drive is not available.
|
||
|
||
1. **Add as Proxmox Storage (Optional):**
|
||
- In the Proxmox web interface, navigate to Datacenter > Storage.
|
||
- Click "Add" and select "Directory".
|
||
- Configure the storage ID, directory (mount point), and filesystem type (e.g., `ext4`).
|
||
- You can then use this storage for backups or other purposes. |