I did extend the uservg but the size is not what I expected, look on my code or execution
Code:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 662 5116702+ 83 Linux
/dev/sda3 663 1044 3068415 83 Linux
/dev/sda4 1045 2610 12578895 5 Extended
/dev/sda5 1045 1426 3068383+ 83 Linux
/dev/sda6 1427 1808 3068383+ 83 Linux
/dev/sda7 1809 1935 1020096 82 Linux swap
Command (m for help): n
First cylinder (1936-2610, default 1936):
Using default value 1936
Last cylinder or +size or +sizeM or +sizeK (1936-2610, default 2610): +2000M
Command (m for help): t
Partition number (1-8): 8
Hex code (type L to list codes): 8e
Changed system type of partition 8 to 8e (Linux LVM)
Command (m for help): p
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 662 5116702+ 83 Linux
/dev/sda3 663 1044 3068415 83 Linux
/dev/sda4 1045 2610 12578895 5 Extended
/dev/sda5 1045 1426 3068383+ 83 Linux
/dev/sda6 1427 1808 3068383+ 83 Linux
/dev/sda7 1809 1935 1020096 82 Linux swap
/dev/sda8 1936 2179 1959898+ 8e Linux LVM
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name uservg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 20.00 GB
PE Size 4.00 MB
Total PE 5119
Alloc PE / Size 1280 / 5.00 GB
Free PE / Size 3839 / 15.00 GB
VG UUID RC3a86-rTJr-lTTC-7jrz-yiH0-B47h-nYKoLB
****15G ====> uservg
[root@localhost ~]# mkfs.ext3 /dev/sda8
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
123648 inodes, 246991 blocks
12349 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=255852544
8 block groups
32768 blocks per group, 32768 fragments per group
15456 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# pvcreate /dev/sda8
Physical volume "/dev/sda8" successfully created
[root@localhost ~]# vgextend uservg /dev/sda8
/dev/cdrom: open failed: No medium found
Volume group "uservg" successfully extended
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name uservg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 20.94 GB
PE Size 4.00 MB
Total PE 5360
Alloc PE / Size 1280 / 5.00 GB
Free PE / Size 4080 / 15.94 GB
VG UUID RC3a86-rTJr-lTTC-7jrz-yiH0-B47h-nYKoLB
***not even 1G????????????????????
It only added half of it. Is that suppose to be like that? Thanks.
---------- Post updated at 02:28 PM ---------- Previous update was at 02:16 PM ----------
Hi,
I need to add more space to an exsisting /u partition by adding an additional physical drive, so that the additional space is added in continuation to the exsisting /u diskspace. Is it possible...if yes....how do I go about it.
Thanks,
Amit (1 Reply)
I have a RHEL6 guest running on vmware esx server and the root disk size is 30G and i increased the disk size and create another partition /dev/sda3 but i do not know how to increase the size of the VG and then intrun LV .. can anyone help me on this .
fdisk -l /dev/sda
Disk /dev/sda:... (1 Reply)
Hi,
I have a server booted into sysresccd (mini-linux OS) with 1 40 GB disk attached
I am trying to create a volume group and restore another server into the new one
However, when I try to create a partition for /boot it seems that my VG in LVM is not recognized anymore
These are the... (2 Replies)
Hi guys,
let me start by saying I appreciate your assistance always.
I was practicing how to encrypt partitions in my server. I encrypted an lvm partition using luks and when I tried to remove the partition using lvremove, I get this message
Logical volume vg10/lvol1 is used by another... (2 Replies)
Hi,
I need a suggesstion i have 2 disk if i installed OS / root partition by making Lvm in one disk and data in other disk also with the lvm, means 2 different lvms.
Is making LVM partition for OS disk will the performacne will be good?
Can i make 2 different lvm one is for OS and other for... (1 Reply)
Hello All,
I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows,
/boot - Linux Partition & another is
LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc).
Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Hi ,
Background : I am installing the KVM based RHEL OS VM on one of the HP pro-line physical server.
Issue: While doing custom layout partition, i want to create partition lvm based , for example :lv_root.
But problem is that, whenever i am creating the partition, its showing /sda1... (2 Replies)