Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 960 Bytes

File metadata and controls

46 lines (34 loc) · 960 Bytes

Introduction

The purpose of this documentation is to attached new harddrive to raspberry-pi and mount it to ubuntu-server, so that it is available to for AWX jobs to backup mysql databases files.

Mount new harddrive

Please attach new harddrive to raspberry-pi and use following commands to mount new harddrive to ubuntu-server.

Create new partition:

sudo lsblk
sudo fdisk /dev/sda 
m
d # If hard drive used before, else skip
n
w

Create/format file system:

sudo mkfs.ext4 /dev/sda1

Create mount point /mnt/backup:

cd /mnt 
sudo mkdir backup
sudo mount /dev/sda1 /mnt/backup
sudo chown $USER:$USER backup -R

Create partition mount at boot

Get UUID for sda1 (newly attached harddrive)

ls -l /dev/disk/by-uuid

Add following line with UUID to /etc/fstab file.

UUID=XXXXXXX-XXXXXXX-XXX-XXX-XXXXXXX  /mnt/backup      ext4    defaults        0

Restart the raspberry-pi