expand LVM
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. |
[root@linux1 ~]# 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 Device Boot Start End Blocks Id System Disk /dev/sde: 53.6 GB, 53687091200 bytes 64 heads, 32 sectors/track, 51200 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Disk /dev/sde 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 Device Boot Start End Blocks Id System Disk /dev/sdi: 53.6 GB, 53687091200 bytes 64 heads, 32 sectors/track, 51200 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Disk /dev/sdi 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 Device Boot Start End Blocks Id System 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 [root@linux1 ~]# df -kh Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 62G 2.5G 57G 5% / /dev/sda1 99M 26M 69M 27% /boot tmpfs 7.9G 0 7.9G 0% /dev/shm [root@linux1 ~]# df -kh Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 62G 2.5G 57G 5% / /dev/sda1 99M 26M 69M 27% /boot tmpfs 7.9G 0 7.9G 0% /dev/shm 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 Can i do the following # lvm lvm>pvcreate /dev/mapper/mpath1 lvm>vgextend VolGroup00 /dev/mapper/mpath1 lvm>lvextend -L30G /dev/VolGroup00/LogVol00 lvm>exit # ext2online /dev/VolGroup00/LogVol00 # df -h |
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. |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 01:26 PM. |