Difference between revisions of "Building a Storage Server"
Line 31: | Line 31: | ||
This section is to be done while logged into the Proxmox server as '''root'''. | This section is to be done while logged into the Proxmox server as '''root'''. | ||
Mount your dedicated drives on the Physical server itself. To do this at the command line: | Mount your dedicated drives on the Physical server itself. To do this at the command line: | ||
* <code>mount -L '''''Storage-0 /mnt/Storage-0'''''</code> | * <code>mount -L '''''Storage-0 /mnt/Storage-0'''''</code> | ||
Line 38: | Line 38: | ||
* <code>mount -L '''''Storage-3 /mnt/Storage-3'''''</code> | * <code>mount -L '''''Storage-3 /mnt/Storage-3'''''</code> | ||
* <code>mount -L '''''Storage-4 /mnt/Storage-4'''''</code> | * <code>mount -L '''''Storage-4 /mnt/Storage-4'''''</code> | ||
Then you can use [https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points bindmount] to attach them to your LXC. | Then you can use [https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points bindmount] to attach them to your LXC. | ||
Line 80: | Line 81: | ||
=== Configuring the NFS shares === | === Configuring the NFS shares === | ||
* sudo vi /etc/exports | |||
* ...WIP... | |||
* sudo exportfs -a | |||
* sudo /etc/init.d/nfs-kernel-server restart | |||
== SMB == | == SMB == | ||
See: [[Installing Samba from the command line]] | See: [[Installing Samba from the command line]] | ||
=== Set up Samba Users === | |||
* sudo smbpasswd -a '''''USER''''' | |||
* repeat... | |||
=== Configuring the SMB shares === | === Configuring the SMB shares === | ||
* sudo vi /etc/samba/smb.conf | |||
* ...WIP... | |||
* sudo systemctl restart smbd | |||
== FTP == | == FTP == | ||
Line 90: | Line 105: | ||
=== Configuring the FTP shares === | === Configuring the FTP shares === | ||
* ...WIP... | |||
* sudo service proftpd restart |
Revision as of 12:37, 4 August 2024
12 (bookworm) |
|
We will be creating our storage server as an LXC under Proxmox with dedicated physical drives on the physical server.
(NOTE: any file/folder names in bold & italic here are examples of what I'm doing on a local system & may be different depending on YOUR needs...)
Building the LXC under Proxmox
Configuring the LXC
Configure this as a Privileged container.
Under Options / Features, turn on Nesting, NFS & SMB/CIFS.
It will simply your life if you can set up local users matching each network user that will be accessing this server. On my network, there are only 3 users that match this criteria. But, you may want to look into kerberos or some such.
Setting up dedicated drives
See: Adding a new drive from the command line
Personally, I like to handle my drives by label to make them easier to find & move around if needed.
In this case, I'm adding 5 drives to the LXC...
This section is to be done while logged into the Proxmox server as root.
Mount your dedicated drives on the Physical server itself. To do this at the command line:
mount -L Storage-0 /mnt/Storage-0
mount -L Storage-1 /mnt/Storage-1
mount -L Storage-2 /mnt/Storage-2
mount -L Storage-3 /mnt/Storage-3
mount -L Storage-4 /mnt/Storage-4
Then you can use bindmount to attach them to your LXC.
pct set 10020 -mp0 /mnt/Storage-0,mp=/Storage-0
pct set 10020 -mp1 /mnt/Storage-1,mp=/Storage-1
pct set 10020 -mp2 /mnt/Storage-2,mp=/Storage-2
pct set 10020 -mp3 /mnt/Storage-3,mp=/Storage-3
pct set 10020 -mp4 /mnt/Storage-4,mp=/Storage-4
At this point, I would recomment rebooting the LXC, either through the GUI or:
pct reboot 10020
This section is to be done while logged into the LXC.
Create the starting points
sudo mkdir /Backups
sudo mkdir /Media
sudo mkdir /Documents
Create the folders to be shared (I've created subfolders on the drive(s) through the usual methods...)
sudo mkdir /Backups/Cecil
sudo mount -o bind /mnt/Storage-3/Cecil-Backup/ /Backups/Cecil
sudo mkdir /Media/Photos /Media/Music /Media/Movies
sudo mount -o bind /mnt/Storage-3/Cleanup-Space/Photos /Media/Photos
sudo mount -o bind /mnt/Storage-4/Music /Media/Music
sudo mount -o bind /mnt/Storage-4/Movies /Media/Movies
- etc, etc, etc...
Of course, you'll need to make these mounts persistent
sudo vi /etc/fstab
/mnt/Storage-3/Cecil-Backup/ /Backups/Cecil none defaults,bind 0 0
/mnt/Storage-3/Cleanup-Space/Photos /Media/Photos none defaults,bind 0 0
/mnt/Storage-4/Music /Media/Music none defaults,bind 0 0
/mnt/Storage-4/Movies /Media/Movies none defaults,bind 0 0
sudo systemctl daemon-reload
sudo mount -a
NFS
See: Setting up NFS for file sharing
- sudo vi /etc/exports
- ...WIP...
- sudo exportfs -a
- sudo /etc/init.d/nfs-kernel-server restart
SMB
See: Installing Samba from the command line
Set up Samba Users
- sudo smbpasswd -a USER
- repeat...
- sudo vi /etc/samba/smb.conf
- ...WIP...
- sudo systemctl restart smbd
FTP
See: FTP Serving
- ...WIP...
- sudo service proftpd restart