This is a question about Linux storage device names on RHEL5 and RHEL6
Most storage devices are accessible using device names /dev/sda, /dev/sdb, etc. By storage device I mean a device that could be partitioned, formatted and mounted as regular filesystem.
However, HP servers use /dev/cciss/c0d0, /dev/cciss/c0d1, etc. as the device name, probably due to historical reasons.
This means that commands or scripts need a special case to handle /dev/cciss/cxdx as opposed to /dev/sdx
I understand that the cciss module has been replaced by the hpsa module in RHEL6 which removes this inconsistency.
However, this is a more general question - are there any other non-standard storage device names that could trip up a command or script that is only looking for /dev/sdx?
What you call a "storage device" is more generally referred to as a "block device". If you're writing scripts that interact with block devices, it seems like your best bet is to enumerate things in
/sys/class/block
and work from there, or use the various entries in/dev/disk
(in fact, it looks like the latter may be a better choice under RHEL5). This way you're asking the system for a list of available block devices, rather than having to maintain some table of device names in your code.Off the top of my head, other block devices you might encounter include:
virtio
block devices (/dev/vda
, etc)/dev/loop0
)/dev/mapper/...
and/dev/dm-0
)/dev/xvda
)/dev/rbd/...
)Not all block devices can be partitioned, but they can all hold a filesystem.