You are not logged in.
I have a desktop PC with a flexible disk array, so I need a way to mount partitions without editing fstab.
Which is the best way to achieve it?
Is it dangerous to change permissions to /run/media/$user? What happens if I mount my laptop disk, will it mess up all the permissions/ownership?
I've read this wiki-entries without finding a satisfying answer:
https://wiki.archlinux.org/index.php/Users_and_groups
https://wiki.archlinux.org/index.php/Th … nal_drives
https://wiki.archlinux.org/index.php/Autofs
https://pypi.python.org/pypi/udiskie
https://wiki.archlinux.org/index.php/Fi … ctionality
https://wiki.archlinux.org/index.php/Udisks#Devmon
Offline
I have a desktop PC with a flexible disk array, so I need a way to mount partitions without editing fstab.
Instead of an automount helper you could use UUIDs in fstab . https://wiki.archlinux.org/index.php/Fstab#UUIDs .
Combine the UUIDs with mount options like no-auto,user,x-systemd.automount should allow to mount those drives/partitions r/w without having to change permissions.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
I have a desktop PC with a flexible disk array, so I need a way to mount partitions without editing fstab.
Instead of an automount helper you could use UUIDs in fstab . https://wiki.archlinux.org/index.php/Fstab#UUIDs .
Combine the UUIDs with mount options like no-auto,user,x-systemd.automount should allow to mount those drives/partitions r/w without having to change permissions.
The point is that I don't know what drive I'll put on my PC, so I would like to avoid using fstab. I have 6TB on this machine right now, plus 3 TB of "external" drives and 4 spare SSDs.
Then there are multiple partitions on many drives.
This is just my not-so-static configuration, I still have to partition one of the 2 TB disk:
# fdisk -l
Disk /dev/sda: 465,8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8b59b232
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sda1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sda2 206848 209717247 209510400 99,9G 7 HPFS/NTFS/exFAT
/dev/sda3 209717248 976769023 767051776 365,8G 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0003c5bf
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sdb1 2048 3907026943 3907024896 1,8T 7 HPFS/NTFS/exFAT
Disk /dev/sdc: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0003c29f
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sdc1 2048 3907026943 3907024896 1,8T 7 HPFS/NTFS/exFAT
Disk /dev/sdd: 596,2 GiB, 640135028736 bytes, 1250263728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xddcf6ab9
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sdd1 2048 625131519 625129472 298,1G 83 Linux
/dev/sdd2 625131520 1250263039 625131520 298,1G 83 Linux
Disk /dev/sde: 596,2 GiB, 640135028736 bytes, 1250263728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd8d8c499
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sde1 2048 625131519 625129472 298,1G 7 HPFS/NTFS/exFAT
/dev/sde2 625131520 1250258943 625127424 298,1G 7 HPFS/NTFS/exFAT
Disk /dev/sdf: 298,1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00081cce
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sdf1 209717248 268437503 58720256 28G 83 Linux
/dev/sdf2 * 2048 1050623 1048576 512M 83 Linux
/dev/sdf3 1050624 209717247 208666624 99,5G 83 Linux
/dev/sdf4 268437504 625141759 356704256 170,1G 5 Esteso
/dev/sdf5 268439552 612558847 344119296 164,1G 83 Linux
/dev/sdf6 612560896 625141759 12580864 6G 82 Linux swap / Solaris
Partition table entries are not in disk order.
Offline
Is it dangerous to change permissions to /run/media/$user?
Imo doing that is very dangerous, error prone and tricky. let mount helpers take care of setting that up.
I've looked at several automount systems, and they appear to fall in 2 categories :
A. do some configuration the first time you use a drive, next time it will work.
(autofs, x-systemd.automount, udisks all are in this category ) .
B. no configuration needed, but you'll have to choose what you want to mount every time you use the disk
B1. automated as much as possible :
Filemanagers like thunar, pcmanfm, nautilus, dolphin support this.
If you combine this with a systray applet like the KDE devices systray thingy, it can be very easy to work with.
B2. manually mount as user
pmount is the best (or the only one ?) i know for that purpose.
it's basically a wrapper for mount that includes very good filesystem detection.
You can find it in AUR4.
Edit :
Note that technically pmount doesn't do automounting, as you have to tell it what to mount.
Last edited by Lone_Wolf (2015-06-30 11:33:52)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline