Fedora 41, KDE Plasma
$ uname -a
Linux mandolin 6.12.8-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 2 19:26:03 UTC 2025 x86_64 GNU/Linux
$
I have 2 external Western Digital Elements USB hard drives that I want to use to back up my main system using rsync
. I’m having difficulty figuring out how to configure the system to accomplish the following:
Ideally, mount
and unmount
the file systems from Dolphin file manager.
Mount at boot or from the bash command line (with appropriate entries in /etc/fstab
), and unmount from the bash command line.
Eventually, I also want to be able to support multiple system users so that each user can run rsync
to back up his or her home directory tree in a private space on the external hard drive file system dedicated for back ups. But for right now I will settle for getting the above two objectives to work.
Here is some information on my current configuration.
$ lsblk -b -i -o name,fstype,fsver,label,ptuuid,partlabel
NAME FSTYPE FSVER LABEL PTUUID PARTLABEL
sda 0cf24aeb-39e0-431d-b2dd-a71161dbecaa
|-sda1 ext4 1.0 disk2s1 0cf24aeb-39e0-431d-b2dd-a71161dbecaa disk2s1
|-sda2 ext4 1.0 disk2s2 0cf24aeb-39e0-431d-b2dd-a71161dbecaa disk2s2
|-sda3 ext4 1.0 disk2s3 0cf24aeb-39e0-431d-b2dd-a71161dbecaa disk2s3
`-sda4 ext4 1.0 0cf24aeb-39e0-431d-b2dd-a71161dbecaa disk2s4
sdb d0de6796-7bcd-4aca-81f4-1b7f4376d256
|-sdb1 ext4 1.0 disk1s1 d0de6796-7bcd-4aca-81f4-1b7f4376d256 disk1s1
|-sdb2 ext4 1.0 disk1s2 d0de6796-7bcd-4aca-81f4-1b7f4376d256 disk1s2
|-sdb3 ext4 1.0 disk1s3 d0de6796-7bcd-4aca-81f4-1b7f4376d256 disk1s3
`-sdb4 ext4 1.0 d0de6796-7bcd-4aca-81f4-1b7f4376d256 disk1s4
zram0
nvme0n1 7c28784d-bafd-44d6-bdf5-884cc65c35b3
|-nvme0n1p1 vfat FAT32 7c28784d-bafd-44d6-bdf5-884cc65c35b3 EFI System Partition
|-nvme0n1p2 ext4 1.0 7c28784d-bafd-44d6-bdf5-884cc65c35b3
`-nvme0n1p3 btrfs fedora 7c28784d-bafd-44d6-bdf5-884cc65c35b3
$
When I click the partition shown in the left pane of Dolphin, it mounts the file system under /run/media/rhimbo:
Before mounting:
$ cd /run/media
$ pwd
/run/media
$ ls -al
total 0
drwxr-xr-x. 3 root root 60 Jan 12 13:32 .
drwxr-xr-x. 54 root root 1420 Jan 12 09:19 ..
drwxr-x---+ 2 root root 40 Jan 12 09:40 rhimbo
$
After mounting disk2s1:
$ cd rhimbo/
$ ls -al
total 4
drwxr-x---+ 3 root root 60 Jan 12 14:07 .
drwxr-xr-x. 3 root root 60 Jan 12 13:32 ..
drwxr-xr-x. 4 rhimbo rhimbo 4096 Jan 3 13:16 disk2s1
$
I can then successfully run rsync, and the back up of my home directory tree is under disk2s1 :
$ ls -al disk2s1/
total 24
drwxr-xr-x. 4 rhimbo rhimbo 4096 Jan 3 13:16 .
drwxr-x---+ 3 root root 60 Jan 12 14:07 ..
drwxr-xr-x. 3 rhimbo rhimbo 4096 Nov 22 12:55 home
drwx------. 2 root root 16384 Dec 21 11:04 lost+found
$
I presume that another user logged in would have the same success. His or her back up would be under /run/media/<username>/disk2s1/
instead of under my tree /run/media/rhimbo/disk2s1/
.
The problem I have is that, if I unmount the external disk file systems via the ‘eject’ icon in Dolphin, I can’t get the system to see the disk again unless I reboot. This is a different issue, and I will post a separate question on the forum for this problem. But it led me to try to add entries to /etc/fstab to mount the external drive file systems. The problem is that I don’t know how to define the entries to support multiple users.
And what directories under /run/media do I need to create manually? And what ownership and permissions should be on those directories that I create manually?