LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-25-2011, 05:42 AM   #1
samuel882
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Rep: Reputation: Disabled
Partitions questions


Hi
I am very new to linux OS
I have a server CENTOS 5.6 x86_64 standard
This server have 8 Hardisks running on RAID 5 with one HD as hot spare
The capacity is 300GB per hardisk
and the total current usage is as belows:

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 1.7T 545G 1019G 35% /
/dev/sda2 996M 614M 331M 66% /tmp
/dev/sda3 996M 614M 331M 66% /tmp
/dev/sdb1 1.8T 77G 1.7T 5% /mnt/usb/backup


I knew there is something wrong on /tmp which mounted on two separated partitions ; this configurations done by the previous admin
1) What is the procedure to move the /tmp only to use in one partitions
2) The /var partition is mounted but it is not showing in df -h command
Here is my fstab file looks like

LABEL=/ / ext3 defaults 1 1
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/swap /swap ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/tmp /var/tmp ext3 defaults,bind,noauto 0 0
/dev/sdb1 /mnt/usb/backup ext3 defaults,noexec 0 0
 
Old 08-25-2011, 05:52 AM   #2
allwimb
Member
 
Registered: Aug 2011
Posts: 47

Rep: Reputation: Disabled
To know what partitions are mounted use the mount command with no options/parameters.

If you want to move the /tmp into an individual partition you have first to create the partition and format it using ext4 or ext3. And then mount it into /tmp but you've to be carreful you need to set the right permissions of that folder (stickybit).

I suggest you to do all that using a live CD.

spring logout

Last edited by allwimb; 12-12-2011 at 06:47 AM.
 
Old 08-25-2011, 05:56 AM   #3
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Lightbulb

I assume you want to use 100% of sda on 1 partition


-- Back up data ( to separate drive is safest or to the partition you are keeping )

-- un mount drive

-- delete partition 2

--- re size partition 1 to the size of the disk

-- update fstab


The simplest tool for deleting and re sizing in my opinion is gparted.

Hope this helps.
 
Old 08-25-2011, 07:14 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hi samuel882,

if it works, do nothing!

as you write it is a server with RAID5. Before changing anything, try to contact the guy who installed the server and ask him about the issue with two partitions for /tmp.

And be sure to read about RAID. And do nothing before you're 100% sure what you're doing!

Markus
 
Old 08-25-2011, 10:27 PM   #5
samuel882
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
markush
I couldnt contact the previous admin who did that coz he already left our company
I am totally new to linux, previously I am the Windows servers admin
Could someone please guide me step by step on how to change the /tmp partitions settings to the correct one

Thanks in advance
 
Old 08-26-2011, 01:16 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Quote:
Originally Posted by samuel882 View Post
...
I am totally new to linux, previously I am the Windows servers admin...
I'm a Windows Admin as well, but I am using Linux since about 17 Years. My experience is that Windows-knowledge is completely useless when it come to Linux. You're not the admin, your the newbie. Be careful not to damage a server.
Quote:
Could someone please guide me step by step on how to change the /tmp partitions settings to the correct one...
How about reading the manuals? As you know, Linux is much about reading, read the manpages. Read about Raid with Linux, build a testbox, test your knowledge.

My opinion: as an admin using a step by step guide provided by a person you don't know and without any own knowledge..... you should consider if you've got the right job.

Markus
 
Old 08-26-2011, 06:18 AM   #7
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
Harsh but true........................
 
Old 08-29-2011, 04:37 PM   #8
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2
Posts: 316

Rep: Reputation: 76
To reiterate. DO NOT TOUCH
You will regret it (been there, touched it, spent considerable time putting it back the way it was)
Most anyone will need considerable time to research what particular special feature this is performing. May get lucky and someone will recognize this.
- That is the /etc/fstab (what can be mounted and how), but what is the /etc/mtab (what is mounted now) ??
- What are the /proc reported mounts ??
- /tmp is a heavily used temporary directory. Strange things are sometime done to it to speed things up. On a server, especially.
- The two /tmp are the exact size, it looks like mirroring at first glance (but that may be wrong).
- How does your raid mount two directories to share the workload ??
- One of the /tmp in fstab is set to noauto. How is that getting mounted then ?? Check your /etc/rc.d files for mount commands.
- One is really mounted under /tmp, but the other is mounted under /var/tmp, but with the LABEL=/tmp.
They are mounting in two different locations. You can verify this by looking at /tmp and /var/tmp.
Is this some trick to accomplish something more tricky. Why did they need the same name ??

- If Linux allows it, and you are not getting error messages, then it is probably allowable, and most probably setup to solve some server problem !!!
- checkout the /usr/doc/LINUX-HOWTO/*Raid* (capitalization may vary)

Last edited by selfprogrammed; 08-29-2011 at 04:49 PM.
 
Old 08-29-2011, 10:07 PM   #9
samuel882
LQ Newbie
 
Registered: Aug 2011
Posts: 12

Original Poster
Rep: Reputation: Disabled
I have tried to change the config using fdisk command
Here is now the partition looks like

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 1.7T 550G 1013G 36% /
/dev/sda3 996M 610M 335M 65% /tmp
tmpfs 63G 0 63G 0% /dev/shm

Could anyone advise me will this works fine?

/dev/sda1 is having a large size and I want to move some important folders ; such as /home ; /etc etc...out of that partition

What is the proper way to do so?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A few Questions about Data Partitions Jeff91 Linux - Newbie 3 08-24-2009 10:47 AM
Questions on partitions bhert SUSE / openSUSE 9 10-01-2006 06:06 PM
swap partitions questions Mr-Imbroglio Slackware 2 02-18-2005 01:47 PM
Parted and Partitions questions Mega Man X Linux - Software 2 09-22-2003 12:22 AM
Partitions Questions. hi-c Linux - General 4 11-10-2002 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration