Logical Volume Manager

# Using the whole secondary-slave IDE hard disk for existing LVM volume group (called vg0 in my case) by creating the physical volume (PV):
# pvcreate /dev/sdb1 /dev/sdc1

A similar message of this will be shown upon successful execution of pvcreate command:
pvcreate — physical volume “/dev/hdd” successfully created

Creating volume group !
# vgcreate vg1 /dev/sdb1 /dev/sdc1 
 
Create the new logical volume (LV) at 400MB (not fully utilize the whole IDE hard disk) to host the new EXT3 file system in question:
# lvcreate -L 10G -n my_log_vol01 vg1
# lvcreate -L 10G -n my_log_vol02 vg1
lvcreate completed successfully, this similar message will be seen:

lvcreate — doing automatic backup of “vg1″
lvcreate — logical volume “/dev/vg0/lvol1″ successfully created
 
Now, create the new EXT3 file system on the new logical volume (LV) with 1% file system reserved block count:
# mkfs -t ext3 -m 1 -v /dev/vg1/my_log_vol01
# mkfs -t ext3 -m 1 -v /dev/vg1/my_log_vol02


Once the new EXT3 file system creation completed, you can examine the file system by executing

tune2fs -l /dev/vg1/my_log_vol02
 
# Create a mount point directory for the new EXT3 file system:
mkdir -p /opt/oracle
 
It’s now ready to mount the new EXT3 file system:
# mount -t ext3 /dev/vg1/my_log_vol01 /opt/oracle

To confirm that the new EXT3 file system has been mounted successful, type df -h

Register disk with fdisk command
# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
Using default value 1305

Command (m for help): p

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1305    10482381   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
#

No comments:

OTN Discussion Forums: Message List - Database - General

Ask Tom HOT ARTICLES

 
© Copyright 2008 - 2011. All rights reserved to dba-sansar.blogspot.com.
All other blogs, posts and entries are the property of their respective authors.
Please email us for your comments and suggessions Click Here