Mabuhay

Hello world! This is it. I've always wanted to blog. I don't want no fame but just to let myself heard. No! Just to express myself. So, I don't really care if someone believes in what I'm going to write here nor if ever someone gets interested reading it. My blogs may be a novel-like, a one-liner, it doesn't matter. Still, I'm willing to listen to your views, as long as it justifies mine... Well, enjoy your stay, and I hope you'll learn something new because I just did and sharing it with you.. Welcome!
Showing posts with label LVM. Show all posts
Showing posts with label LVM. Show all posts

Sunday, January 04, 2009

Mirroring a Root Volume or Disk, and /boot

I slept late last night, or may be late this early morning. Does it make sense? Anyway, when I woke up, I prepared my food. Forget it. Alright, here we go.

I was doing my morning ritual - if got no work - checking my mails, visiting PACLAND, NBA, going thru today's headlines including stock market? Freakin' sick, ayt?! Can't help it esp. in times like these and working in a bank!

Whew! I find it funny writing about this. Another problem is, I was worrying more on the title than the content.

Seriously, here it is.

I was reading RHEL 5 Deployment Guide. Actually, I was continuing. I was considering of skipping the LVM part but decided to go for it anyway. And something, which triggered this blog, caught my attention: The /boot/ partition cannot reside on an LVM volume because the GRUB boot loader cannot read it.

Interesting point. I admit, I was more of an HP-UX LVM guy. Shame on me for the confusion. I begun to ask a former colleague - Che, kudos - to execute some commands for us to verify if it the same with HP-UX. I was so pissed at myself and at the same time wanted to laugh that I was not sure which command to say. Finally, I got me a `setboot`:

[root@server1032:/root]
# setboot
Primary bootpath : 0/1/1/0.0.0

Alternate bootpath : 0/1/1/0.1.0


Autoboot is ON (enabled)

Autosearch is ON (enabled)


Which at that point, doesn't answer the question nor mean anything [yet]?!. So, I Googled it with key words: HP-UX LVM /boot. See? /boot in HP-UX? Another evidence that I wasn't thinking right - since this is an HP-UX issue, I should have gone to ITRC.

Too, late.

... and there it is [as I end up with ITRC]. How can I forget it? It's included in vg00. In fact, there are commands such as mkboot and -B for pvcreate. And please take note of lvlnboot, there is this line that says: Boot.

On the side note, for a bad boot, mirrored disk replacement case, here's how it is done [PA-RISC and Integrity] - this is available on HP's docs:

---
Mirroring the Root Volume on PA-RISC Servers

To set up a mirrored root configuration, you must add a disk to the root volume group, mirror all the root logical volumes onto it, and make it bootable. For this example, the disk is at path 2/0/7.15.0 and has device special files named /dev/rdsk/c2t15d0 and /dev/dsk/c2t15d0.

1. Use the insf command with the -e option to make sure the device files are in place. For example:

# insf -e -H 2/0/7.15.0

You should now have the following device files for this disk:
/dev/dsk/c2t15d0 The entire disk (block access)
/dev/rdsk/c2t15d0 The entire disk (character access)

2. Create a physical volume using pvcreate with the -B option:

# pvcreate -B /dev/rdsk/c2t15d0

3. Add the physical volume to your existing root volume group using vgextend:

# vgextend /dev/vg00 /dev/dsk/c2t15d0

4. Use the mkboot command to set up the boot area:

# mkboot /dev/rdsk/c2t15d0

5. Use the mkboot command to add an autoboot file to the disk boot area. If you expect to boot from this disk only when you lose quorum, you can use the alternate string “hpux –lq” to disable quorum checking:

# mkboot –a “hpux” /dev/rdsk/c2t15d0

1. Use the lvextend command to mirror each logical volume in vg00 (the root volume group) onto the specified physical volume. The logical volumes must be extended in the same order that they are configured on the original boot disk. Use the pvdisplay command with the -v option to determine the list of logical volumes and their order. For example:

# pvdisplay -v /dev/dsk/c0t6d0 | grep 'current.*0000 $'
00000 current /dev/vg00/lvol1 00000
00038 current /dev/vg00/lvol2 00000
00550 current /dev/vg00/lvol3 00000
00583 current /dev/vg00/lvol4 00000
00608 current /dev/vg00/lvol5 00000
00611 current /dev/vg00/lvol6 00000
00923 current /dev/vg00/lvol7 00000
01252 current /dev/vg00/lvol8 00000


In this example, mirror the logical volumes as follows:
# lvextend –m 1 /dev/vg00/lvol1 /dev/dsk/c2t15d0

# lvextend –m 1 /dev/vg00/lvol2 /dev/dsk/c2t15d0

# lvextend –m 1 /dev/vg00/lvol3 /dev/dsk/c2t15d0

# lvextend –m 1 /dev/vg00/lvol4 /dev/dsk/c2t15d0

# lvextend –m 1 /dev/vg00/lvol5 /dev/dsk/c2t15d0

# lvextend –m 1 /dev/vg00/lvol6 /dev/dsk/c2t15d0

# lvextend –m 1 /dev/vg00/lvol7 /dev/dsk/c2t15d0

# lvextend –m 1 /dev/vg00/lvol8 /dev/dsk/c2t15d0


6. Update the root volume group information:

# lvlnboot -R /dev/vg00

7. Verify that the mirrored disk is displayed as a boot disk and that the boot, root, and swap logical volumes appear to be on both disks:

# lvlnboot –v

8. Specify the mirror disk as the alternate boot path in nonvolatile memory:

# setboot –a 2/0/7.15.0

9. Add a line to /stand/bootconf for the new boot disk using vi or another text editor:

# vi /stand/bootconf
l /dev/dsk/c2t15d0


where l denotes LVM.
---

Mirroring the Root Volume on Integrity Servers

The procedure to mirror the root disk on Integrity servers is similar to the procedure for PA-RISC servers. The difference is that Integrity server boot disks are partitioned; you must set up the partitions, copy utilities to the EFI partition, and use the HP-UX partition device files for LVM commands.

For this example, the disk is at hardware path 0/1/1/0.1.0, with a device special file named /dev/rdsk/c2t1d0.

1. Partition the disk using the idisk command and a partition description file.

a. Create a partition description file. For example:

# vi /tmp/pdf

In this example the partition description file contains:
3
EFI 500MB
HPUX 100%
HPSP 400MB

b. Partition the disk using idisk and the partition description file created in step 1a:

# idisk -f /tmp/pdf -w /dev/rdsk/c2t1d0

To verify that your partitions are correctly laid out, run the following command:

# idisk /dev/rdsk/c2t1d0

2. Use the insf command with the -e option to create the device files for all the partitions. For example:

# insf -e -H 0/1/1/0.1.0

You should now have the following device files for this disk:
/dev/dsk/c2t1d0 The entire disk (block access)
/dev/rdsk/c2t1d0 The entire disk (character access)
/dev/dsk/c2t1d0s1 The EFI partition (block access)
/dev/rdsk/c2t1d0s1 The EFI partition (character access)
/dev/dsk/c2t1d0s2 The HP-UX partition (block access)
/dev/rdsk/c2t1d0s2 The HP-UX partition (character access)
/dev/dsk/c2t1d0s3 The Service partition (block access)
/dev/rdsk/c2t1d0s3 The Service partition (character access)

3. Create a physical volume using pvcreate with the -B option. Be sure to use the device file denoting the HP-UX partition.

# pvcreate -B /dev/rdsk/c2t1d0s2

4. Add the physical volume to your existing root volume group using vgextend:

# vgextend /dev/vg00 /dev/dsk/c2t1d0s2

5. Use the mkboot command to set up the boot area. Specify the -e and -l options to copy EFI utilities to the EFI partition, and use the device special file for the entire disk:

# mkboot –e –l /dev/rdsk/c2t1d0

6. Update the autoboot file in the EFI partition.

a. Create an AUTO file in the current directory. If you expect to boot from this disk only when you have lost quorum, you can use the alternate string “boot vmunix –lq” to disable quorum checking:

# echo “boot vmunix” > ./AUTO

b. Copy the file from the current directory into the new disk EFI partition. Make sure to use the device file with the s1 suffix:

# efi_cp -d /dev/rdsk/c2t1d0s1 ./AUTO /efi/hpux/auto

7. Use the lvextend command to mirror each logical volume in vg00 (the root volume group) onto the specified physical volume. The logical volumes must be extended in the same order that they are configured on the original boot disk. Use the pvdisplay command with the -v option to determine the list of logical volumes and their order. For example:

# pvdisplay -v /dev/dsk/c0t0d0s2 | grep 'current.*0000 $'
00000 current /dev/vg00/lvol1 00000
00010 current /dev/vg00/lvol2 00000
00138 current /dev/vg00/lvol3 00000
00151 current /dev/vg00/lvol4 00000
00158 current /dev/vg00/lvol5 00000
00159 current /dev/vg00/lvol6 00000
00271 current /dev/vg00/lvol7 00000
00408 current /dev/vg00/lvol8 00000


In this example, mirror the logical volumes as follows:
# lvextend –m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0s2

# lvextend –m 1 /dev/vg00/lvol2 /dev/dsk/c2t1d0s2

# lvextend –m 1 /dev/vg00/lvol3 /dev/dsk/c2t1d0s2

# lvextend –m 1 /dev/vg00/lvol4 /dev/dsk/c2t1d0s2

# lvextend –m 1 /dev/vg00/lvol5 /dev/dsk/c2t1d0s2

# lvextend –m 1 /dev/vg00/lvol6 /dev/dsk/c2t1d0s2

# lvextend –m 1 /dev/vg00/lvol7 /dev/dsk/c2t1d0s2

# lvextend –m 1 /dev/vg00/lvol8 /dev/dsk/c2t1d0s2


8. Update the root volume group information:

# lvlnboot -R /dev/vg00

9. Verify that the mirrored disk is displayed as a boot disk and that the boot, root, and swap logical volumes appear to be on both disks:

# lvlnboot –v

10. Specify the mirror disk as the alternate boot path in nonvolatile memory:

# setboot –a 0/1/1/0.1.0

11. Add a line to /stand/bootconf for the new boot disk using vi or another text editor:

# vi /stand/bootconf
l /dev/dsk/c2t1d0s2


where l denotes LVM.
---

My first question has been answered. But, as a former S.A. and UNIX support engineer [for a huge infra], a redundant connection and/or backup is always in the back of our minds. As they say, "He who laughs last, has a backup."

So, the second question is, if /boot is not under the control of LVM, what is a good way to have a redundant connection? I don't have enough experience with this so, I turn to an old friend who has or had. We talked of RAID: software and hardware. For this case, he suggested RAIDS: 1, 5, or 1+0. In case you're server have a RAID controller, it is recommended to go for hardware. This and backup, he said, is enough to get you through.

Basically, 100MB is enough for /boot so, the rest of the disk, in case you decide to use LVM, can be brought under its control. While some others separate / as well for faster recovery process, he continued, for there were cases where the root VG, that contains the default file systems, is not detected. And this is a lengthy process of recovering it. It's a big no-no in critical systems, where downtime is associated with business loss [read: money].

So, I guess, that's it. I'm quite satisfied with the answers, and then some.

Saturday, October 18, 2008

Filesystem extention - fsadm errno2

Hi, This will be my first contribution for my friend's blog site. Well, This is just another urgent file system increase for other team restoration task. Basically what happen was after I extended the VG and about to extend the LV an error occurred indicating "vxfs fsadm: cannot open /oracle/A6C/mirrlogA/lost+found/.fsadm - errno 2".

The issue was resolved by recreating the lost+found then re-executing the fsadm.

[root@dagz:/oracle/A6C/origlogB]
#
lvextend -L 20000 /dev/vg_A6C_00/lv_mirrlogA
Logical volume "/dev/vg_A6C_00/lv_mirrlogA" has been successfully extended.
Volume Group configuration for /dev/vg_A6C_00 has been saved in /etc/lvmconf/vg_A6C_00.conf

[root@dagz:/oracle/A6C/origlogB]
#
fsadm -b 20000m /oracle/A6C/mirrlogA
fsadm: /etc/default/fs is used for determining the file system type
vxfs fsadm: cannot open /oracle/A6C/mirrlogA/lost+found/.fsadm - errno 2

[root@dagz:/oracle/A6C/origlogB]
#
cd /oracle/A6C/mirrlogA

[root@dagz:/oracle/A6C/mirrlogA]
#
mklost+found
creating slots...
removing dummy files...
done
drwxr-xr-x 2 root sys 4096 Oct 15 10:59 /oracle/A6C/mirrlogA/lost+found

[root@dagz:/oracle/A6C/mirrlogA]
#
fsadm -b 20000m /oracle/A6C/mirrlogA
fsadm: /etc/default/fs is used for determining the file system type
fsadm: /dev/vg_A6C_00/rlv_mirrlogA is currently 5120000 sectors - size will be increased

[root@dagz:/oracle/A6C/mirrlogA]
#
bdf /oracle/A6C/mirrlogA
Filesystem kbytes used avail %used Mounted on
/dev/vg_A6C_00/lv_mirrlogA
20480000 4102261 15354200 21% /oracle/A6C/mirrlogA

Wednesday, April 30, 2008

LVM: PVG-strict/distributed allocation

It's a bit "incomplete". My goal is to make an example of creating an FS, a striped that is but, unfortunately, what was assigned to me covers only the PVG-strict/distributed allocation with 1TB in size. But still hoping that this will create an interest on your part. Btw, we usually do this sequence which a bit [again] proven. Enjoy.

================================
1. I first checked if the allocated LUNs are still available for this FS creation. [Of course, all here are available..].

[root@hpux01:/home/user17]
# for i in `more 20080429diskinfo.rpt | grep -i lvm | grep -v "0(" | sort -u | awk '{print $1}'`
> do
> strings /etc/lvmtab | grep ${i}
> echo "--------------"
> pvdisplay /dev/dsk/${i}
> echo "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
> done

--------------
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c52t10d7" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c52t10d7".
XXXXXXXXXXXXXXXXXXXXXXXXXXX
--------------
.....
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c82t2d7" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c82t2d7".
XXXXXXXXXXXXXXXXXXXXXXXXXXX
--------------
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c82t3d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c82t3d0".
XXXXXXXXXXXXXXXXXXXXXXXXXXX

[root@hpux01:/home/user17]
#


================================
2. Just like before, we will initialize the LUNs for LVM use.

[root@hpux01:/home/user17]
# for i in `cat LUNs.txt`
> do
> pvcreate /dev/rdsk/${i}
> echo "----------"
> done
Physical volume "/dev/rdsk/c52t3d0" has been successfully created.
----------
.....
Physical volume "/dev/rdsk/c82t2d7" has been successfully created.
----------
Physical volume "/dev/rdsk/c82t3d0" has been successfully created.
----------

[root@hpux01:/home/user17]
#

================================
3. Create the device file for the VG group.

[root@hpux01:/home/user17]
# mkdir -p /dev/vg_name

[root@hpux01:/home/user17]
# ll -d /dev/vg_name
drwxr-xr-x 2 root sys 96 Apr 30 03:43 /dev/vg_name

[root@hpux01:/home/user17]
# mknod /dev/vg_name/group c 64 0x330000

[root@hpux01:/home/user17]
# ll /dev/vg_name/group
crw-r--r-- 1 root sys 64 0x330000 Apr 30 03:44 /dev/vg_name/group

[root@hpux01:/home/user17]
#

================================
4. Let's make a VG with the following characteristics:

a. Maximum number of LUNs set to 64 - this limits the number of disk that can be added to the volume group to 64
b. PE size of 64MB
c. extent size of 15000 - this addresses the number of extents that can be created on a disk. If this is not specified, it'll take the maximum number of extents that can be created on the first disk joined to the VG. Which will limit the usage of other LUNs bigger [in capacity] than the initialized disk.
Ex: If you initialize a disk with size 8GB w/out specifying -e flag, when you join a disk bigger than 8GB, it'll limit only the usage of this disk to 8GB. I hope you get the picture, if NOT, leave a comment. I'd be happy to answer.
d. Create a PVG

4.1. This is just an initialization. I made a li'l script below which will add other disks.
# vgcreate -p 64 -s 64 -e 15000 -g PVG0 /dev/vg_name /dev/dsk/c52t3d0

4.2. Add the remaining primary disks.
# for i in `cat LUNs.txt`
> do
> vgextend -g PVG0 vg_name /dev/dsk/${i}
> echo "---"
> done


4.3. Add the alternate links.
# for i in `cat Alt_LUNs.txt`
> do
> vgextend /dev/vg_name /dev/dsk/${i}
> echo "---- PV Link added ----"
> done


================================
5. Create the LV with PVG-strict/distributed allocation.

[root@hpux01:/home/user17]
# lvcreate -L 1044480 -n lv_data7 -s g -D y /dev/vg_name
Logical volume "/dev/vg_name/lv_data7" has been successfully created with
character device "/dev/vg_name/rlv_data7".
Logical volume "/dev/vg_name/lv_data7" has been successfully extended.
Volume Group configuration for /dev/vg_name has been saved in /etc/lvmconf/vg_name.conf

[root@hpux01:/home/user17]
# lvdisplay /dev/vg_name/lv_data7
--- Logical volumes ---
LV Name /dev/vg_name/lv_data7
VG Name /dev/vg_name
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1044480
Current LE 16320
Allocated PE 16320
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

[root@hpux01:/home/user17]


================================
6. For comparison purpose [will be referenced for the creation].

# mkfs -m /dev/vg_old_name/lv_data6
mkfs -F vxfs -o ninode=unlimited,bsize=8192,version=4,inosize=256,logsize=256,largefiles /dev/vg_old_name/lv_data6 1069547520


================================
7. Format for FS usage [enabling large file support].

[root@hpux01:/home/user17]
# newfs -F vxfs -o largefiles /dev/vg_name/rlv_data7
version 4 layout
1069547520 sectors, 133693440 blocks of size 8192, log size 256 blocks
unlimited inodes, largefiles supported
133693440 data blocks, 133688056 free data blocks
4080 allocation units of 32768 blocks, 32768 data blocks

[root@hpux01:/home/user17]
# mkfs -m /dev/vg_name/lv_data7
mkfs: /etc/default/fs is used for determining the file system type
mkfs -F vxfs -o ninode=unlimited,bsize=8192,version=4,inosize=256,logsize=256,largefiles /dev/vg_name/lv_data7 1069547520

[root@hpux01:/home/user17]
#


================================
8. Create the mount point; add entry in the fstab, and mount.

[root@hpux01:/home/user17]
# mkdir -p /mount/point/sapdata7

[root@hpux01:/home/user17]
# ll -d /mount/point/sapdata7
drwxr-xr-x 2 root sys 96 Apr 30 04:23
/mount/point/sapdata7

[root@hpux01:/home/user17]
# vi /etc/fstab
...
/dev/vg_old_name/lv_data6
/mount/point/sapdata6 vxfs log 0 0
/dev/vg_name/lv_data7
/mount/point/sapdata7 vxfs log 0 0

[root@hpux01:/home/user17]
# mount
/mount/point/sapdata7

[root@hpux01:/home/user17]
# bdf
/mount/point/sapdata7
Filesystem kbytes used avail %used Mounted on
/dev/vg_name/lv_data7
1069547520 35032 1061156936 0%
/mount/point/sapdata7

[root@hpux01:/home/user17]
#


================================
9. Change ownership and/or permissions as needed.

[root@hpux01:/home/user17]
# chown -R oraf6r:dba
/mount/point/sapdata7

[root@hpux01:/home/user17]
# ll -d
/mount/point/sapdata7
drwxr-xr-x 3 oraf6r dba 96 Apr 30 04:21 /mount/point/sapdata7

[root@hpux01:/home/user17]
#

================================
These were used when I have to re-create the VG.

A. Reducing the VG until 1 LUN is left.

for i in `cat /root/list_LUNs.txt`
do
echo "-----"
vgreduce /dev/vg_name $i
pvdisplay $i
echo "-----"
done


B. Removing the VG.
vgremove
/dev/vg_name

C. Removing the LV.
lvremove /dev/vg_name/lv_data7

Thursday, April 24, 2008

Basic LVM: VG, LV, and file system creation

It's been a while, and I think there is a need to add a new one here.

Knowledge sharing sessions were done last week with the other account and they discussed Logical Volume Management (LVM), HP-UX's style. As for my team, we have the privilege to eat, drink, and live with this everyday. I'm making a guide here on how it is done. Just check it out. And as a requirement, you must have a good understanding of LVM.

Basics: Have a unused and available disk ready on your system.

1. Ensure that the disk is not being used by other volume groups (VG). Any of these three will report IF the disk is in use by other VGs.

# vgdisplay -v | grep -i cXtYdZ
where: cXtYdZ is the disk represented by controller, target and LUN; or use `ioscan` to get the desired details
# strings /etc/lvmtab grep -i
cXtYdZ
# pvdisplay /dev/dsk/cXtYdZ


2. If step 1 is ok, initialize the disk by creating LVM structures on the disk.

# pvcreate [-f] /dev/rdsk/cXtYdZ

3. We have to create a device file for the volume group.

# mkdir -p /dev/VG_name
# mknod /dev/VG_name/group c 64 <minor_number>

note: you can choose any minor number you want; good practice is to use the next available

4. Now, let's proceed with the VG creation [taking the default values].

# vgcreate /dev/VG_name /dev/dsk/cXtYdZ
note: alternate link can be specified here as well
# vgdisplay [-v] VG_name

5. Create the the logical volume (LV). And verify.

# lvcreate -L <LV_size_in_MB> -n LV_name VG_name
# lvdisplay /dev/VG_name/LV_name


6. Format the LV to be used as file system.

# newfs -F vxfs[specify_as_needed] /dev/VG_name/raw_LV_name

7. Create the mount point [commonly called directory] for the file system.

# mkdir /mount_point

8. Add the entry on the /etc/fstab which will ensure the it'll get mounted on succeeding reboot.

# vi /etc/fstab
...
/dev/VG_name/LV_name /mount_point [options_here]
...
:wq!


9. Mount the file system. Change the ownership and permissions as needed.

# mount /mount_point
# chown ...
# chmod ...


Basically, this is it. For more advance topics, we will have another time.

Friday, April 11, 2008

Ignite backup error - The list_expander command failed

Hello team, I'd like to share one of the common errors you will find during ignite backup.

[root@hpux02:/root]
# /opt/ignite/bin/make_net_recovery -s hpux03 -x inc_entire=vg00
* Creating NFS mount directories for configuration files.

======= 04/11/08 10:56:30 SST Started /opt/ignite/bin/make_net_recovery. (Fri
Apr 11 10:56:30 SST 2008)
@(#) Ignite-UX Revision B.5.4.50
@(#) net_recovery (opt) $Revision: 10.637 $

* Testing pax for needed patch
* Passed pax tests.
* Checking Versions of Recovery Tools
ERROR: Cannot stat device file: /dev/old_vg_apps/lv_mom: No such file or
directory (errno = 2). Check /etc/fstab for a bad entry.
ERROR: The list_expander command failed. This could be due to a problem with
the -x options specified - see messages above.

======= 04/11/08 10:57:11 SST make_net_recovery completed unsuccessfully

[root@hpux02:/root]
#

AND/OR

# /opt/ignite/lbin/list_expander
ERROR: Cannot stat device file: /dev/old_vg_hr03/lv_u01: No such file or
directory (errno = 2). Check /etc/fstab for a bad entry.

[root@hpux02:/root]

#

This occurs when certain FS is no longer in use and was not removed in /etc/fstab. I check it using:

# bdf <block_device_name>
# bdf
/dev/old_vg_apps/lv_mom

OR

# mount -v grep -i
<pattern>

AND/OR

# lvdisplay <block_device_name>
# lvdisplay
/dev/old_vg_apps/lv_mom

If it does NOT return any of your expected result, then it is safe to say that the FS is NOT is use. From here, we can proceed by commenting [deleting] this but, make sure to have a backup just in case. Systems admins know this by heart. "He who laughs last, made a backup!". Proceeding..

# cp -p /etc/fstab /etc/fstab.backup1.20080411
# vi /etc/fstab
....
/dev/old_vg_hr03/lv_u01 /old/var/opt/vghr03/u01 vxfs delaylog,mincache=direct 0 2
/dev/old_vg_hr04/lv_u01 /old/var/opt/vghr04/u01 vxfs delaylog,mincache=direct 0 2
/dev/old_vg_hr05/lv_u01 /old/var/opt/vghr05/u01 vxfs delaylog,mincache=direct 0 2
/dev/old_vg_hr06/lv_u01 /old/var/opt/vghr06/u01 vxfs delaylog,mincache=direct 0 2
/dev/old_vg_hr07/lv_u01 /old/var/opt/vghr07/u01 vxfs delaylog,mincache=direct 0 2
....


So, our target here is to comment these lines so that it will not be read by ignite. For this case, we can comment it one by one. But for cases where we want to comment hundreds of lines, it'll take a lot of time. So I searched for some
vi commands that will do this task for me. And I found it here: http://sparky.rice.edu/~hartigan/vi.html.

I executed this in command mode:
:218,$s/^/\#

This means that, I'd like to insert a "
#" character at the beginning of each line from line 218 to the last. Save and exit. Then re-ran ignite. As of this writing, it's running smoothly.

Interesting topic: http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1207883792669+28353475&threadId=996179

Monday, April 07, 2008

Swap Space

After [some] reading topic on swap space, it crossed my mind if swap space, created through LVM, can be extended? This is in consideration to limited available physical disk to be attached to the system, and not having to use a file system swap. On the sidetrack, consider 2 small swap spaces [on faster disks, of course], than 1 large one; same priority for similar device swap spaces. After asking my colleague (which by the way, he refused to answer since he's not sure about it and I know he's sincere), and finally reading about it (not my first choice today since I'm too lazy), I came to know that it depends on how it was created. As reference to the book I was reading, it was created with basically default options. So extending it, is only subject to availability of free PEs/LEs. But, the more interesting idea was, what if, and I think this is how swap spaces should be created, it was created contiguous-ly [and usually the succeeding spaces are used], how are we going to proceed? As suggested by the manual from HP, you can re-create the swap space to retain the contiguous allocation and also increase the space you need.

# lvcreate -C y -L <new_size> -r n -n <lv_name> /dev/<vg_name>
# lvlnboot -s /dev/<vg_name>/<lv_name>


The second command above is used to set the swap as primary. Check /etc/fstab if it needs to be corrected. And of course, don't forget to reboot your system.

HTH. Open to suggestions/corrections... see ya' round.

World Clock