PowerVM - Creating file-backed virtual disk


Creating file-backed virtual disk

$ lspv -> To list the disks
$ echo bootinfo -s hdisk1 |oem_setup_env -> To know the disk size
$ mksp -f mohisp hdisk1 -> To create a new logical volume storage pool
mohisp
0516-1254 mkvg: Changing the PVID in the ODM.
$
After creating lv storage pool, view the output of lspv to verify hdisk1 is in the mohisp volume group
$ lspv
NAME             PVID                                 VG               STATUS
hdisk0           00f78197033419c9                     rootvg           active
hdisk1           00f7819729165173                     mohisp           active
hdisk2           none                                 None
hdisk3           00f781971f83c6a6                     None
hdisk4           00edece71f375577                     None
hdisk5           none                                 None
hdisk6           none                                 None
hdisk7           none                                 None
$

$ lssp  à To verify the mohisp storage pool
Pool              Size(mb)   Free(mb)  Alloc Size(mb)    BDs Type
rootvg               30656      17920              64      0 LVPOOL
mohisp               10168      10168               8      0 LVPOOL
$

Now create the file-backed disk storage pool inside the mohisp storage pool. Name it fbpool and make it 1GB
$ mksp -fb fbpool -sp mohisp -size 1G
fbpool
File system created successfully.
1040148 kilobytes total disk space.
New File System size is 2097152
$

Now create the file-backed disk device in fbpool disk storage pool. Make the file 500MB in size and associate it with the VSCSI server adapter defined on the VIO server. When we run the command to create the disk device, note the new virtual target device name.

$ mkbdsp -sp fbpool 500m -bd fb_disk01 -vadapter vhost0
Creating file "fb_disk01" in storage pool "fbpool".
Assigning file "fb_disk01" as a backing device.
vtscsi1 Available
fb_disk01
$

Now view the lsmap output for vhost0 to verify the configuration. We can see that new virtual target device and it’s associating backing device
$ lsmap -vadapter vhost0
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U8233.E8B.068197R-V4-C4                      0x00000006

VTD                   vtscsi0
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk3
Physloc               U5877.001.9K8D297-P1-C8-T1-W500507680110D43B-L3000000000000
Mirrored              false

VTD                   vtscsi1
Status                Available
LUN                   0x8200000000000000
Backing device        /var/vio/storagepools/fbpool/fb_disk01
Physloc
Mirrored              N/A

$

Also run “lsdev –virtual” output and see the description for the new virtual target device

$ lsdev -virtual
name             status      description
ent2             Available   Virtual I/O Ethernet Adapter (l-lan)
ent3             Available   Virtual I/O Ethernet Adapter (l-lan)
vasi0            Available   Virtual Asynchronous Services Interface (VASI)
vbsd0            Available   Virtual Block Storage Device (VBSD)
vfchost0         Available   Virtual FC Server Adapter
vhost0           Available   Virtual SCSI Server Adapter
vsa0             Available   LPAR Virtual Serial Adapter
name             status      description
vtscsi0          Available   Virtual Target Device - Disk
vtscsi1          Available   Virtual Target Device - File-backed Disk
name             status      description
ent4             Available   Shared Ethernet Adapter
$

No comments:

Post a Comment