Ask Your Question
1

How to set the path on an automatic external drive mount?

asked 2018-05-25 11:44:56 -0500

GreyGnome gravatar image

I have a new Fedora 28 Workstation machine, and am logged in using the Gnome GUI. I also have a Dell RDX drive that I want to use for backups. In order to do that, I need to have a pathname that I could use when I install a disk.

Right now, the first disk I installed is at /run/media/alexander/62e8f95c-85af-4a25-ab55-954e3e08ef5a . I have no doubt that the last entry in that path will change when I swap out disks; regardless, it's too ugly.

I would like that to look like /run/media/alexander/backup_drive .

How can I do this? I could disable automount, I know, but then I won't be able to mount USB drives automatically. I want the automount to work, I just want to control the names for these disks.

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-05-25 14:33:47 -0500

villykruse gravatar image

You can use gparted to assign a label to the file system on your back-up drive. Make the label backup_drive.

Example

sudo gparted /dev/sdb

Right-click on the partition and select Label File System. type in backup_drive and hit OK. To commit the change click on the green check-mark at the top.

edit flag offensive delete link more

Comments

Excellent, that worked. How about, for extra credit, what is the equivalent action on the command line? I tried to use parted, but its idea of "label" is the partition table (rather than a filesystem label). I used mkfs.xfs, but that demolished my old partition. Which is fine, technically, but I liked that gparted simply labelled my existing partition without changing my data. It seems like a good capability to have, and I'd like it in the terminal.

GreyGnome gravatar imageGreyGnome ( 2018-05-26 07:46:44 -0500 )edit

Never mind, I got it. Gparted is fancy, and calls xfs_admin to do its dirty labelling work on my xfs partition. So I am able to run xfs_admin -L backups /dev/sdc1 on the xfs partition /dev/sdc1, and it relabels it without demolishing it. Thanks for the help.

GreyGnome gravatar imageGreyGnome ( 2018-05-26 08:42:11 -0500 )edit
1

The label is a file-system thing and not related to the partition table. You are after all mounting a file system, and not a disk partition.

For example: for ext4 file systems use tune2fs -L LABEL /dev/???.

For xfs try xfs_admin. (man xfs_admin for details).

gparted just knows these things which makes it convenient.

villykruse gravatar imagevillykruse ( 2018-05-26 08:54:44 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-25 11:42:41 -0500

Seen: 182 times

Last updated: May 25 '18