Link to home
Start Free TrialLog in
Avatar of tamirmilo
tamirmiloFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Linux

Hello,
I am using LInux Oracle Enterprise (Red-Hat) 64 Bit
I need to increase TEMP spcae in order to install an Oracle product.

 "Checking temp space: 1011 MB available, 1536 MB required.    Failed <<<"

Disk1]$ df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      29233944  26695432   1029548  97% /
/dev/sda1               101086     30987     64880  33% /boot
/dev/sdb1            1032117684    204276 979484884   1% /ora_products
tmpfs                  1977020    421420   1555600  22% /dev/shm
.host:/              1452148732 1048672996 403475736  73% /mnt/hgfs

I tried to remove /tmp and create link to another location but that does not work for me.
Can any one help with that please?
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tamirmilo

ASKER

Is there a different way (simple one) on how to increase the /tmp?
Ok. Please issue the following commands:

pvdisplay
pvs

vgdisplay
vgs

lvmdiskscan

df -hT
Hi tamirmilo,

Exatly your system's / partition in almost, you dont have saperate /tmp partion so it is taking space from the / partion.

Now bottom of the line is either you have to increase your / root partion or you have to add separate disk to create separate /tmp partition.

After looking your output of df -k, I can suggest you a way. Its upon you to take it or not.

You have fresh partion and dont have data on it.

/dev/sdb1            1032117684    204276 979484884   1% /ora_products

so you can repartion the disk /dev/sdb and create two partition on it. One small 2GB or 3GB partition for /tmp and rest you can keep for /ora_products.

Please let me know, if you want ot do the same and need any assistance.
Hi upanwar farzanj ,

FYI, It is all under vmware.

@upanwar:
I would like to use the "huge" partition of 1 tera as a  "tmp" area.

@farzanj

[root@jnora11g /]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               31.90 GB / not usable 23.41 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              1020
  Free PE               0
  Allocated PE          1020
  PV UUID               VxjhKx-j59P-w1cJ-BOJe-UxQ9-xO1X-UuosI5
   
[root@jnora11g /]# pvs
  PV         VG         Fmt  Attr PSize  PFree
  /dev/sda2  VolGroup00 lvm2 a-   31.88G    0

[root@jnora11g /]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               31.88 GB
  PE Size               32.00 MB
  Total PE              1020
  Alloc PE / Size       1020 / 31.88 GB
  Free  PE / Size       0 / 0  
  VG UUID               IEJeBb-7oAe-HqoY-VHtb-N8Yh-96gi-m6haGm
   
[root@jnora11g /]# vgs
  VG         #PV #LV #SN Attr   VSize  VFree
  VolGroup00   1   2   0 wz--n- 31.88G    0


[obi@jnora11g Disk1]$ lvmdiskscan
-bash: lvmdiskscan: command not found
[obi@jnora11g Disk1]$ df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
              ext3     28G   26G  998M  97% /
/dev/sda1     ext3     99M   31M   64M  33% /boot
/dev/sdb1     ext3    985G  200M  935G   1% /ora_products
tmpfs        tmpfs    1.9G  412M  1.5G  22% /dev/shm
.host:/     vmhgfs    1.4T 1003G  383G  73% /mnt/hgfs

Thank you very much experts
As per the details you have given there is no scop to increase the space so I am giving you steps to repartion /dev/sdb.


ok. i am following you. thx
@farzanj:
I need the commands... i am too scared to do it. thx
# sudo fdisk /dev/sdb

Command (m for help): d

Command (m for help): w

Command (m for help): n
Command action
e extended
p primary partition (1-4)

p
Partition number (1-4): 1
First cylinder (1-xxxxx, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-xxxxx, default xxxxx): +3G

Command (m for help): t
Select id 83


Command (m for help): n
Command action
e extended
p primary partition (1-4)

p
Partition number (1-4): 1
First cylinder (1-xxxxx, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-xxxxx, default xxxxx):

Command (m for help): t
Select id 83

Command (m for help): w


# sudo partprobe

# sudo mkfs.ext3 /dev/sdb1

# sudo mkfs.ext3 /dev/sdb2

# mount /dev/sdb1 /tmp

# mount /dev/sdb2 /ora_products


To mount these partion after reboot please make an enty in fstab file as well as given below.

/dev/sdb1 /tmp ext3 defaults 1 1

/dev/sdb2 /ora_products ext3 defaults 1 1
Ooops, one correction.

When second time n then choose 2 instead of 1, because 1 partion is already created.

Command (m for help): n
Command action
e extended
p primary partition (1-4)

p
Partition number (1-4): 2
First cylinder (xxxx-xxxxx, default xxxx):
Using default value xxxx
Last cylinder or +size or +sizeM or +sizeK (1-xxxxx, default xxxxx):

Command (m for help): t
Select id 83

Command (m for help): w

@upanwar:
REsource is busy.. what shall i do ? thank you very much
[root@jnora11g /]# sudo fdisk /dev/sdb

The number of cylinders for this disk is set to 130541.
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): d
Selected partition 1

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@jnora11g /]# n
bash: n: command not found
You can simply resize your /dev/sdb1.

I will have to do interactive work with you.

First you should resize the filesystem on /dev/sdb1

resize2fs /dev/sdb1 -20G
Sorry, too late.  You already deleted your partition.
Now issue the command.

# partprobe

and follow the rest steps.
Hey Farzani,

The command you have shown is to resize the filesystem, still partition needs to be resized as well to create free space.

Looks like we will have to do it interactively.

[root@jnora11g /]# resize2fs /dev/sdb1 -20G
resize2fs 1.39 (29-May-2006)
resize2fs: invalid option -- 2
Usage: resize2fs [-d debug_flags] [-f] [-F] [-p] device [new_size]
Ok, if you still have the filesystem intact, you can do

resize2fs /dev/sdb1 <SIZEinGB>G

So this should be the size you want after you reduce your filesystem.  So if currently your size is 985G and you want 955G then
resize2fs /dev/sdb1 955G

Hope that works.

Next step would be with parted
@Upanwar:
You are absolutely correct.  First you resize file system.  If you don't then you damage it.  Next you use parted to reduce the partition size.
guys.. i am confused. THis is a vm. I can go back to the state before if needed.
you say:

Now issue the command.
# partprobe
"and follow the rest steps." -- from where ?  just after the partprobe above?
Now execute below given commands.

# partprobe

# fdisk /dev/sdb

Command (m for help): n
Command action
e extended
p primary partition (1-4)

p
Partition number (1-4): 1
First cylinder (1-xxxxx, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-xxxxx, default xxxxx): +10G

Command (m for help): t
Select id 83


Command (m for help): n
Command action
e extended
p primary partition (1-4)

p
Partition number (1-4): 2
First cylinder (1-xxxxx, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-xxxxx, default xxxxx):

Command (m for help): t
Select id 83

Command (m for help): w


# sudo partprobe

# sudo mkfs.ext3 /dev/sdb1

# sudo mkfs.ext3 /dev/sdb2

# mount /dev/sdb1 /tmp

# mount /dev/sdb2 /ora_products


To mount these partion after reboot please make an enty in fstab file as well as given below.

/dev/sdb1 /tmp ext3 defaults 1 1

/dev/sdb2 /ora_products ext3 defaults 1 1
You can define the size for /tmp as per your requirement.
I am leading you a complete different direction than expert Upanwar.  If you followed his way already and deleted the partition, my way is pointless.  My way was mean to save you from deleting partitions and recreating them -- saving data as well.  But if you deleted it already, you can follow the rest of steps by him.
i already deleted. although i have a copy of the vm and snapshot
Since it was a blank partition so data was not a concern.

actually, i had data... my big mistake..
I think i will revert back to the image
@farzanj, i think i will have to use your method of not deleting the data in the partition...
I guess the output of df -k says that you was not having data.

But noe you have doubt so restore the VM again and follow the steps from Farzani.

@ Farzani: Please take care. :)
Well, appeared to me there was less than 200M of data (excluding some metadata).  Upanwar already worked with you.  We both wanted to help.  Both ways would have worked.  I'm sorry, was just trying to help.  At the end, you should get help what you wanted.
Say something.  What do you want to do?
Guys. thanks for your help I will complete it all tonight.
I am at work.. so, can not deal with it any more in the next two hours. I deeply thank both of you
"delete a partition?" is always  dangerous  for a product system.
another time,better use "resize2fs".