Creating a Cache Group : Using the Nytro XD Device Node Under Nytro XD

Using the Nytro XD Device Node Under Nytro XD

*NOTE  This is a Linux-specific chapter. Windows users need not perform any additional steps.

Use the configured Nytro XD device node using the MegaRAID Storage Manager (MSM). For every VD configured in Nytro XD, a new device node is created by Nytro XD. Your applications must make sure that the new device node must be used instead of the original device node for the VD to access the corresponding cached VD in Nytro XD.

Nytro XD creates the device mapper device nodes with the same names as the underlying VD names, but with an additional nytroxd- prefix. This device node is placed under the /dev/mapper directory. This is true for all of the partitions that exist on the VD configured in Nytro XD. Nytro XD creates mapping device nodes under /dev/mapper with the nytroxd- prefix for each of those partitions. When a VD is successfully added to Nytro XD, it automatically runs kpartx/partprobe to create these nodes.

For example: If you issue the following command to configure a VD,

# MegaCli64 XD -AddVd 0x5000c5000f8f8c1f Device "0x5000c5000f8f8c1f" added successfully. Exit Code: 0x00

Corresponding to the VD, /dev/disk/by-id/scsi-0x5000c5000f8f8c1f, Nytro XD creates a node, /dev/mapper/nytroxd-scsi-0x5000c5000f8f8c1f, which represents the cached VD. You can find the new device node path using the MSM XD -VdList command.

# MegaCli64 XD -VdList

Vendor: SEAGATE

Model: ST9146703SS

Device Node: /dev/disk/by-id/scsi-35000c5000f8f8c1f [/dev/sdm]

SCSI ID: 0x5000c5000f8f8c1f

Capacity: 136.732 GB

Device state: Online

Mapped Path: /dev/mapper/nytroxd-scsi-35000c5000f8f8c1f

Exit Code: 0x00

If /etc/fstab contains the following entry:

/dev/disk/by-id/scsi-35000c5000f8f8c1f /data ext4 defaults 1 2

it must be changed into the following entry:

/dev/mapper/nytroxd-scsi-35000c500f8f8c1f /data ext4 defaults 1 2

*  WARNING  When Nytro XD creates a device mapper device node for a VD (for example, /dev/mapper/nytroxd-scsi-35000c5001d70ae43), the same VD is also available for direct access (through /dev/disk/by-id/scsi-35000c5001d70ae43, which usually is a symbolic link to the underlying sd device under /dev, for example, /dev/sdg). Even when a cache device (WarpDrive) is configured under Nytro XD, the device node for that (for example, /dev/sdb) is also available for direct access. Exercise caution and make sure that you do not inadvertently directly access or update these disks outside of the Nytro XD control. Such an access is illegal, and any updates made through the direct access can lead to data corruption on these disks. Be aware that this is a feature/limitation of the Linux device model.