Formatting code for StorageSAN


show source only

{{parent page="HomePage"}}

**Sub-topics**
~ [[Storage3Par 3Par]]
~ [[StorageSVC SVC]]

-----

=== HPUX and HP SAN VA7410===
==Adding a LUN on VA7410==
%%(bash)
armcfg -L 101 -a 5G -g 1 va7410_1
armsecure -r -f current.cfg -p AUTORAID va7410_1
edit current.cfg
armsecure -w -c -f current.cfg -p AUTORAID va7410_1
%%

==Assigning a LUN to a host==
On the host computer, issue the following command to show the device path
%%(bash)
armtopology lrtdi031 | grep 101

lrtdi031 50060b000021dabd 50060b000021dabc A6218A 00SG325J0030 1 1 101 lrtdi031 /dev/dsk/c33t12d5
lrtdi031 50060b000021dabd 50060b000021dabc A6218A 00SG325J0030 1 1 101 lrtdi031 /dev/dsk/c45t12d5
lrtdi031 50060b000021dabd 50060b000021dabc A6218A 00SG325J0030 1 1 101 lrtdi031 /dev/dsk/c37t12d5
lrtdi031 50060b000021dabd 50060b000021dabc A6218A 00SG325J0030 1 1 101 lrtdi031 /dev/dsk/c41t12d5
%%

Note: If the newly added LUN is not visible, try restart the SAN Manager with the following commands:
%%(bash)
/opt/sanmgr/commandview/client/sbin/HA_Dial_Stop
/opt/sanmgr/commandview/client/sbin/HA_Dial_Start
%%

==Mounting the newly added LUN==
Using armtopology mentioned above, you should have obtained the path to the new device. Use the pvcreate command to create a physical volume. Note that you need to use the rdsk path.

%%(bash)
root@lrtdi031 dev> pvcreate /dev/rdsk/c33t12d5
Physical volume "/dev/rdsk/c33t12d5" has been successfully created.
root@lrtdi031 vg_test_101> mknod /dev/vg_test_101/group c 64 0x220000
root@lrtdi031 vg_test_101> vgcreate -s 32 /dev/vg_test_101 /dev/dsk/c33t12d5
Volume group "/dev/vg_test_101" has been successfully created.
Volume Group configuration for /dev/vg_test_101 has been saved in /etc/lvmconf/vg_test_101.conf
%%
The mknod command requires a HEX number to be supplied. Experiment with different ones until one works!

Use vgdisplay to display the volume group information:
%%(bash)
root@lrtdi031 etc> vgdisplay /dev/vg_test_101
--- Volume groups ---
VG Name /dev/vg_test_101
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 32
Total PE 159
Alloc PE 0
Free PE 159
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
%%

Check the number of physical extents available, and use lvcreate to create a logical volume:

%%(bash)
root@lrtdi031 etc> lvcreate -n lv_test_101 -l 159 /dev/vg_test_101
Logical volume "/dev/vg_test_101/lv_test_101" has been successfully created with
character device "/dev/vg_test_101/rlv_test_101".
Logical volume "/dev/vg_test_101/lv_test_101" has been successfully extended.
Volume Group configuration for /dev/vg_test_101 has been saved in /etc/lvmconf/vg_test_101.conf
%%

Format the disk, notice the name supplied to newfs below.
%%(bash)
root@lrtdi031 etc> newfs -F vxfs /dev/vg_test_101/rlv_test_101
version 4 layout
5210112 sectors, 5210112 blocks of size 1024, log size 1024 blocks
unlimited inodes, largefiles not supported
5210112 data blocks, 5207712 free data blocks
159 allocation units of 32768 blocks, 32768 data blocks
%%

Edit /etc/fstab, add the new mount point with default options, for example:
%%
/dev/vg_test_101/lv_test_101 /test_101 vxfs delaylog 0 2
%%

Create a directory and mount it
%%(bash)
root@lrtdi031 etc> mkdir /test_101
root@lrtdi031 etc> mount /test_101
%%

Use bdf to check disk space
%%(bash)
root@lrtdi031 etc> bdf /test_101
Filesystem kbytes used avail %used Mounted on
/dev/vg_test_101/lv_test_101
5210112 2377 4882259 0% /test_101
%%

==Deleting a LUN==
Make sure all data are backed up before deleting a LUN!!
Steps to delete a LUN:
1. Disconnect all active reference to the mounted directory if any
2. Unmount the directoru: umount /test101
3. Remove the Logical Volume
%%
root@lrtdi031 /> lvremove /dev/vg_test_101/lv_test_101
The logical volume "/dev/vg_test_101/lv_test_101" is not empty;
do you really want to delete the logical volume (y/n) : y
%%

4. Remove the Volume Group
%%
root@lrtdi031 /> vgremove /dev/vg_test_101
%%
5. Remove the Physical volume
%%
root@lrtdi031 /> pvremove /dev/rdsk/c33t12d5
%%
6. Use armcfg to delete the LUN: armcfg -L 101 -d va7410_1
7. Or use CommandView to delete the LUN: cmdviewVA va7410_1, LUN management, Delete LUN
Extending a logical volume
Make sure all data are backed up before extending a volume!!

A logical volume can be extended with the lvextend and extendfs commands. The following example will first extend a 64m partition to 128m.

Check existing disk space
%%(bash)
root@lrtdi003 /> df /u09
/u09 (/dev/vg00/lv_64m ): 120800 blocks 16104 i-nodes
%%

Umount the mount point, and use lvextend to extend the logical volume
%%(bash)
root@lrtdi003 /> umount /u09
root@lrtdi003 /> lvextend -L 128m /dev/vg00/lv_64m
Logical volume "/dev/vg00/lv_64m" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
%%

Display the newly extended logical volume.
%%(bash)
root@lrtdi003 /> lvdisplay /dev/vg00/lv_64m
--- Logical volumes ---
LV Name /dev/vg00/lv_64m
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 128
Current LE 4
Allocated PE 4
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
%%

Mount the mount point and check disk space. Note: Before the next step, the OS will not see the extended space.
%%(bash)
root@lrtdi003 /> mount /u09
root@lrtdi003 /> df /u09
/u09 (/dev/vg00/lv_64m ): 120792 blocks 16103 i-nodes
%%

Run extendfs to extend the mount point by 64m, mount the mount point, and check the mount point’s capacity.
%%(bash)
root@lrtdi003 /> umount /u09
root@lrtdi003 /> extendfs -F vxfs -s 64m /dev/vg00/lv_64m
root@lrtdi003 /> mount /u09
root@lrtdi003 /> df /u09
/u09 (/dev/vg00/lv_64m ): 243642 blocks 32483 i-nodes
%%
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki