Posted Jun 23, 2011 11:42 UTC (Thu) by NRArnot (subscriber, #3033)
Parent article: User-friendly disk names
A related issue. The one thing that most annoys me as a linux sysadmin is that it's hard work to tell what sdc2 might be, when it logs errors, and those errors get centrally logged from umpteen systems that I look after, and then digestified via logwatch or similar.
It might be a disk storing someone's /home that's in trouble.
But usually it's just some USB device (phone, Mp3-player, camera) pretending to be a disk (often rather less than successfully).
Quite often the user plugged it in just to recharge its batteries, and isn't even interested in transferring data. (That raises other issues. Linux may auto-mount it. Does the subsequent un-plug without dismount create any significant risk of data-corruption, ot just annoyingly logged errors? )
Anyway, when logging an error, it woud be a godsend if instead or as well it could tag the message with something like the device model and serial number (as revealed by smartctl -i), or at the very least say that it's attached to USB port x or SATA port n or whatever.
It was actually easier when disks were usually hdx and USB devices sdx!
Posted Jun 23, 2011 12:01 UTC (Thu) by jengelh (subscriber, #33263)
[Link]
>It was actually easier when disks were usually hdx and USB devices sdx!
Udev to the rescue, see /dev/disk/by-path! (Because that is what hdx reflected in a way.)
User-friendly disk names
Posted Jun 23, 2011 23:43 UTC (Thu) by giraffedata (subscriber, #1954)
[Link]
But we're talking about kernel device names, not names of device special files. When the kernel warns about errors on a disk device, it identifies it by kernel device name and udev is irrelevant.
Except with at least some of these proposals, where udev could give the kernel a more meaningful name to use in communicating with the user.
The "sdaq" naming is really just a waste of a namespace. The kernel might as well talk to you in major/minor numbers.
User-friendly disk names
Posted Jun 30, 2011 8:32 UTC (Thu) by zdzichu (subscriber, #17118)
[Link]
I'm sure there is some "udevadm info" invocation which will do the same and even provice more info.
User-friendly disk names
Posted Nov 13, 2011 14:26 UTC (Sun) by Baylink (subscriber, #755)
[Link]
Yeah, but only if you *get* a /dev/sdx name. I'm playing with Open-iSCSI for the first time, on Suse, under Xen, and I can only get it to do that for the first two mounts; after /dev/sdb, I don't get a device anymore. I assume there's some knob I haven't found yet, but the doco on Open-I is kinda thin on the ground...
This planning treads much the same ground as the best writeup I found on the topic:
and indeed, that gent's userspace approach may well belie the arguments of those who say this needs to be kernel-side, all by itself.
User-friendly disk names
Posted Jun 23, 2011 12:30 UTC (Thu) by cladisch (✭ supporter ✭, #50193)
[Link]
> some USB device (phone, Mp3-player, camera)
> Linux may auto-mount it. Does the subsequent un-plug without dismount create any significant risk of data-corruption, ot just annoyingly logged errors?
Data corruption happens only when some cached data was not completely (i.e., partially or not at all) written to the device. As long as the user (or his desktop environment) did not actually try to write anything, everything should be fine.
Furthermore, all these devices use FAT(32), and that FS is so simple that a partially written file usually does not affect the data structures of other files.