?
Solved

Linux

Posted on 2011-05-11
35
Medium Priority
?
306 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:tamirmilo
  • 12
  • 12
  • 10
  • +1
35 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 2000 total points
ID: 35736986
So you want to create symlink of /tmp to some other directory.

Empty /tmp
rm -rf /tmp/*

Then create symlink
ln -s /tmp /path/of/symlink
0
 

Author Comment

by:tamirmilo
ID: 35737030
Is there a different way (simple one) on how to increase the /tmp?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737141
Ok. Please issue the following commands:

pvdisplay
pvs

vgdisplay
vgs

lvmdiskscan

df -hT
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 12

Expert Comment

by:upanwar
ID: 35737212
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.

0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737233
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.
0
 

Author Comment

by:tamirmilo
ID: 35737280
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
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737314
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.


0
 

Author Comment

by:tamirmilo
ID: 35737334
ok. i am following you. thx
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737340
0
 

Author Comment

by:tamirmilo
ID: 35737370
@farzanj:
I need the commands... i am too scared to do it. thx
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737440
# 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
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737457
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

0
 

Author Comment

by:tamirmilo
ID: 35737603
@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
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737627
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
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737635
Sorry, too late.  You already deleted your partition.
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737638
Now issue the command.

# partprobe

and follow the rest steps.
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737655
Hey Farzani,

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

0
 

Author Comment

by:tamirmilo
ID: 35737660
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]
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737705
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
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737723
@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.
0
 

Author Comment

by:tamirmilo
ID: 35737724
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?
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737747
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
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737758
You can define the size for /tmp as per your requirement.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737765
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.
0
 

Author Comment

by:tamirmilo
ID: 35737790
i already deleted. although i have a copy of the vm and snapshot
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737793
Since it was a blank partition so data was not a concern.

0
 

Author Comment

by:tamirmilo
ID: 35737830
actually, i had data... my big mistake..
I think i will revert back to the image
0
 

Author Comment

by:tamirmilo
ID: 35737849
@farzanj, i think i will have to use your method of not deleting the data in the partition...
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737867
I guess the output of df -k says that you was not having data.

0
 
LVL 12

Expert Comment

by:upanwar
ID: 35737874
But noe you have doubt so restore the VM again and follow the steps from Farzani.

@ Farzani: Please take care. :)
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35737955
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.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35738011
Say something.  What do you want to do?
0
 

Author Comment

by:tamirmilo
ID: 35738023
Guys. thanks for your help I will complete it all tonight.
0
 

Author Comment

by:tamirmilo
ID: 35738034
I am at work.. so, can not deal with it any more in the next two hours. I deeply thank both of you
0
 

Expert Comment

by:PENN_ZHANG
ID: 37658572
"delete a partition?" is always  dangerous  for a product system.
another time,better use "resize2fs".
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month16 days, 6 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question