How to resize a virtual disk on a Linux system
Virtual systems are much more flexible than physical servers, for instance you can
resize the virtual disk also you need to update LVM configurations.
[root@db2test ~]# pvs
/dev/cdrom: open failed: No medium found
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 14.88G 3.38G
/dev/sdb VGDATOS lvm2 a- 11.00G 96.00M
[root@db2test ~]# pvresize /dev/sdb
/dev/cdrom: open failed: No medium found
Physical volume "/dev/sdb" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
[root@db2test ~]# lvresize -L +1G /dev/VGDATOS/DB2
/dev/cdrom: open failed: No medium found
Extending logical volume DB2 to 9.90 GB
Logical volume DB2 successfully resized
[root@db2test ~]# resize2fs /dev/mapper/VGDATOS-DB2
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/VGDATOS-DB2 is mounted on /home/db2inst1; on-line resizing required
Performing an on-line resize of /dev/mapper/VGDATOS-DB2 to 2595840 (4k) blocks.
The filesystem on /dev/mapper/VGDATOS-DB2 is now 2595840 blocks long.
resize the virtual disk also you need to update LVM configurations.
[root@db2test ~]# pvs
/dev/cdrom: open failed: No medium found
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 14.88G 3.38G
/dev/sdb VGDATOS lvm2 a- 11.00G 96.00M
[root@db2test ~]# pvresize /dev/sdb
/dev/cdrom: open failed: No medium found
Physical volume "/dev/sdb" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
[root@db2test ~]# lvresize -L +1G /dev/VGDATOS/DB2
/dev/cdrom: open failed: No medium found
Extending logical volume DB2 to 9.90 GB
Logical volume DB2 successfully resized
[root@db2test ~]# resize2fs /dev/mapper/VGDATOS-DB2
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/VGDATOS-DB2 is mounted on /home/db2inst1; on-line resizing required
Performing an on-line resize of /dev/mapper/VGDATOS-DB2 to 2595840 (4k) blocks.
The filesystem on /dev/mapper/VGDATOS-DB2 is now 2595840 blocks long.
Comentarios
Publicar un comentario