OPERATING SYSTEMSOS Linux

Ubuntu Media Server 18.04 LTS | Adding Storage & making it persistent during boot

In this video we add an external storage and make sure it’s persistent during boot. I hope you enjoy.
Adding Storage
1. Connect your drive
2. sudo fdisk -l to list all devices
3. ls /dev/sd*
4. sudo fdisk -l
5. sudo fdisk /dev/sdb (device that you want to add)
6. m for help when fdisk starts
7.d for erasing partitions
8. g to label the disk with GPT
9. n to create a new partition also accept the defaults by pressing enter
10. p to print the partitions
11. w to write the changes
Creating file system
12. sudo mkfs. ext4 /dev/sdb1 (file format)
13. sudo mkdir /mnt/storage
14. sudo mount /dev/sdb1 /mnt/storage
15. df -h to list disks
16. sudo chmod ugo+rw /mnt/storage
17. touch /mnt/storage/test.txt (test if you can write to the disk)

Mount external disk to be persistent
18. sudo blkd (copy the UUID of your disk)
19. sudo vi /etc/fstab
add new line at the bottom
uuid=(your uuid copied on step 18) /mnt/storage ext4 defaults 0 0
20. sudo umount /mnt/storage
21. sudo mount -a (to remount all disks)
If no errors you have done it right
22. df -h (If no errors you are done)

source

ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *