PHP Linux How To Upload Files Into Block Storage
Sometimes, you may need to use a huge amount of additional storage, and so some providers provide something called object storage, block storage or something along that line.
To store files or upload them into your object or block storage, there are 3 solutions.
1. Change Mount Point
To do this, you basically need to modify your /etc/fstab file.
Example Commands :
-
- modify /etc/fstab file : vi /etc/fstab
You may have a line that looks like the one below/dev/sda1 /blockstorage ext4 defaults 00
So you just have to modify the 2nd field which is the mount point/directory
- reload : mount -a
note: you can usefindmnt
to check if your mount point has changed
note: you may need to change the owner and group usingchown
- modify /etc/fstab file : vi /etc/fstab
2. Use symlink
command
ln -s <somewhere in mount point> <somewhere in web directory> ln -s /blockstorage /home/website.com/public_html/some_directory
Be First to Comment