ReadyNAS Ultra4 Plusに触ってみた その5
ReadyNAS Ultra4 PlusにSSHでログインしてX-RAID2について調べてみたり。
X-RAID2について
ReadyNASで利用されているX-RAID2の正体が気になったので調べてみた。ハードウェアトラブル時に情報が無いと大変かもしれないんで…
とりあえずmountを見てみる
# mount /dev/md0 on / type ext3 (rw,noatime,nodiratime) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw) tmpfs on /ramfs type ramfs (rw) tmpfs on /USB type tmpfs (rw,size=16k) usbfs on /proc/bus/usb type usbfs (rw) /dev/c/c on /c type ext4 (rw,noatime,nodiratime,acl,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv1) nfsd on /proc/fs/nfsd type nfsd (rw) configfs on /sys/kernel/config type configfs (rw)
どうも/dev/md0が/、/dev/c/cが/cとして利用されている模様。
続いてfdiskしてみると、
# fdisk -l Found valid GPT with protective MBR; using GPT Disk /dev/sda: 3907029168 sectors, 1863G Logical sector size: 512 Disk identifier (GUID): 95ba255a-1f36-4ad9-99c0-297f0f4b588f Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3907029134 Number Start (sector) End (sector) Size Code Name 1 64 8388671 4096M 0700 2 8388672 9437247 512M 0700 3 9437248 3907025072 1858G 0700 Found valid GPT with protective MBR; using GPT Disk /dev/sdb: 3907029168 sectors, 1863G Logical sector size: 512 Disk identifier (GUID): 79ff5f4f-7936-42d2-b091-1f626d511d37 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3907029134 Number Start (sector) End (sector) Size Code Name 1 64 8388671 4096M 0700 2 8388672 9437247 512M 0700 3 9437248 3907025072 1858G 0700 Found valid GPT with protective MBR; using GPT Disk /dev/sdc: 3907029168 sectors, 1863G Logical sector size: 512 Disk identifier (GUID): ef66ffd1-60bc-42dc-8fe2-6a5b38e08ca3 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3907029134 Number Start (sector) End (sector) Size Code Name 1 64 8388671 4096M 0700 2 8388672 9437247 512M 0700 3 9437248 3907025072 1858G 0700 Found valid GPT with protective MBR; using GPT Disk /dev/sdd: 3907029168 sectors, 1863G Logical sector size: 512 Disk identifier (GUID): 456a7d36-567c-4a88-85aa-2e668bf0a9af Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3907029134 Number Start (sector) End (sector) Size Code Name 1 64 8388671 4096M 0700 2 8388672 9437247 512M 0700 3 9437248 3907025072 1858G 0700 Disk /dev/md0: 4293 MB, 4293906432 bytes 2 heads, 4 sectors/track, 1048317 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md0 doesn't contain a valid partition table fdisk: device has more than 2^32 sectors, can't use all of them Disk /dev/dm-0: 2199.0 GB, 2199023255040 bytes 255 heads, 63 sectors/track, 267349 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-0 doesn't contain a valid partition table
また、/proc/mdstatを見てみる
# cat /proc/mdstat Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] md2 : active raid5 sda3[0] sdd3[3] sdc3[2] sdb3[1] 5846378112 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/4] [UUUU] md1 : active raid6 sda2[0] sdd2[3] sdc2[2] sdb2[1] 1048448 blocks super 1.2 level 6, 64k chunk, algorithm 2 [4/4] [UUUU] md0 : active raid1 sda1[0] sdd1[3] sdc1[2] sdb1[1] 4193268 blocks super 1.2 [4/4] [UUUU] unused devices: <none>
どうやらsda~sddまでの4台のHDDはそれぞれ3つのパーティションに区切られて、sdX1が4GB、sdX2が512MB、sdX3が残りの1858GBとなっている。
そのsdX1を合わせてRAID 1のmd0、sdX2を合わせてRAID 6のmd1、sdX3を合わせてRAID5のmd2が作成されているのが分かる。
md0はext3でフォーマットされ、/としてマウントされているが、他のmd1、md2はどうなっているのだろうか?
md1はスワップ領域になっているような気がするので、確認してみる。
# cat /proc/swaps Filename Type Size Used Priority /dev/md1 partition 1048444 16548 -1
予想通りmd1はスワップ領域になっていた。残るmd2はどうなっているのだろう、おそらく/c以下としてマウントされている/dev/c/cだろう。
LVMだろうと予測して調べてみる
# lvdisplay /dev/c --- Logical volume --- LV Name /dev/c/c VG Name c LV UUID TgQaKH-ZY82-1GEz-omL9-ECmt-zKWs-JtLNFu LV Write Access read/write LV Status available # open 1 LV Size 5.44 TB Current LE 89048 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:0
# vgdisplay --- Volume group --- VG Name c System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 12 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 1 Act PV 1 VG Size 5.44 TB PE Size 64.00 MB Total PE 89208 Alloc PE / Size 89048 / 5.44 TB Free PE / Size 160 / 10.00 GB VG UUID yuglsp-SpfU-1Lo5-MZXv-2Tmm-dhwV-l7A5Qc
# pvdisplay -C PV VG Fmt Attr PSize PFree /dev/md2 c lvm2 a- 5.44T 10.00G
結果、md2はLVMで論理ボリューム/dev/cとして抽象化されているのが分かる。
今回は2TBのHDDを最初から取り付けていたため、LVMを利用している意味が感じられないが、HDDを徐々に増やしたりする場合にはこの方法だとデータを保持したまま容量を増やしてくのに便利なのだろう。
次にReadyNASを扱う機会があれば確認してみたい。
あとはNFSでのベンチマークとUPSの扱いについて。
あとSNMP。