Hi
I am using oracle linux 6.4. My hard drive capacity is 500 GB. my filesystem size onbly 50GB. I would like to extend my filesystem size to around 100GB. I tried many codes but still I am not able.
this is the output of df -h :
Otherwise the free space may be unpartitioned and we need to take different steps.
Hi
Thanks for your reply. this is the output of the pvs. I don't have free spaces. I have tried your code before, but because of the freespace I won't be able to extend the filesystem size.
I appreciate if you help me.
Output of pvs :
Is Linux running in a virtual machine, or on the physical hardware?
Assuming the latter, it's likely that the remaining ~450 GB is unpartitioned, depending on what options you selected during the installation.
You can check in fdisk, or the graphical palimpsest partitioning tool, if you prefer. You can create a new partition of the required size.
For example, here's an example where I've created a new partition of 5GB from unpartitioned space on /dev/sda, using fdisk:
Code:
[root@admin ~]# fdisk -uc /dev/sda
Command (m for help): p
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003bc8c
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 13314047 6144000 8e Linux LVM
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First sector (13314048-41943039, default 13314048): (pressed Enter to accept default)
Using default value 13314048
Last sector, +sectors or +size{K,M,G} (13314048-41943039, default 41943039): +5G
Command (m for help): p
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003bc8c
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 13314047 6144000 8e Linux LVM
/dev/sda3 13314048 23799807 5242880 83 Linux
Command (m for help): t
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): p
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003bc8c
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 13314047 6144000 8e Linux LVM
/dev/sda3 13314048 23799807 5242880 8e Linux LVM
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Everything I typed is in red. You'll need to reboot to update the partition table.
Now run these commands, substituting volume, volume group, logical volume names and sizes for your own:
Code:
[root@admin ~]# pvcreate /dev/sda3 # <-- for me this is what is new, in blue, above
Physical volume "/dev/sda3" successfully created
[root@admin ~]# vgextend rootvg /dev/sda3
Volume group "rootvg" successfully extended
[root@admin ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 rootvg lvm2 a-- 5.84g 320.00m
/dev/sda3 rootvg lvm2 a-- 4.97g 4.97g
/dev/sdb dist01vg lvm2 a-- 20.00g 0
[root@admin ~]# vgdisplay -s
"dist01vg" 20.00 GiB [20.00 GiB used / 0 free]
"rootvg" 10.81 GiB [5.53 GiB used / 5.28 GiB free]
[root@admin ~]#
[root@admin ~]# lvextend -L+5G /dev/mapper/rootvg-rootlv # <-- You can substitute -l+100%FREE for -L+5G if there isn't quite 5GB of free space
Extending logical volume rootlv to 9.03 GiB
Logical volume rootlv successfully resized
[root@admin ~]# resize2fs /dev/mapper/rootvg-rootlv
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/rootvg-rootlv is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/mapper/rootvg-rootlv to 2367488 (4k) blocks.
The filesystem on /dev/mapper/rootvg-rootlv is now 2367488 blocks long.
If Linux is running in a virtual machine, you should add a new hard disk, then run the same commands for (probably) /dev/sdb.
Dear Scott
Thanks alot for your reply. I have followed your code for creating a new partition and I assigned +100G to this. everything was successfull and as you were requested to do a reboot to update the partition, I made a reboot. But I am not able to to access to my GUI. and I'm having an error that is :
Code:
****An error ocurred during the file system check.
**** Dropping you to a shell; the system will reboot
****when you leave the shell.
****Warning -- SELinux is active
****Disabling security enforment for system recovery.
**** Run 'setenforce 1' to reenable.
, I run the fsck but it is just hanging, showing pages like matrix and just passing numbers fast. I don't whats happened to my OS.
anyway, maybe I format my pc. But as you mention is it possible to just partition the freespace during OS installation. I want to install Oracle Linux 6.4
I haven't seen any pages during installation regarding to the partitions .
I really appreciate your help and support
Last edited by Scott; 11-28-2013 at 07:15 AM..
Reason: Code tags
I an trying to increase the file size on an AIX 5.3 box. I think i am missing the correct syntax for the command. Here is was i am trying on a test box
# lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 0000bd8b00004c00000
0010d8ed7a76e
VG STATE: active ... (3 Replies)
Hi all,
Do i need to increase the logical volume each time i increase the filesystem?
or is enough to increase the filesystem and the logical volume get increase automatically?
extendlv hd4 1
chfs -a size=2G /tmp
or just
chfs -a size=2G /tmp
Code tags! (4 Replies)
Hello,
in one default UFS filesystem we have 8K block size (bsize) and 1K fragmentsize (fsize). At this scenary I thought all "FileSytem IO" will be 8K (or greater) but never smaller than the fragment size (1K). If a UFS fragment/blocksize is allwasy several ADJACENTS sectors on disk (in a ... (4 Replies)
I have a solaris zone of 12 GB and i have to increase the / filesystem to 31GB as requested. Earlier I had expanded filesystems other than / by setting quota to new value like "zfs set quota=new value mountpoint" but I am not sure whether its a good practice in zfs because by default in my... (5 Replies)
How to increase the filesystem size in HACMP.
what is the difference between normal chfs command and increase the filesystem size in HACMP. (4 Replies)
Hi..
I want to increase the file system size of any filesystem online, without using the Volume manager like LVMs, is it possible? & if yes then how? (3 Replies)
Hi All,
I need to increase the filesystem of / and /var (two different slices)? Space will be coming from /home slice so I need to decrease it. Is that possible without reinstallation or in a single-user-mode?
Any idea or link please.
Thanks in advance. (5 Replies)
Hi
my file system size /hd4 is keep on increasing continuously , i tried all the performance related command to identify which process is currently running........
for every minute my FS(/hd4) size is increasing ?what could be the problem?
how to diagnose it ?
is there any specific command... (3 Replies)