Hard Drives Being Renamed

Home » CentOS » Hard Drives Being Renamed
CentOS 6 Comments

Hi,

We are running CentOS 6.7 – 2.6.32-573.22.1.el6.x86_64 on a Quanta Cirrascale, up to date with patches. We have had a couple of instances in which the hard drives have become renamed after reboot (e.g. drive sda is renamed to sdc after reboot). One time this occurred when we rebooted following the installation of a 10GB NIC card, another time after we tried to install mellanox drivers
(MLNX_OFED_LINUX-3.2-2.0.0.0-rhel6.7-x86_64). Currently we are unable to boot because that drive has been renamed.

Our questions are

* Has anyone else experienced similar issues?
* What can we do to prevent such renaming in the future

6 thoughts on - Hard Drives Being Renamed

  • Pat Haley wrote:
    In the past. To resolve you could use (*UGH*) the no-possible-way-to-remember UUID, or you could label the filesystems, and refer to them that way. I strongly prefer the latter.

  • I’ve run into this with ZFS on Linux. The ‘blkid’ is useful to identify the target device and then add that to your fstab. I don’t use device names at all anymore, too ambiguous (depending on the circumstance) in my opinion.

  • —– Original Message —–
    From: “John R Pierce” To: CentOS@CentOS.org Sent: Tuesday, May 24, 2016 5:04:24 PM
    Subject: Re: [CentOS] Hard drives being renamed

    don’t use device names in your fstab, use labels, or use LVM, or whatever.


    john r pierce, recycling bits in santa cruz

    Use blkid to get the UUIDs then use UUID=”…” in fstab.  Be aware that nothing is failsafe, changing filesystems on a partition will change the UUID and “dd ing” a partition to another drive but leaving it in the system without manually changing the UUID of one of the partitions will result in duplicate UUIDs and corresponding confusion – “been there, done that”.

  • Yes. You can’t, it’s non-deterministic. Use fs volume UUID instead, both in grub.cfg command line for root= parameter and fstab.

    Chris Murphy

  • Right. And there are other ways to identify disks unequivocally. Under CentOS, for example, I find the following directories:

    /dev/disk/by-id
    /dev/disk/by-path
    /dev/disk/by-uuid

    Each one has its optimal use case.

    It seems to me that in general the ideal would  be to use the WWN identifier, which now comes printed on the disk label sticker and uniquely identifies the disk, offering a clear correspondence between physical and logical disks. Under CentOS, the WWN ID of detected disks can be found under /dev/disk/by-id. WWN stands for “World Wide Name”. There’s a Wikipedia article about it here:

    https://en.wikipedia.org/wiki/World_Wide_Name

    “hdparm – I” or even “smartctl  -a” will show which /dev/sdX or whatever corresponds to which WWN or other relatively stable ID types. The advantage of WWN is that the ID won’t change if you connect the disk to a different controller, for example from a SAS one to a SATA one. In one of my servers, if I unplug a SATA disk from a LSI-Avago SAS controller and I connect it to a Intel onboard SATA controller the ID changes from “scsi-idnumber” to “ata-brand-model-serialnumber” but the WWN remains constant.