Configurando LUN de 4TB No Centos 6.4
-
Upload
fvieira2013 -
Category
Documents
-
view
24 -
download
2
Transcript of Configurando LUN de 4TB No Centos 6.4
Configurando LUN de 4TB no Centos 6.4
Olá, venho através deste descrever como configurar uma LUN (Partição) Storage.Não abordarei a criação da LUN no storage propriamente dito e nem a ligação física dostorage ao servidor, pois julgo que a mesma já foi criada, iremos apenas abordar ainclusão da mesma no SO do servidor.
Primeiramente verificaremos se o pacote multipath esta instalado pois é ele quemgerencia a ligação do storage com o servidor.
# multipath --help
"Retorno do comando acima"
Unknown switch: (null)multipath-tools v0.4.9 (04/04, 2009)Usage:multipath [-c] [-d] [-r] [-v lvl] [-p pol] [-b fil] [-q] [dev]multipath -l|-ll|-f [-v lvl] [-b fil] [dev]multipath -F [-v lvl]multipath -h
Where:-h print this usage text-l show multipath topology (sysfs and DM info)-ll show multipath topology (maximum info)-f flush a multipath device map-F flush all multipath device maps-c check if a device should be a path in a multipath device-q allow queue_if_no_path when multipathd is not running-d dry run, do not create or update devmaps-r force devmap reload-p policy failover|multibus|group_by_serial|group_by_prio-b fil bindings file location-p pol force all maps to specified path grouping policy :. failover one path per priority group. multibus all paths in one priority group. group_by_serial one priority group per serial. group_by_prio one priority group per priority lvl. group_by_node_name one priority group per target node-v lvl verbosity level. 0 no output
. 1 print created devmap names only
. 2 default verbosity
. 3 print debug informationdev action limited to:. multipath named 'dev' (ex: mpath0) or. multipath whose wwid is 'dev' (ex: 60051..). multipath including the path named 'dev' (ex: /dev/sda). multipath including the path with maj:min 'dev' (ex: 8:0)
Já com o multipath instalado limparemos o cache com o comando:
# multipath -F
Agora verificaremos se nossa LUN, foi reconhecida com o comando:
# multipath -ll
"Retorno do comando acima"
mpathe (36005076802808232a800000000000005) dm-10 IBM,2145size=5.0T features='1 queue_if_no_path' hwhandler='0' wp=rw|-+- policy='round-robin 0' prio=50 status=active| ̀- 3:0:0:2 sdf 8:80 active ready running-̀+- policy='round-robin 0' prio=10 status=enabled-̀ 4:0:0:2 sdk 8:160 active ready running
No meu caso foi identificada uma LUN de 5.0TB, juntamente com a indentificação domeu hardware (Storage IBM).Caso ela não seja apresentada deveremos rodar os comandos abaixo:
echo "- - -" > /sys/class/scsi_host/host0/scanecho "- - -" > /sys/class/scsi_host/host1/scanecho "- - -" > /sys/class/scsi_host/host3/scanecho "- - -" > /sys/class/scsi_host/host4/scan
multipath -ll
Agora, com a LUN reconhecida criaremos uma partição com tamanho total da LUN5,0TB com o comando parted
# parted /dev/mapper/mpathe
“Retorno do comando acima”
GNU Parted 2.3Using /dev/sdbWelcome to GNU Parted! Type 'help' to view a list of com mands.(parted)
Agora, criaremos um novo rótulo ou seja, a tabela de partições utilizando GPT, com ocomando abaixo:
(Parted) mklabel gpt
“Retorno do comando acima”
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this diskwill be lost. Do you want to continue?Yes/No? yes
Em seguida, defina a unidade padrão para TB, digite:
(Parted) unit TB
Para criar um tamanho de partição de 5 TB, digite:
(parted) mkpart primary 0.00TB 5.00TB
Para imprimir as partições atuais, digite:
(Parted) print
Sair e salvar as alterações, digite:
(parted) quit
Agora é só criar o sistema de arquivos de sua preferência com o comando mkfs.ext3 oumkfs.ext4.