Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have created a vol. group on the entire /dev/sda device (HardwareRaid1) on 2x73GB with the following scheme am using native multipath:
[root@linux1 log]# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
59G 2.4G 54G 5% /
/dev/sda1 99M 17M 77M 19% /boot
tmpfs 7.9G 0 7.9G 0% /dev/shm
/dev/dm-3 50G 180M 47G 1% /ftp3
/dev/dm-4 50G 180M 47G 1% /ftp4
/dev/dm-2 50G 180M 47G 1% /ftp2
what you recommend to extend vol. group with an attached LUN from the FC SAN.
do I need to unmount my LogVol00 before I add the /dev/dm-3..etc
[root@linux1 log]# fdisk -l
Disk /dev/sda: 72.7 GB, 72746008576 bytes
255 heads, 63 sectors/track, 8844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 8844 70935007+ 8e Linux LVM
Disk /dev/sdb: 53.6 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdd: 53.6 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sdf: 53.6 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdf doesn't contain a valid partition table
Disk /dev/sdh: 53.6 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdh doesn't contain a valid partition table
Disk /dev/sdj: 53.6 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdj doesn't contain a valid partition table
Disk /dev/sdl: 53.6 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk /dev/sdl doesn't contain a valid partition table
Disk /dev/dm-2: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/dm-3: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-3 doesn't contain a valid partition table
Disk /dev/dm-4: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-4 doesn't contain a valid partition table
[root@linux1 log]#
[root@linux1 log]# lvdisplay
/dev/sdc: read failed after 0 of 4096 at 0: Input/output error
/dev/sde: read failed after 0 of 4096 at 0: Input/output error
/dev/sdg: read failed after 0 of 4096 at 0: Input/output error
/dev/sdi: read failed after 0 of 4096 at 0: Input/output error
/dev/sdk: read failed after 0 of 4096 at 0: Input/output error
/dev/sdm: read failed after 0 of 4096 at 0: Input/output error
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID 9T9BcN-p9F9-UmNi-HvBt-vKqg-3nyw-rIhYBa
LV Write Access read/write
LV Status available
# open 1
LV Size 60.81 GB
Current LE 1946
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID Mo7hqB-lP3y-ZzsI-EJ3d-RK9q-MpLi-6kUVry
LV Write Access read/write
LV Status available
# open 1
LV Size 6.81 GB
Current LE 218
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
my OS RHEL 5
2.6.18-8.1.15.el5 #1 SMP Thu Oct 4 04:06:39 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
lvdisplay = Show Logical Volumes (LVs) - Does NOT show Volume Groups (VGs).
vgdisplay = Show VGs
If you want to add to a VG rather than an LV you do NOT need to unmount anything. You need to:
pvcreate <disk or partition>
vgextend <vgname> <disk or partition from prior step>
You can then create new LV using the increased space with:
lvcreate <options>
-OR- You can increase an existing LV using
lvextend <options>
Note that the LV is the "device" on which the "filesystem" is created. That is to say simply creating an LV doesn't make a filesystem so you have to use a command like mkfs to make a new filesystem on the LV. Depending on filesystem type there may be a way to extend the existing filesystem if you're trying to do lvextend and then extend the FS. (Do NOT run mkfs on an existing filesystem - it will overwrite what is there.)
You can type "man <command>" for the commands mentioned above to get more details on exact usage.
To extend a Volume Group and Logical Volume Group with new device mapper multipath
[root@linux1 mapper]# ls -al
total 0
drwxr-xr-x 2 root root 140 Nov 12 08:08 .
drwxr-xr-x 13 root root 4400 Nov 12 08:09 ..
crw------- 1 root root 10, 63 Nov 12 08:08 control
brw-rw---- 1 root disk 253, 2 Nov 12 08:08 mpath1
brw-rw---- 1 root disk 253, 3 Nov 12 08:08 mpath2
brw-rw---- 1 root disk 253, 0 Nov 12 08:08 VolGroup00-LogVol00
brw-rw---- 1 root disk 253, 1 Nov 12 08:08 VolGroup00-LogVol01
I'm not familiar with the "mpath" stuff - we use EMC PowerPath for multipathing rather than the native multipathing.
Do a "vgdisplay" to see which disks are in the existing volume group. Presumably you'd need the multipath master (called a pseudo-device in PowerPath) rather than the individual paths (/dev/sd...) for your pvcreate. The vgdisplay will show what you're already using as "disks" so should give a clue as to what should be used for new "disks" for pvcreate.
lvdisplay = Show Logical Volumes (LVs) - Does NOT show Volume Groups (VGs).
vgdisplay = Show VGs
If you want to add to a VG rather than an LV you do NOT need to unmount anything. You need to:
pvcreate <disk or partition>
vgextend <vgname> <disk or partition from prior step>
You can then create new LV using the increased space with:
lvcreate <options>
-OR- You can increase an existing LV using
lvextend <options>
Note that the LV is the "device" on which the "filesystem" is created. That is to say simply creating an LV doesn't make a filesystem so you have to use a command like mkfs to make a new filesystem on the LV. Depending on filesystem type there may be a way to extend the existing filesystem if you're trying to do lvextend and then extend the FS. (Do NOT run mkfs on an existing filesystem - it will overwrite what is there.)
You can type "man <command>" for the commands mentioned above to get more details on exact usage.
Remember after running lvextend to extend an existing partition, you need to run ext2online command to actually add the new space.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.