4 ms·
I'm sure there's a reason mounting by ID isn't the default but that's always been a weird one for me and I make sure to swap it over when building a storage ser
by robotmay 6y ago
I'm sure there's a reason mounting by ID isn't the default but that's always been a weird one for me and I make sure to swap it over when building a storage server.
- MayeulC 6y agoIt's usually the default in /etc/fstab for most distributions. It's often simpler to just mount /dev/sda if you just connected it and need to do a one-off. But if you want something reliable, for automount for instance, I don't see why anyone would use something else than UUIDs. I even put those on stickers on my external hard drives. Another tip I like is using noauto,x-systemd.automount to mount on-demand, and unmount after a set inactivity timer: https://www.freedesktop.org/software/systemd/man/systemd.mount.html#x-systemd.automount https://www.freedesktop.org/software/systemd/man/systemd.mou...
- m463 6y ago/dev/disk/by-id is different than /dev/disk/by-uuid for example, you dd a disk and by-uuid is ambiguous. meanwhile by-id still finds the original disk
- tremon 6y agoI don't see why anyone would use something else than UUIDs Some partitions don't have UUIDs, such as LUKS volumes with a detached header or plain dm-crypt volumes. In that case, I use a /by-id/wwn-* path to uniquely identify the partition. Of course, those lines are in /etc/crypttab, not in /etc/fstab.
- MayeulC 6y agoOK, I re-read the thread, and noticed where the confusion comes from. https://wiki.archlinux.org/index.php/Persistent_block_device_naming https://wiki.archlinux.org/index.php/Persistent_block_device... I am talking about UUIDs, that basically any (Linux at least) filesystem has. Those are a bit like filesystem labels, but generated during filesystem creation. Their format makes collisions virtually impossible. LUKS volumes have one, and partitions inside them have a different one too. This is my prefered way of identifying partitions, as they are persistent even when you move them around with lvm, dd, or others. I think that's also the default in many distributions. PARTUUID is also a nice way to identify partitions when you can't rely on a partition UUID for some reason. It works like UUIDs, but instead of being stored inside the partition, that information is part of the GPT (GUID partition table). If you are more interested in the drives than the partition content, by-id makes sense, though I think the use-case is rather narrow :)
- m463 6y agowith /dev/disk/by-id you get a unique name for the physical hardware. like /dev/disk/by-id/ata-Samsund_SSD_blah...<serialno> uuid is different but you can access it with /dev/disk/by-uuid
- blooalien 6y ago"I even put those {UUIDs} on stickers on my external hard drives." That's pure genius. Gonna steal that idea outright. LOL - I'ma go even one step further in my own personal setup, and encode it into a QR code sticker so I can just snap it right into my clipboard from KDE Connect on mah phone when I need to. ;)
- MayeulC 6y agoTBH, I just handwrote those. Just like with git, the collisions are highly unlikely, and most of the time the first few letters are all that's needed before you can tab-complete. QR codes aren't a bad idea, but clipboard sync doesn't work quite well on wlroots-based compositors in my experience :) Just make sure to put a bit of ASCII below your QR code.