Search code examples
amazon-ec2zfs

ZFS on AWS /dev/ names when creating a pool


When creating ZFS pools on Linux it is recommended to avoid names like /dev/sdX, /dev/hdX because those mappings are not persistent and tend to change between restarts. So instead we use /dev/by-id or /dev/disk/by-path/

What I observed is that in AWS /dev/by-id is not populated. So what is the best approach for AWS?


Solution

  • We can use /dev/by-path for Zpools in AWS. /dev/by-path is populated by default. As recommended in https://github.com/zfsonlinux/zfs/wiki/faq#selecting-dev-names-when-creating-a-pool using /dev/by-path is one of the recommended approaches along with /dev/by-id