vscsi Disks on the Loose: Map 'em or Scrap 'em!
AnthonyEnglish 270000RKFN Comments (5) Visits (17680)
We're really spoiled with virtualisation. It's so easy for us to map a LUN or a logical volume and build an LPAR, then load an operating system onto it. This makes it easy for temporary, test systems to be built and never get cleaned up.
Why is that? Simple. It's because
There's nothing so permanent as a temporary solution.
Removing an LPAR that you no longer want to use is easy enough, but somehow those LUNs or logical volumes on the VIO server just never seem to get cleaned up. Which disks are they again?
Or maybe you need to identify new LUNs which you have masked to the VIO server so you can map them to make them available on the VIO client. Time to
Round 'em up, cowboy!
Here, at the usual price to AIX Down Under readers, are three commands which will help you to FIND THAT DISK TO NOWHERE as well as give you an idea of just what size disks (physical or virtual) you're using.
There are three commands:
List DISKS which are not mapped:
You can list LUNs mapped to a VIO server but not associated with a vscsi device. This also will show you any internal disks which haven't been mapped through to a VIO client. Use the VIO server lspv command with the -free flag:
As the command documentation explains, the -free flag
Notice that it shows the size of the disk in meg? Pretty nice.
List LOGICAL VOLUMES which are not mapped:
In the same way, you can list logical volumes which are not mapped through to a vsci adapter for allocating to a VIO client. Can you guess what that command will be?
lslv -freeThat was just a test lv I created. Shouldn't really clutter the VIOS rootvg, should I?
List SIZES of physical volumes
You can see the sizes of your disks on the VIO server using the lspv -size command. I really like this one. In AIX it's not so easy to work out the size of a disk (either physical or a LUN) unless it belongs to a volume group. This command on the VIO server lets you see the sizes of them all,
The sizes of these LUNs are all over the shop. Who woulda known?
Deploy or destroy
Those three little commands can save you a lot of time and help you to trace naughty little (or big) disks which someone has let loose on the system. They're just slacking off, pretending to be working but actually just leaning on their shovel. Once you know they exist, you're half way there to fixing them. You could map them to a vscsi adapter using the mkvdev command, or you could get rid of them, first on the VIO server and then - for LUNs - on the SAN.
In other words,
Map 'em or scrap 'em!