You are not logged in.

#1 2021-07-19 17:49:59

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,715

[SOLVED] Change External HDD mount points/lables

EDIT:  SOLVED: Hold one - I changed the label with gparted. DUH!

I have an OLD Verbatim 250GB external HDD that I have been using for "years".

It started out as:
/media/disk
then switched to:
/media/sector11/disk with an updated system a while back.

Simple use:

  1. plug it in to a USB port,

  2. Thunar pops up; auto-mounted: /media/sector11/disk/

    • I'd prefer: /media/disk - like it use to be a few years back

    • or see below for rename

  3. run my backup script

  4. unmount and unplug and wait for the next time I do a backup.

So a few months ago I buy a Seagate 1TB External drive and reformatted it as an ext4 drive same as my old Verbatim - both are EXT4.

mount | grep /dev/sd - shows:

/dev/sdb1 on /media/sector11/disk type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2)

/dev/sdb1 on /media/sector11/736bab08-5f68-4e04-b8eb-f7c4e7d3e271 type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2)

The Segate External drive mounts such:

/media/sector11/736bab08-5f68-4e04-b8eb-f7c4e7d3e271/

Been searching high and low to find a way to rename that UUID mount point WITHOUT involving fstab

Using: lsblk I see:

 19 Jul 21 @ 13:55:24 ~
   $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0    28G  0 part /
├─sda2   8:2    0    28G  0 part /home
├─sda3   8:3    0 232.9G  0 part /media/5
├─sda4   8:4    0 232.9G  0 part /media/10
├─sda5   8:5    0 232.9G  0 part /media/11
├─sda6   8:6    0   176G  0 part /media/12
└─sda7   8:7    0   763M  0 part /boot/efi
sdb      8:16   0 232.9G  0 disk 
└─sdb1   8:17   0 232.9G  0 part /media/sector11/disk
 
 19 Jul 21 @ 13:55:39 ~
   $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0    28G  0 part /
├─sda2   8:2    0    28G  0 part /home
├─sda3   8:3    0 232.9G  0 part /media/5
├─sda4   8:4    0 232.9G  0 part /media/10
├─sda5   8:5    0 232.9G  0 part /media/11
├─sda6   8:6    0   176G  0 part /media/12
└─sda7   8:7    0   763M  0 part /boot/efi
sdb      8:16   0 931.5G  0 disk 
└─sdb1   8:17   0 931.5G  0 part /media/sector11/736bab08-5f68-4e04-b8eb-f7c4e7d3e271
 
 19 Jul 21 @ 13:56:49 ~
   $ 

Question 1
I'd really like to change those 'external' drives to:

└─sdb1   8:17   0 232.9G  0 part /media/250GB
└─sdb1   8:17   0 931.5G  0 part /media/1TB

But I's settle for:
└─sdb1   8:17   0 232.9G  0 part /media/sectot11/250GB
└─sdb1   8:17   0 931.5G  0 part /media/sector11/1TB

Keep in mind:
plug them in - they mount, use, unmount, unplug.
NO fstab involved.


Question 2 - how do I stop this:
Also "sometimes" the Seagate cause 2 instances of thunar to open.

1 = /media/sector11/
- with  a folder: /736bab08-5f68-4e04-b8eb-f7c4e7d3e271/

2 = /media/sector11/736bab08-5f68-4e04-b8eb-f7c4e7d3e271/

Any idea why?
What am I missing?

I think I have worn out my welcome at GUGL.
Which isn't all a bad thing in my eyes.

Last edited by Sector11 (2021-07-20 02:54:17)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#2 2021-07-19 19:22:33

twoion
ほやほや
Registered: 2015-08-10
Posts: 3,245

Re: [SOLVED] Change External HDD mount points/lables

I think Debian is using a semi-custom configuratio of udisks2 again.

Does https://wiki.archlinux.org/title/udisks … _(udisks2) work to move the mountpoints to /media?

Regarding the label, what directory does udisks2 create if you set a file system label using tune2fs -L THELABEL /dev/sdx? If it works out already OK with the FS labels set you're golden, otherwise, I think https://bbs.archlinux.org/viewtopic.php?id=259493 contains all the pointers (either config file, or custom udev rule involving using the LABEL variable to set the path. But let's see first if the simple things work.


Nassdachs

Offline

#3 2021-07-20 01:36:30

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,156
Website

Re: [SOLVED] Change External HDD mount points/lables

twoion wrote:

But let's see first if the simple things work.

I find if I set a label on a removable device then Thunar+thunar-volman+udisks+friends predictably mount it on /media/john/<LABEL>


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#4 2021-07-20 02:44:44

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,715

Re: [SOLVED] Change External HDD mount points/lables

 19 Jul 21 @ 23:40:10 ~
   $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0    28G  0 part /
├─sda2   8:2    0    28G  0 part /home
├─sda3   8:3    0 232.9G  0 part /media/5
├─sda4   8:4    0 232.9G  0 part /media/10
├─sda5   8:5    0 232.9G  0 part /media/11
├─sda6   8:6    0   176G  0 part /media/12
└─sda7   8:7    0   763M  0 part /boot/efi
sdb      8:16   0 931.5G  0 disk 
└─sdb1   8:17   0 931.5G  0 part /media/sector11/736bab08-5f68-4e04-b8eb-f7c4e7d3e271
 
 19 Jul 21 @ 23:40:22 ~
   $ sho tune2fs
alias = aptitude show filename
E: Unable to locate package tune2fs
 
 19 Jul 21 @ 23:40:53 ~
   $ ser tune2fs
alias ser = aptitude search
                                        
 19 Jul 21 @ 23:40:59 ~
   $ tune2fs -L 1TB /dev/sdb
tune2fs 1.44.5 (15-Dec-2018)
tune2fs: Permission denied while trying to open /dev/sdb
Couldn't find valid filesystem superblock.
 
 19 Jul 21 @ 23:41:56 ~
   $ sudo tune2fs -L 1TB /dev/sdb
[sudo] password for sector11: 
tune2fs 1.44.5 (15-Dec-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb
Found a dos partition table in /dev/sdb
 
 19 Jul 21 @ 23:42:47 ~
   $ 

Well it look like there is a hidden partition on that sucker!

@ john

I find if I set a label on a removable device

How do you set the lable?

EDIT:  Hold one - I changed the label with gparted. DUH!

Last edited by Sector11 (2021-07-20 02:51:17)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#5 2021-07-20 02:52:46

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,715

Re: [SOLVED] Change External HDD mount points/lables

/media/sector11/1TB/

That did it!

Sorry to bother you guys.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

Board footer

Powered by FluxBB