Background
I was doing some work that needed a backup on a server. I chose to install an Ubuntu Server to store all the backups.
Initially, I thought it didn't need to be a-lot of space. How wrong I was. As you can imagine, the backup size kept growing and growing and it was not yet a week before I had to add an additional disk to my Ubuntu installation.
I added another disk and then started the other issue of mounting it logically and making sure that it all booted up correctly. Whilst researching on adding this new disk to my Ubuntu installation, I came across this excellent article detailing what I needed.
Below are my summarized steps for my future reference.
Identify the drive
sudo fdisk -l
Select and format the drive
sudo fdisk /dev/sdb
n for new partition. p for primary partition and 1 for the first partition. Choose the default sectors for the first and last sectors
Create a file system on the partition
sudo mkfs -t ext4 /dev/sdb1
Mount the new drive
sudo mount /dev/sdb1 /mntcd /mntls -ahlsudo rm -rf lost+found
Copy your home folder
sudo cp -rp /home/* /mntAdd new mount locationsudo umount /dev/sdb1
Test your new home directory
df /dev/sdb1
Edit fstab
sudo nano /etc/fstab
Add this line to boot the /home directory
/dev/sdb1 /home ext4 defaults 0 0
Comments
Post a Comment