Mar
10
2009
0

How to Use “tcpdump” to Log OCFS2 Interconnect (o2net)?

If from the /var/log/messages you are receiving network / o2net related errors and some OCFS2 / system functionality is not available or not working properly, generating a ‘tcpdump’ over the network interconnect may help to diagnose the problem for root cause analysis (RCA). (more…)

Share
Written by in: linux,network,storage | Tweet This
Jan
15
2009
0

HP QLogic Drivers

The released drivers need some good patching for rhel5 oel5 and OracleVM.

Share
Sep
15
2008
1

Mounting an LVM Logical Volume in an Oracle VM Disk Image

# losetup /dev/loop0 System.img
# kpartx -a /dev/loop0
# ls -l /dev/mapper/loop0*
brw-rw—- 1 root disk 253, 0 Jul 14 19:57 /dev/mapper/loop0p1
brw-rw—- 1 root disk 253, 1 Jul 14 19:57 /dev/mapper/loop0p2

# file -s /dev/mapper/loop0p2
/dev/mapper/loop0p2: LVM2 (Linux Logical Volume Manager) , UUID: 7zKduhTHsMa3YD3t2gocYKUDGRP5QvW

# vgscan
Reading all physical volumes. This may take a while…
Found volume group “VolGroup00” using metadata type lvm2

# vgchange -a y VolGroup00
2 logical volume(s) in volume group “VolGroup00” now active

# lvdisplay
— Logical volume —
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID YcNYud-4BXO-Ro6N-P7VW-yrLm-DDZT-oLGgAO
LV Write Access read/write
LV Status available
# open 0
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2

— Logical volume —
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID pSyXMZ-8TXw-fwiw-m3re-Oi3I-0fch-mJ1Q5H
LV Write Access read/write
LV Status available
# open 0
LV Size 1.91 GB
Current LE 61
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:3

# mkdir -p /mnt/VolGroup00/LogVol00
# mount /dev/VolGroup00/LogVol00 /mnt/VolGroup00/LogVol00
# ls /mnt/VolGroup00/LogVol00
bin dev home lib lost+found misc opt root selinux sys usr
boot etc initrd lib64 media mnt proc sbin srv tmp var
#

Share
Written by in: OracleVM,storage | Tweet This
Sep
15
2008
0

Is there a way to somehow mount a (shutdown) Xen disk image and browse files?

Yes .. Many .. One is
# losetup /dev/loop0 System.img
# kpartx -a /dev/loop0
# ls -l /dev/mapper/loop0*
brw-rw—- 1 root disk 253, 0 Jul 14 18:53 /dev/mapper/loop0p1
brw-rw—- 1 root disk 253, 1 Jul 14 18:53 /dev/mapper/loop0p2
# mount /dev/mapper/loop0p2 /mnt

Another is

# fdisk -l -u System.img

Device Boot Start End Blocks Id System
System.img1 * 63 208844 104391 83 Linux
System.img2 208845 8385929 4088542+ 83 Linux
# echo 208845\*512 | bc
106928640
# mount -o loop,offset=106928640 System.img /mnt

But those will not work for partitions which are LVM .. like:
# fdisk -l -u System.img
Disk System.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
System.img1 * 63 208844 104391 83 Linux
System.img2 208845 8385929 4088542+ 8e Linux LVM

mount fails with:
mount: you must specify the filesystem type
or
ioctl: LOOP_SET_STATUS: Invalid argument
(if you use an offset mount)

I am pretty sure that there is a way to mount the logical volumes under that LVM
from dom0 .. Need to investigate..

BTW
this is not supposed to work also if the filesystem is encrypted.. That
requires encryption arguments to be passed along too.. That is rreally
advised for the sake of security.

Share
Written by in: storage,xen | Tweet This
Sep
15
2008
0

A basic LVM Setup

# fdisk -l

Disk /dev/hda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 522 4088542+ 8e Linux LVM

Disk /dev/hdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 522 4192933+ 83 Linux

# pvcreate /dev/hdb1
Physical volume “/dev/hdb1” successfully created
# vgcreate vg1 /dev/hdb1
Volume group “vg1” successfully created

# lvcreate –size 1G vg1
Logical volume “lvol0” created
# ls -l /dev/vg1/lvol0
lrwxrwxrwx 1 root root 21 Jul 29 20:27 /dev/vg1/lvol0 -> /dev/mapper/vg1-lvol0
# mkfs.ext3 /dev/vg1/lvol0
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
131072 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

# mount /dev/vg1/lvol0 /mnt
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
2967320 860884 1955704 31% /
/dev/hda1 101086 10199 85668 11% /boot
none 254472 0 254472 0% /dev/shm
/dev/mapper/vg1-lvol0
1032088 34092 945568 4% /mnt

Share
Written by in: linux,storage,sysadm | Tweet This

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com