Sponsored Content
Operating Systems Linux Red Hat Create volume using LVM over 2 physical disks Post 302728225 by Scott on Wednesday 7th of November 2012 01:24:57 PM
Old 11-07-2012
It looks like you already created the physical volumes. What does pvs display?

It's not totally clear what you are asking, but if I understand, you want to "combine" the disks /dev/sdb and /dev/sdc. You can do this in as much as adding them to the same volume group.

Code:
# vgcreate myvg01 /dev/sdb /dev/sdc

You can then create three logical volumes, one each for /u01, /u02 and /u03

i.e.
Code:
[root@RH631d ~]# lvcreate -L10G -n mylv01 myvg01
  Logical volume "mylv01" created

Then you can create the filesystem using the LV's.

(far from optimal, but quick for me to show...)
[code]
Code:
[root@RH631d ~]# mkfs -t ext3 /dev/mapper/myvg01-mylv01
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1310720 inodes, 2621440 blocks
131072 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

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

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@RH631d ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              3960348   2536864    196924  93% /
/dev/sda5             14301224    167312  13395728   2% /home
/dev/sda1                46633     11178     33047  26% /boot
tmpfs                   512360         0    512360   0% /dev/shm
.host:/              829127300 740882960  88244340  90% /mnt/hgfs
[root@RH631d ~]# mkdir /u01
[root@RH631d ~]# mount /dev/mapper/myvg01-mylv01 /u01
[root@RH631d ~]# df -hP
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             3.8G  2.5G  193M  93% /
/dev/sda5              14G  164M   13G   2% /home
/dev/sda1              46M   11M   33M  26% /boot
tmpfs                 501M     0  501M   0% /dev/shm
.host:/               791G  707G   85G  90% /mnt/hgfs
/dev/mapper/myvg01-mylv01  9.9G  151M  9.2G   2% /u01

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

physical volume and physical disk.

Hello, I need explanations about physical disks and physical volumes. What is the difference between these 2 things? In fact, i am trying to understand what the AIX lspv2command does. Thank you in advance. (2 Replies)
Discussion started by: VeroL
2 Replies

2. UNIX for Dummies Questions & Answers

Physical volume- no free physical partitions

I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Discussion started by: markper
9 Replies

3. HP-UX

How Can I Create A Volume Group With Two Hard Disks On Hp-ux C-3750

Hello All, I Am A New Member To This Group. I Want To Know How Can We Create Single Volume Group Using 2 Hard Disks. As We Require More Data To Be Stored We Need To Add A Hard Disk,but I Have A Doubt Whether We Can Increase The Size Of A Logical Volume Mounted On A Volume Group By Adding A... (5 Replies)
Discussion started by: bala_mes
5 Replies

4. UNIX for Advanced & Expert Users

LVM - Extending Logical Volume within Volume Group

Hello, I have logical volume group of 50GB, in which I have 2 logical volumes, LogVol01 and LogVol02, both are of 10GB. If I extend LogVol01 further by 10GB, then it keeps the extended copy after logical volume 2. I want to know where it keeps this information Regards Himanshu (3 Replies)
Discussion started by: ghimanshu
3 Replies

5. AIX

Basic Filesystem / Physical Volume / Logical Volume Check

Hi! Can anyone help me on how I can do a basic check on the Unix filesystems / physical volumes and logical volumes? What items should I check, like where do I look at in smit? Or are there commands that I should execute? I need to do this as I was informed by IBM that there seems to be... (1 Reply)
Discussion started by: chipahoys
1 Replies

6. Linux

LVM (volume manager) and virtual disks

:eek: Hi guys, I'm pulling my hair out over this one. I am trying to set up a virtual server environment. ( I am using VirtualBox, but I think this is irrelevant to this problem.) I have downloaded a pre-packaged Linux virtual disk, with which I have successfully started a virtual instance of a... (4 Replies)
Discussion started by: otheus
4 Replies

7. AIX

How to determine the physical volume fo the disks

This is the report I got running the comand rptconf, but I would like to know what is the capacity of the disks installed into our server power 6 with AIX System Model: IBM,7778-23X Machine Serial Number: 1066D5A Processor Type: PowerPC_POWER6 Processor Implementation Mode: POWER 6... (6 Replies)
Discussion started by: cucosss
6 Replies

8. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

9. AIX

Position of the logical volume on the physical volume

