# ls -al /dev/xxxx/vol-e338e620
lrwxrwxrwx 1 root root 6 Feb 14 20:13 /dev/xxxx/vol-e338e620-> ../sdb
# fdisk -l /dev/sda
Disk /dev/sda: 64.4 GB, 64424509440 bytes
255 heads, 63 sectors/track, 7832 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009dda3
Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 7833 62606336 8e Linux LVM
# fdisk -l /dev/sdb
Disk /dev/sdb: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
# vgdisplay
--- Volume group ---
VG Name VOL
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 6
Open LV 6
Max PV 0
Cur PV 1
Act PV 1
VG Size 59.69 GiB
PE Size 32.00 MiB
Total PE 1910
Alloc PE / Size 1910 / 59.69 GiB
Free PE / Size 0 / 0
VG UUID YthGca-Su6c-LgkQ-5Miy-XIOI-heyb-da4nuO
# fdisk /dev/sdb
n - create a new partition
p - specify primary
[enter] x2 - use the entire disk
t - change type
8e - Linux LVM type
w - write partition table to disk and exit
Device Boot Start End Blocks Id System
/dev/sdb1 1 32635 262140606 8e Linux LVM
# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
# vgextend /dev/VOL /dev/sdb1
Volume group "VOL" successfully extended
# lvextend -L +100G /dev/VOL/opt
Size of logical volume VOL/opt changed from 7.72 GiB (247 extents) to 107.72 GiB (3447 extents).
Logical volume opt successfully resized
# lvextend -L +100G /dev/VOL/var
Size of logical volume VOL/var changed from 5.94 GiB (190 extents) to 105.94 GiB (3390 extents).
Logical volume var successfully resized.
# resize2fs /dev/VOL/var
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/VOL/var is mounted on /var; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 7
Performing an on-line resize of /dev/VOL/var to 27770880 (4k) blocks.
The filesystem on /dev/VOL/var is now 27770880 blocks long.
# resize2fs /dev/VOL/opt
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/VOL/opt is mounted on /opt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 7
Performing an on-line resize of /dev/VOL/opt to 28237824 (4k) blocks.
The filesystem on /dev/VOL/opt is now 28237824 blocks long.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VOL-root 32G 2.3G 28G 8% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda1 283M 32M 236M 12% /boot
/dev/mapper/VOL-home 2.9G 4.6M 2.8G 1% /home
/dev/mapper/VOL-opt 106G 4.8G 96G 5% /opt
/dev/mapper/VOL-tmp 7.5G 48M 7.1G 1% /tmp
/dev/mapper/VOL-var 105G 2.5G 97G 3% /var
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
25 | |
17 | |
13 | |
7 | |
7 | |
7 | |
6 | |
6 | |
6 |