Setup Multipath
1. Koneksikan kabel SAN ke server (bisa via SAN switch).
2. Alokasikan LUN untuk host yang akan mengakses SAN.
3. Cek block device yang baru yang dideteksi oleh sistem di /dev/sdX. Kadang diperlukan
reboot mesin agar block device tersebut bisa dideteksi. Alternatifnya bisa menggunakan
perintah:
# echo "- - -" > /sys/class/scsi_host/host0/scan; # gantikan 0 dengan nomor
masing-masing channel
failover
}
blacklist {
wwid "*"
}
blacklist_exceptions {
wwid "36001438009b044d90000900000780000" # nomor wwid
}
multipaths {
multipath {
}
}
wwid
"36001438009b044d90000900000780000"
alias
asm1
10. Jika ada syntax errors atau ada parameter yang tidak berlaku di versi Linux terinstal akan
muncul bila perintah ini dijalankan:
# multipath -d
13. Bila ada kesalahan pada konfigurasi: /etc/multipath.conf, edit file tersebut kemudian
jalankan:
# service multipathd reload
# multipath -F
# multipath -d
# multipath -v2
Setup LVM
1. Inisialisasi Physical Volume (PV)
# pvcreate /dev/mapper/[nama_alias_device]
Contoh:
# pvcreate /dev/mapper/netapp01
# lvmdiskscan
/dev/mapper/netapp01
# pvdisplay
/dev/mapper/netapp01
VG Name
PV Size
1,00 TiB
Allocatable
NO
PE Size
Total PE
Free PE
Allocated PE
PV UUID
WkK7g7-PkaP-e5wc-lUDk-n5eF-s4EK-zD2Q9x
...
# pvscan
...
PV /dev/sda3
VG vg_elldrpdb
PV /dev/mapper/netapp01
free]
Contoh:
# vgcreate vg_netapp01 /dev/mapper/netapp01
# vgdisplay vg_netapp01
vg_netapp01
System ID
Format
lvm2
Metadata Areas
Metadata Sequence No
VG Access
read/write
VG Status
resizable
MAX LV
Cur LV
Open LV
Max PV
Cur PV
Act PV
VG Size
1,00 TiB
PE Size
4,00 MiB
Total PE
262148
Alloc PE / Size
0 / 0
Free
PE / Size
VG UUID
tpbs8X-fLHn-xjFn-5Qj6-KOQg-8cKW-e43O6s
# vgscan
Reading all physical volumes.
Contoh:
# lvcreate -L 1T -n lv_netapp01_01 vg_netapp01
Logical volume "lv_netapp01_01" created
Untuk mengetahui nilai Total Physical Extents pada Volume Group bisa menggunakan
perintah:
# vgdisplay [nama_vg] | grep Total PE
Kemudian bisa membuat Logical Volume dengan ukuran sesuai nilai Total PE
# lvcreate -l [nilai_total_pe] [nama_vg] -n [nama_lv]
# lvdisplay
/dev/vg_netapp01/lv_netapp01_01
LV Name
lv_netapp01_01
VG Name
vg_netapp01
LV UUID
f8KKaB-4A6D-eqdG-5coE-bh4u-ouZM-HFBuTW
LV Write Access
read/write
available
# open
LV Size
1,00 TiB
Current LE
262144
Segments
Allocation
inherit
auto
- currently set to
256
Block device
252:3
# lvs
LV
VG
Attr
LSize
Convert
lv_root
lv_swap
vg_elldrpdb -wi-ao--
20,00g
1,00t
# lvscan
ACTIVE
ACTIVE
ACTIVE
Contoh:
# mkfs.ext4 /dev/vg_netapp01/lv_netapp01_01
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=16 blocks
67108864 inodes, 268435456 blocks
13421772 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
8192 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.
Contoh:
# mkdir /data02
[nama_dir]
ext4
defaults
1 1
/data02
ext4
defaults
1 1
Contoh:
/dev/vg_netapp01/lv_netapp01_01
# mount [nama_dir]
Contoh:
# mount /data02
# df -h
Filesystem
Size
/dev/mapper/vg_elldrpdb-lv_root
254G
210G
32G
87% /
48G
23G
25G
48% /dev/shm
/dev/sda2
485M
54M
406M
/dev/sda1
200M
256K
200M
tmpfs
12% /boot
1% /boot/efi
/dev/mapper/vg_netapp01-lv_netapp01_01
1008G
200M
957G
1% /data02
Note:
Penjelasan lebih detail bisa dibaca di:
https://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration