Monday, February 28, 2011

KVM and Virtualbox rants

Redhat 6 used KVM(?) in virtualization but Rhel6 DVD doesnt have kvm rpms. You can't rum KVM on a virtualized environment in Virtualbox. Virtualized processor doesnt support hardware virtualization(VT-x and AMD-v). On that note, i might need new computer just to simulate KVM that i cant afford as of now..

Friday, February 18, 2011

Playing with Logical Volume Manager

Initialize disk using pvcreate
[root@rhel01 ~]# pvcreate /dev/sda1
Physical volume "/dev/sda1" successfully created

Create volume group lab_group1
[root@rhel01 ~]# vgcreate lab_group1 /dev/sda1
Volume group "lab_group1" successfully created

In this sample i created 10MB of logical volume mount to /mnt
[root@rhel01 ~]# lvcreate -L 10M lab_group1 -n lab01
Rounding up size to full physical extent 12.00 MiB
Logical volume "lab01" created
[root@rhel01 ~]# mkfs.ext4 /dev/lab_group1/lab01
mke2fs 1.41.12 (17-May-2010)

[root@rhel01 ~]# mount /dev/lab_group1/lab01 /mnt
[root@rhel01 ~]# df -h /mnt

Filesystem            Size  Used Avail Use% Mounted on


12M  1.2M   10M  11% /mnt

Extending Logical Volume using new disk

Initialize new disk
[root@rhel01 ~]# pvcreate /dev/sdb1
Wiping software RAID md superblock on /dev/sdb1
Physical volume "/dev/sdb1" successfully created

Extend lab_group1 volume group
[root@rhel01 ~]# vgextend lab_group1 /dev/sdb1
Volume group "lab_group1" successfully extended
[root@rhel01 ~]# vgdisplay lab_group1
--- Volume group ---
VG Name               lab_group1
System ID
Format                lvm2
Metadata Areas        2
Metadata Sequence No  3
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                1
Open LV               0
Max PV                0
Cur PV                2
Act PV                2
VG Size               56.00 MiB
PE Size               4.00 MiB
Total PE              14
Alloc PE / Size       3 / 12.00 MiB
Free  PE / Size       11 / 44.00 MiB
VG UUID               o8kB09-P20F-QLFx-UmPE-5BB5-mlu9-o867qV

Extend logical volume lab01
[root@rhel01 ~]# lvextend -L +10M /dev/lab_group1/lab01
Rounding up size to full physical extent 12.00 MiB
Extending logical volume lab01 to 24.00 MiB
Logical volume lab01 successfully resized
[root@rhel01 ~]# df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
12M  1.2M   10M  11% /mnt
[root@rhel01 ~]# resize2fs /dev/lab_group1/lab01
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/lab_group1/lab01 is mounted on /mnt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/lab_group1/lab01 to 24576 (1k) blocks.
The filesystem on /dev/lab_group1/lab01 is now 24576 blocks long.
[root@rhel01 ~]# df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
24M  1.2M   22M   5% /mnt

LVM: Can't remove open logical volume

lvremove command can't remove open logical volume

[root@rhel01 /]# lvremove /dev/lab_group/lab01

Can't remove open logical volume "lab01"

Command failed

Using dmsetup command to check the status of the LVM

[root@rhel01 /]# dmsetup info -c lab_group-lab01

Name             Maj Min Stat Open Targ Event  UUID

lab_group-lab01  253   7 L--w    0    1      0 LVM-XHpst6rC31EOIHxjWAp6CfbCBUIcF                                                                        p1uqjWa6RINr32OZVWF0pdnfaal8DKoUZGH

Eventhough Open is 0 still can't remove the logical volume

[root@rhel01 /]# lvremove /dev/lab_group/lab01

Can't remove open logical volume "lab01"

Removing dm table entry

[root@rhel01 /]# dmsetup remove lab_group-lab01

lvremove successfully removed the logical volume

[root@rhel01 /]# lvremove /dev/lab_group/lab01

Logical volume "lab01" successfully removed

Friday, February 11, 2011

Oracle Certified Sytem Admin for Solaris 10

Passing score:63

Your Score : 70

Result: PASS

Whoa i barely passed  Oracle Certified System Admin for Solaris 10 (310-202) Part 2 exam. Caught off guard on LDAP and I just hate Jumpstart questions. Already convinced myself that  i failed the exam because of the low percentile per topic, but what a relief when the examiner handed me the test printout with the word PASS.

Have to relax first this weekend before i go back to my labs.. hopefully RHCE eh :)