Re: [CentOS-es] Redimencionar HDD Centos Virtual
Yo ya resolvi mi problema con samba resulta que necesitaba asi como tu redimensionar mi disco porq me habia quedado sin PE en el volumen Si estas trabajando con LVM, y es el mismo disco solo que lo haz redimensionado, deberas igual particionar el nuevo espacio del disco con fdisk para que sea reconocido por centos con un numero. luego la nueva particion prepararla con pvcreate para que la reconozca el volumen, luego vgextend para adicionar la nueva particion al volumen existente, luego lvresize para pasar el nuevo espacio de disco a uno de los logical volumey al final ejecutar resize2fs, no pongo el detalle de los comandos xq puedes consultarlo con el man o el google, sigue el orden indicado y no tendras problemas. - SIMON A. CORDOVA RIVERA JEFE DE INFORMATICA FUNDICION VENTANILLA S.A. Telf. 5770066 (Ext 22) RPC. 989030055 informat...@funvesa.com.pe ___ CentOS-es mailing list CentOS-es@centos.org http://lists.centos.org/mailman/listinfo/centos-es
Re: [CentOS-es] Redimencionar HDD Centos Virtual
Todo bien, salvo que el Reinicio NO era necesario :) Si hubiese sido maquina en produccion te castigaba :) Saludos! 2011/8/2 Federico Don federico.do...@gmail.com Solucionado, dejo tutorial, gracias a todos! Primero verificamos el estado del disco antes de hacer los cambios [root@localhost ~]# df -h FilesystemSize Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 97G 3.0G 89G 4% / /dev/sda1 99M 13M 82M 14% /boot tmpfs 187M 0 187M 0% /dev/shm [root@localhost ~]# fdisk -l Disk /dev/sda: 107.3 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 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 13054 104751832+ 8e Linux LVM Ahora paramos la VM para hacer un grow del disco con: [root@localhost ~]# shutdown -h now Ampliamos el disco de 100GB a 200GB desde vCenter (recuerda de borrar los snapshots para poder ampliar el disco) y levantamos la VM [root@localhost ~]# df -h FilesystemSize Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 97G 3.0G 89G 4% / /dev/sda1 99M 13M 82M 14% /boot tmpfs 187M 0 187M 0% /dev/shm [root@localhost ~]# fdisk -l Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 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 13054 104751832+ 8e Linux LVM Observa que el tamaño del disco /dev/sda ha cambiado a 214.7 GB Ahora cramos una partición con el nuevo espacio: [root@localhost ~]# fdisk /dev/sda The number of cylinders for this disk is set to 26108. 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): n --- Nueva partición Command action e extended p primary partition (1-4) p Partition number (1-4): 3 --- crearemos /dev/sda3 First cylinder (13055-26108, default 13055): Using default value 13055 Last cylinder or +size or +sizeM or +sizeK (13055-26108, default 26108): 26108 Using default value 26108 Command (m for help): t --- Cambiamos el tipo de partición a 8e para Linux Volume Manager Partition number (1-4): 3 Hex code (type L to list codes): 8e Changed system type of partition 3 to 8e (Linux LVM) Command (m for help): w --- Grabamos los cambios realizados 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 ~]# fdisk -l Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 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 13054 104751832+ 8e Linux LVM /dev/sda3 13055 26108 104856255 8e Linux LVM Ahora reiniciamos: [root@localhost ~]# reboot Tras reiniciar, preparamos la nueva partición, para ampliar /dev/VolGroup00/LogVol00 : Primero creamos el Volumen Lógico [root@localhost ~]# pvcreate /dev/sda3 Physical volume /dev/sda3 successfully created Ahora añadimos extendemos en Volume Group VolGroup00 (que vimos en el df -h) con el Volumen Físico creado [root@localhost ~]# vgextend VolGroup00 /dev/sda3 /dev/hdc: open failed: No medium found Volume group VolGroup00 successfully extended Verificamos que tenemos espacio libre no asignado, y que coincide, como esperabamos con el Volumen Físico añadido: [root@localhost ~]# vgdisplay /dev/hdc: open failed: No medium found --- Volume group --- VG Name VolGroup00 System ID Formatlvm2 Metadata Areas2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV0 Cur LV2 Open LV 2 Max PV0 Cur PV2 Act PV2 VG Size 199.84 GB PE Size 32.00 MB Total PE 6395 Alloc PE / Size 3196 / 99.88 GB Free PE / Size 3199 / 99.97 GB VG UUID sgvNZD-kr1q-CVV6-23Vf-xa83-1bh5-Xvg3e6 Ampliamos Volumen Lógico /dev/VolGroup00/LogVol00 con el espacio que nos aporta
Re: [CentOS-es] Redimencionar HDD Centos Virtual
Jajajaja es verdad, no aclare que fue realizado sobre una vm de prueba!! Saludos y gracias a todos por su tiempo. 2011/8/2 Carlos Tirado Elgueta carlos.tir...@gmail.com Todo bien, salvo que el Reinicio NO era necesario :) Si hubiese sido maquina en produccion te castigaba :) Saludos! 2011/8/2 Federico Don federico.do...@gmail.com Solucionado, dejo tutorial, gracias a todos! Primero verificamos el estado del disco antes de hacer los cambios [root@localhost ~]# df -h FilesystemSize Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 97G 3.0G 89G 4% / /dev/sda1 99M 13M 82M 14% /boot tmpfs 187M 0 187M 0% /dev/shm [root@localhost ~]# fdisk -l Disk /dev/sda: 107.3 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 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 13054 104751832+ 8e Linux LVM Ahora paramos la VM para hacer un grow del disco con: [root@localhost ~]# shutdown -h now Ampliamos el disco de 100GB a 200GB desde vCenter (recuerda de borrar los snapshots para poder ampliar el disco) y levantamos la VM [root@localhost ~]# df -h FilesystemSize Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 97G 3.0G 89G 4% / /dev/sda1 99M 13M 82M 14% /boot tmpfs 187M 0 187M 0% /dev/shm [root@localhost ~]# fdisk -l Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 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 13054 104751832+ 8e Linux LVM Observa que el tamaño del disco /dev/sda ha cambiado a 214.7 GB Ahora cramos una partición con el nuevo espacio: [root@localhost ~]# fdisk /dev/sda The number of cylinders for this disk is set to 26108. 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): n --- Nueva partición Command action e extended p primary partition (1-4) p Partition number (1-4): 3 --- crearemos /dev/sda3 First cylinder (13055-26108, default 13055): Using default value 13055 Last cylinder or +size or +sizeM or +sizeK (13055-26108, default 26108): 26108 Using default value 26108 Command (m for help): t --- Cambiamos el tipo de partición a 8e para Linux Volume Manager Partition number (1-4): 3 Hex code (type L to list codes): 8e Changed system type of partition 3 to 8e (Linux LVM) Command (m for help): w --- Grabamos los cambios realizados 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 ~]# fdisk -l Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 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 13054 104751832+ 8e Linux LVM /dev/sda3 13055 26108 104856255 8e Linux LVM Ahora reiniciamos: [root@localhost ~]# reboot Tras reiniciar, preparamos la nueva partición, para ampliar /dev/VolGroup00/LogVol00 : Primero creamos el Volumen Lógico [root@localhost ~]# pvcreate /dev/sda3 Physical volume /dev/sda3 successfully created Ahora añadimos extendemos en Volume Group VolGroup00 (que vimos en el df -h) con el Volumen Físico creado [root@localhost ~]# vgextend VolGroup00 /dev/sda3 /dev/hdc: open failed: No medium found Volume group VolGroup00 successfully extended Verificamos que tenemos espacio libre no asignado, y que coincide, como esperabamos con el Volumen Físico añadido: [root@localhost ~]# vgdisplay /dev/hdc: open failed: No medium found --- Volume group --- VG Name VolGroup00 System ID Formatlvm2 Metadata Areas2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV0 Cur LV2 Open LV 2 Max PV0 Cur PV2 Act PV2
Re: [CentOS-es] Redimencionar HDD Centos Virtual
No entendio, el Disco es Virtual??? Si aun tienes espacio en el sda te recomiendo que crees una nueva particion y lo etiquetes como LVM. Despues esa nueva particion lvm la inicializas y agregas al grupo VolGroup00 que tienes en tu maquina. Despues de eso, extiendes tu volumen logico LogVol00 en +X cantidad de GB finalmente, extiendes en el sistema de archivos con resize2fs :) Saludos! 2011/8/1 Federico Don federico.do...@gmail.com Buenas, es mi primer desafio y soy muy novato para esto, agradeceria ayuda, tengo una virtual con centos, la cual necesito mas espacio en disco. Agrande el disco virtual de 100GB a 150GB. En el Centos= # fdisk -l *Disk /dev/sda: 161.0 GB, 161061273600 bytes* 255 heads, 63 sectors/track, 19581 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 13054 104751832+ 8e Linux LVM* # df -h FilesystemSize Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 *97G 3.1G 89G 4% /* /dev/sda1 99M 13M 82M 14% /boot tmpfs 187M 0 187M 0% /dev/shm Como puedo agregar el espacio en disco al Filesystem en el / ?? Gracias a todos! ___ CentOS-es mailing list CentOS-es@centos.org http://lists.centos.org/mailman/listinfo/centos-es -- Carlos Francisco Tirado Elgueta Google AdWords Professional (GAP) http://www.ChileMedios.com http://www.chilemedios.com/ Red Hat Certified Engineer (RHCE) 805010694850055. http://www.LinuxSupport.cl http://www.linuxsupport.cl/ ___ CentOS-es mailing list CentOS-es@centos.org http://lists.centos.org/mailman/listinfo/centos-es