Hello everyone, I just read that while creating a logical volume(LV) we can choose the region of the physical volume (PV) in which the LV should be created. When I say region I mean: outer edge - outer middle - center - inner middle and inner edge. Can anyone help me understand the utility... (11 Replies)
Discussion started by: adilyos
11 Replies

10. Red Hat

Physical Volume Create Conundrum

I want to start by saying I already resolved my issue but I want to understand why I am seeing what I am seeing. I have a server with a RAID controller two 500GB drives and six 600GB drives. The two 500GB drives are mirrored and have the OS installed on them. The six 600GB they wanted set as... (4 Replies)
Discussion started by: scotbuff
4 Replies
GENEXT2FS(8)						      System Manager's Manual						      GENEXT2FS(8)

NAME
genext2fs - ext2 filesystem generator for embedded systems SYNOPSIS
genext2fs [ options ] [ output-image ] DESCRIPTION
genext2fs generates an ext2 filesystem as a normal (non-root) user. It does not require you to mount the image file to copy files on it, nor does it require that you become the superuser to make device nodes. The filesystem image is created in the file output-image. If not specified, it is sent to stdout. By default, the maximum number of inodes in the filesystem is the minimum number required to accommodate the initial contents. In this way, a minimal filesystem (typically read-only) can be created with minimal free inodes. If required, free inodes can be added by passing the relevant options. The filesystem image size in blocks can be minimised by trial and error. OPTIONS
-x, --starting-image image Use this image as a starting point. -d, --root directory[:path] Add the given directory and contents at a particular path (by default the root). -D, --devtable spec-file[:path] Use spec-file to specify inodes to be added, at the given path (by default the root), including files, directories and special files like devices. If the specified files are already present in the image, their ownership and permission modes will be adjusted accordingly. Furthermore, you can use a single table entry to create many devices with a range of minor numbers (see examples below). All specified inodes receive the mtime of spec-file itself. -b, --size-in-blocks blocks Size of the image in blocks. -N, --number-of-inodes inodes Maximum number of inodes. -i, --bytes-per-inode ratio Used to calculate the maximum number of inodes from the available blocks. -m, --reserved-percentage Number of reserved blocks as a percentage of size. Reserving 0 blocks will prevent creation of the "lost+found" directory. -g, --block-map path Generate a block map file for this path. -e, --fill-value value Fill unallocated blocks with value. -z, --allow-holes Make files with holes. -f, --faketime Use a timestamp of 0 for inode and filesystem creation, instead of the present. Useful for testing. -q, --squash Squash permissions and owners (same as -P -U). -U, --squash-uids Squash ownership of inodes added using the -d option, making them all owned by root:root. -P, --squash-perms Squash permissions of inodes added using the -d option. Analogous to "umask 077". -v, --verbose Print resulting filesystem structure. -V, --version Print genext2fs version. -h, --help Display help. EXAMPLES
genext2fs -b 1440 -d src /dev/fd0 All files in the src directory will be written to /dev/fd0 as a new ext2 filesystem image. You can then mount the floppy as usual. genext2fs -b 1024 -d src -D device_table.txt flashdisk.img This example builds a filesystem from all the files in src, then device nodes are created based on the contents of the file device_ta- ble.txt. Entries in the device table take the form of: <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count> where name is the file name and type can be one of: f A regular file d Directory c Character special device file b Block special device file p Fifo (named pipe) uid is the user id for the target file, gid is the group id for the target file. The rest of the entries (major, minor, etc) apply only to device special files. An example device file follows: # name type mode uid gid major minor start inc count /dev d 755 0 0 - - - - - /dev/mem c 640 0 0 1 1 0 0 - /dev/tty c 666 0 0 5 0 0 0 - /dev/tty c 666 0 0 4 0 0 1 6 /dev/loop b 640 0 0 7 0 0 1 2 /dev/hda b 640 0 0 3 0 0 0 - /dev/hda b 640 0 0 3 1 1 1 16 /dev/log s 666 0 0 - - - - - This device table creates the /dev directory, a character device node /dev/mem (major 1, minor 1), and also creates /dev/tty, /dev/tty[0-5], /dev/loop[0-1], /dev/hda, /dev/hda1 to /dev/hda15 and /dev/log socket. SEE ALSO
mkfs(8), genromfs(8), mkisofs(8), mkfs.jffs2(1) AUTHOR
This manual page was written by David Kimdon <dwhedon@debian.org>, for the Debian GNU/Linux system (but may be used by others). Examples provided by Erik Andersen <andersen@codepoet.org>. August 19, 2006 GENEXT2FS(8)
All times are GMT -4. The time now is 01:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy