[Cialug] Force Disk to /dev/sda, /dev/sdb, Etc?

Todd Walton tdwalton at gmail.com
Thu Apr 21 07:46:19 CDT 2016


On Wed, Apr 20, 2016 at 5:49 PM, Zachary Kotlarek <zach at kotlarek.com> wrote:

> If there’s something you can use to reliably distinguish the disks that’s
> available before mounting (you suggest SCSI ID; UUID or other data might
> also work) udev is happy to call the device files whatever you want or to
> make symlinks if you want to keep the native names. It won’t change what
> the kernel or BIOS call things internally but it will work for everything
> that is looking for files in /dev/*. Also note that udev config is local to
> the OS, not the physical disk, so it’s not the right plan if you need to
> move the disk between systems.
>
> Alternatively, most filesystems allow you to include a short label in the
> filesystem header, and tools with filesystem-level support can read those
> labels and use them in place of device names. These labels are stored in
> the filesystem so they’ll travel with the disk, but they require the
> related tool(s) to understand the specific filesystem; things like `mount`
> and `fsck` can use them but things like `pvcreate` and `mdadm` cannot. See
> `e2label` or `xfs_admin` or whatever the equivalent tool is for your
> filesystem to add/change a label on a filesystem.
>

Thanks all. I kinda figured "no" was the answer. I'll probably use labels.

--
Todd


More information about the Cialug mailing list