I know, I know there are here a lot of posts about this issue but I still can not do this apparently easy task!
The majority of those posts say that I need to edit the container conf file with the a line similar with:
The container starts without any problem but when I go to the mounted folder, it is empty!
Here is the all process (including the creation of the partition, and the mounting points):
Any help please?
Thanks
The majority of those posts say that I need to edit the container conf file with the a line similar with:
Code:
mp0: /dev/sdb1,mp=/mnt/ext,backup=0
The container starts without any problem but when I go to the mounted folder, it is empty!
Here is the all process (including the creation of the partition, and the mounting points):
Code:
@CT126:
# create folder to mount the external partition
mkdir -p /mnt/ext
# shutdown the container
poweroff
@PVE host:
# initialise HDD using GPT
parted /dev/sdb mklabel gpt
# create a partition using 10% of its space
parted -a opt /dev/sdb mkpart primary ext4 0% 10%
# create ext4 file system on it
mkfs.ext4 -L data /dev/sdb1
# create folder to mount that partition
mkdir -p /mnt/data
# update fstab with that mount
echo "LABEL=data /mnt/data ext4 defaults 0 2" >> /etc/fstab
# and do it
mount -a
# create a test file in that mount
touch /mnt/data/file.txt
# check if the file exists
ls /mnt/data
# YES it does!
# update the container conf file with that mount point
echo "mp0: /dev/sdb1,mp=/mnt/ext,backup=0" >> /etc/pve/lxc/126.conf
# start the container
lxc-start -n 126 --logfile /dev/stdout
@CT126:
# check if the test file exists
ls /mnt/ext
# NO it does not!!! :(
Any help please?
Thanks
Last edited: