As a new user to proxmox (coming from TrueNAS Scale), I made a bunch of mistakes that cost me an aggravating week of time/effort. The two biggest issues I had were:
1. Before moving from TrueNAS Scale to Proxmox with your zpools, you must export them first: Storage > Pools > Export/Disconnect.
2. If you somehow bork your zpools by not doing #1 (so they can no longer be imported via zpool import -f and you get errors like: Failed to import pool: cannot import as tank: I/O error or cannot import tank: one or more devices is currently unavailable; or commands like zpool status -v are hanging) and you haven't done a backup of the data on your zpools first, try the following within your Proxmox host (which should allow you to get your zfs data off the drives):
(with thanks to https://www.truenas.com/community/threads/zpool-import-fail.112785/post-787511; see also https://www.truenas.com/community/threads/rescue-full-pool.115926/post-803895)
3. To create a simple SMB/Samba share:
- Not realizing I had to export my TrueNAS zfs pool before importing it into Proxmox (which ultimately corrupted my zpool and made my zfs drives inaccessible)
- Spending way too much time/effort setting up an SMB share for my Windows environment - such a simple ability that isn't base functionality (because there are just way too many internet posts giving outdated and/or wrong/speculative information and/or way too complicated/heavy solutions - such as Webmin, Cockpit with the 45Drives Samba, OpenMediaVault, TrueNAS Scale, TurnKey FileServer).
1. Before moving from TrueNAS Scale to Proxmox with your zpools, you must export them first: Storage > Pools > Export/Disconnect.
2. If you somehow bork your zpools by not doing #1 (so they can no longer be imported via zpool import -f and you get errors like: Failed to import pool: cannot import as tank: I/O error or cannot import tank: one or more devices is currently unavailable; or commands like zpool status -v are hanging) and you haven't done a backup of the data on your zpools first, try the following within your Proxmox host (which should allow you to get your zfs data off the drives):
(with thanks to https://www.truenas.com/community/threads/zpool-import-fail.112785/post-787511; see also https://www.truenas.com/community/threads/rescue-full-pool.115926/post-803895)
Bash:
echo "1" | tee /sys/module/zfs/parameters/zfs_max_missing_tvds
echo "0" | tee /sys/module/zfs/parameters/spa_load_verify_metadata
echo "0" | tee /sys/module/zfs/parameters/spa_load_verify_data
zpool import -f -o readonly=on tank
3. To create a simple SMB/Samba share:
- Create an unprivileged LXC container (e.g., debian 13 template, 8 GB disk, ACLs enabled, 2 cores, 1024 RAM, IPv4 DHCP)
- Modify your .conf file (e.g., nano /etc/pve/nodes/my-server/lxc101.conf) to add your mount points (e.g., mp0: /tank/data,mp=/mnt/data) and reboot the container
- Add the following script I put together (e.g., nano /root/smb_share.sh) in your container with your specific environment variables:
Bash:
#!/bin/bash
# --- Configuration Variables ---
MOUNT_POINT1="/mnt/data1" # e.g., /mnt/Media
MOUNT_POINT2="/mnt/data2" # e.g., /mnt/Backups
SMB_SHARE_NAME1="data1" # e.g., Media
SMB_SHARE_NAME2="data2" # e.g., Backups
SMB_USER="nas_user" # e.g., proxuser
# --- Installation and Setup ---
# 1. Install Samba and CIFS utilities
apt update && apt install -y samba smbclient cifs-utils
# 2. Configure the Samba share
# Append the new share configuration to the smb.conf file
cat <<EOF >> /etc/samba/smb.conf
[${SMB_SHARE_NAME1}]
path = ${MOUNT_POINT1}
read only = no
guest ok = no
browseable = yes
valid users = ${SMB_USER}
[${SMB_SHARE_NAME2}]
path = ${MOUNT_POINT2}
read only = no
guest ok = no
browseable = yes
valid users = ${SMB_USER}
EOF
echo "Samba share configuration added to /etc/samba/smb.conf"
# 3. Create the Samba user and set their password
# The user must already exist as a system user
useradd -M -s /bin/false "${SMB_USER}"
smbpasswd -a "${SMB_USER}"
# 4. Restart the Samba service to apply changes
systemctl restart smbd nmbd
echo "Samba service restarted. The shares are ready."
- Make the script executable (i.e., chmod -x /root/smb_share.sh) and run (i.e., sh smb_share.sh).
- Change all permissions in your zfs pools to user 100000 and 777 (e.g., chown -R 100000:100000 /tank/Media/ && chmod -R 777 /tank/Media/)
- Go to the IP of your container which you will find under Network (e.g., \\192.168.10.102).
- Disco.
Last edited: