diff options
author | Brian Behlendorf <[email protected]> | 2010-09-15 15:32:27 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-09-17 11:02:19 -0700 |
commit | a5b4d63582005300c4526c7c15b63294e5408534 (patch) | |
tree | c11d0990fd151f03d04d7a57750b6fa51c9b8f6e /scripts/zpool-layout | |
parent | bbf3a3575c0b5795d3e4ddc27523258dc61ffa88 (diff) |
Add [-m map] option to zpool_layout
By default the zpool_layout command would always use the slot
number assigned by Linux when generating the zdev.conf file.
This is a reasonable default there are cases when it makes
sense to remap the slot id assigned by Linux using your own
custom mapping.
This commit adds support to zpool_layout to provide a custom
slot mapping file. The file contains in the first column the
Linux slot it and in the second column the custom slot mapping.
By passing this map file with '-m map' to zpool_config the
mapping will be applied when generating zdev.conf.
Additionally, two sample mapping have been added which reflect
different ways to map the slots in the dragon drawers.
Diffstat (limited to 'scripts/zpool-layout')
-rw-r--r-- | scripts/zpool-layout/Makefile.am | 22 | ||||
-rw-r--r-- | scripts/zpool-layout/dragon.ddn.conf | 67 | ||||
-rw-r--r-- | scripts/zpool-layout/dragon.llnl.conf | 67 |
3 files changed, 156 insertions, 0 deletions
diff --git a/scripts/zpool-layout/Makefile.am b/scripts/zpool-layout/Makefile.am new file mode 100644 index 000000000..3eef2412d --- /dev/null +++ b/scripts/zpool-layout/Makefile.am @@ -0,0 +1,22 @@ +pkglibexecdir = $(libexecdir)/@PACKAGE@/zpool-layout +dist_pkglibexec_SCRIPTS = \ + $(top_srcdir)/scripts/zpool-layout/dragon.ddn.conf \ + $(top_srcdir)/scripts/zpool-layout/dragon.llnl.conf + +all: + @list='$(dist_pkglibexec_SCRIPTS)'; \ + for file in $$list; do \ + link=$$(basename $$file); \ + if [ ! -e $$link ]; then \ + $(LN_S) $$file $$link; \ + fi \ + done + +clean: + @list='$(dist_pkglibexec_SCRIPTS)'; \ + for file in $$list; do \ + link=$$(basename $$file); \ + if [ -L $$link ]; then \ + $(RM) $$link; \ + fi \ + done diff --git a/scripts/zpool-layout/dragon.ddn.conf b/scripts/zpool-layout/dragon.ddn.conf new file mode 100644 index 000000000..c797b4dba --- /dev/null +++ b/scripts/zpool-layout/dragon.ddn.conf @@ -0,0 +1,67 @@ +# +# Custom DDN slot mapping for zpool_layout command and +# StorageScaler 6000 enclosures (Dragon Drawer). +# +# Linux DDN +# Slot Slot +# +1 1 +2 13 +3 25 +4 37 +5 49 +6 2 +7 14 +8 26 +9 38 +10 50 +11 3 +12 15 +13 27 +14 39 +15 51 +16 4 +17 16 +18 28 +19 40 +20 52 +21 5 +22 17 +23 29 +24 41 +25 53 +26 6 +27 18 +28 30 +29 42 +30 54 +31 7 +32 19 +33 31 +34 43 +35 55 +36 8 +37 20 +38 32 +39 44 +40 56 +41 9 +42 21 +43 33 +44 45 +45 57 +46 10 +47 22 +48 34 +49 46 +50 58 +51 11 +52 23 +53 35 +54 47 +55 59 +56 12 +57 24 +58 36 +59 48 +60 60 diff --git a/scripts/zpool-layout/dragon.llnl.conf b/scripts/zpool-layout/dragon.llnl.conf new file mode 100644 index 000000000..0c684c784 --- /dev/null +++ b/scripts/zpool-layout/dragon.llnl.conf @@ -0,0 +1,67 @@ +# +# Custom LLNL slot mapping for zpool_layout command and +# StorageScaler 6000 enclosures (Dragon Drawer). +# +# Linux LLNL +# Slot Slot +# +1 25 +2 19 +3 13 +4 7 +5 1 +6 26 +7 20 +8 14 +9 8 +10 2 +11 27 +12 21 +13 15 +14 9 +15 3 +16 28 +17 22 +18 16 +19 10 +20 4 +21 29 +22 23 +23 17 +24 11 +25 5 +26 30 +27 24 +28 18 +29 12 +30 6 +31 60 +32 54 +33 48 +34 42 +35 36 +36 59 +37 53 +38 47 +39 41 +40 35 +41 58 +42 52 +43 46 +44 40 +45 34 +46 57 +47 51 +48 45 +49 39 +50 33 +51 56 +52 50 +53 44 +54 38 +55 32 +56 55 +57 49 +58 43 +59 37 +60 31 |