extra” is just an illustration. Before getting further, is your “
/dev/sda1” already formatted and ready to use? Is the partition for
sda1 empty of other content and ready for use? If so, then what do you see from:
lsblk -f /dev/sda
I will recommend that you put all content of “
/usr/local” onto the
sda1 partition. Doing so without destroying anything is not difficult, but I want to make sure of all the steps since I’d like to be able to guarantee being non-destructive to the existing “
sda1 is available without anything on it to worry about, and is already formatted for
ext4, then either of these two should do to copy of content from the old “
# Least preferred method, but easy to remember:
mount /dev/sda1 /mnt
cp -adpR * /mnt
# Examine "/mnt" to see if it has everything
cp does everything well, but
rsync is designed to work with odd issues in filesystems, and usually works better (and lots of command options can be confusing):
mount /dev/sda1 /mnt
# Note "--dry-run"...this lets you test, it won't really run other than show what would be done:
rsync --dry-run -avcrltxAP \
--info=progress2,stats2 --numeric-ids \
--exclude '.gvfs' --exclude 'lost+found' \
# Suppose the above was wrong...you'd get a chance to correct it due to "--dry-run".
# Simply remove "--dry-run" to make the operation actually run.
If you have time I recommend learning
rsync since it also can work over
ssh between different computers and preserve numeric IDs if used with
sudo. For example, you could mount the new storage on a host PC and back up “
/usr/local” from a running Jetson to the host PC instead. Regular
cp can’t do that, and might also fail for special file types.
scp can do more than
rsync is still the real workhorse if you are getting serious about file backup and restore (or just migration from one disk to another).
Once that is done and we have the “
lsblk -f” information I’ll suggest how to mount it. Rather than just mounting this and a simple
fstab entry I’ll put some extra options in it which will allow the system to detect that exact disk and to allow boot to continue if the disk is not present.