To increase the Zenoss appliance disk:
Shutdown Zenoss virtual machine.
Expand disk in vSphere.
Start virtual machine and connect either via console or SSH.
Commands are highlighted in bold.
[root@localhost ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 19 152586 83 Linux
/dev/sda2 20 280 2096482+ 82 Linux swap / Solaris
/dev/sda3 281 2610 18715725 8e Linux LVM
[root@localhost ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 5221.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 19 152586 83 Linux
/dev/sda2 20 280 2096482+ 82 Linux swap / Solaris
/dev/sda3 281 2610 18715725 8e Linux LVM
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Selected partition 4
First cylinder (2611-5221, default 2611):
Using default value 2611
Last cylinder or +size or +sizeM or +sizeK (2611-5221, default 5221):
Using default value 5221
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 ~]# reboot
[root@localhost ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 19 152586 83 Linux
/dev/sda2 20 280 2096482+ 82 Linux swap / Solaris
/dev/sda3 281 2610 18715725 8e Linux LVM
/dev/sda4 2611 5221 20972857+ 83 Linux
[root@localhost etc]# pvcreate /dev/sda4
Physical volume "/dev/sda4" successfully created
[root@localhost etc]# vgextend vg_root /dev/sda4
Volume group "vg_root" successfully extended
[root@localhost etc]# vgdisplay vg_root | grep "Free"
Free PE / Size 669 / 20.91 GB
[root@localhost etc]# lvextend -L+20G /dev/vg_root/lv_root
Extending logical volume lv_root to 28.00 GB
Logical volume lv_root successfully resized
[root@localhost etc]# resize2fs /dev/vg_root/lv_root
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/vg_root/lv_root is mounted on /; on-line resizing required
Performing an on-line resize of /dev/vg_root/lv_root to 7340032 (4k) blocks.
The filesystem on /dev/vg_root/lv_root is now 7340032 blocks long.
[root@localhost etc]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root
28G 7.4G 19G 29% /
/dev/mapper/vg_root-lv_var_lib_mysql
5.8G 761M 4.8G 14% /var/lib/mysql
/dev/mapper/vg_root-lv_zenoss_perf
3.0G 84M 2.7G 3% /opt/zenoss/perf
/dev/sda1 145M 13M 125M 10% /boot
tmpfs 1.5G 56K 1.5G 1% /dev/shm
No comments:
Post a Comment