LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-03-2012, 09:42 PM   #1
scratchyrat
LQ Newbie
 
Registered: May 2010
Location: United Kingdom
Distribution: Debian, Red Hat, AIX, Ubuntu, Fedora
Posts: 27

Rep: Reputation: 3
Sorting out disk partitions


I've recently inherited a server and the layout seems to be messy. The partitions look like this:

[me@server ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 139G 2.7G 129G 2% /
tmpfs 2.0G 0 2.0G 0% /dev/shm


Everything seems to be set up under one partition. If I got into / there are directories in there called /var /opt /home etc. This is not what I want. I'd rather have those set up as partitions similar to this example

Filesystem Size Used Avail Use% Mounted on
/dev/sda7 1012M 419M 542M 44% /
/dev/sdb1 147G 32G 108G 23% /backup
/dev/sda1 99M 22M 72M 24% /boot
none 982M 0 982M 0% /dev/shm
/dev/sda8 116G 14G 97G 13% /home
/dev/sda6 1012M 34M 927M 4% /tmp
/dev/sda2 15G 6.7G 7.0G 50% /usr
/dev/sda5 14G 9.6G 3.0G 77% /var
/tmp 1012M 34M 927M 4% /var/tmp


I'd also rather use LVM so I can extend/shrink file systems etc if I need to in future.

Whats the best way for me to go about this? I've googled it but everything seems to suggest using a GParted Live CD, not really an option for me, as is reinstalling the OS and redoing the partitions (which I would if I could)

Thanks in Advance
 
Old 03-03-2012, 11:25 PM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
Greetingz!

First things first, don't sweat /dev/shm.

Second, I would ask "What benefit would doing all this work have?".
a) Do you have a 'standard' filesystem structure for all your servers?
b) Is there a need to keep everything on this server? (or can you flatten and reload it?)

What happens if this server "breaks"?
a) Are there users that will notice.
b) Will you lose money due to the downtime?

You also mentioned something rather odd....
Quote:
using a GParted Live CD, not really an option for me, as is reinstalling the OS and redoing the partitions (which I would if I could)
It kind of sounds like you cannot afford to bring down the system...and doing something as drastic as resizing the main partition, using LVM, and/or replacing important filesystems (like /var) are absolutely out of the question for you.

You will need to bring this system down if you want to change the partition & filesystem layout.
 
1 members found this post helpful.
Old 03-04-2012, 08:37 AM   #3
scratchyrat
LQ Newbie
 
Registered: May 2010
Location: United Kingdom
Distribution: Debian, Red Hat, AIX, Ubuntu, Fedora
Posts: 27

Original Poster
Rep: Reputation: 3
Hi

Quote:
Second, I would ask "What benefit would doing all this work have?".
a) Do you have a 'standard' filesystem structure for all your servers?
b) Is there a need to keep everything on this server? (or can you flatten and reload it?)
The benefit would be I'm going to be running a LAMP setup on this, and I wouldn't want say the backups or something else to potentially fill up the whole (single) partition I have and stop the server working. This server is hosted in a datacentre and my budget is not great for doing things, hence not wanting to take it down or reload everything as that would involve me probably having to pay the hosts to assist. I've already done some configuration before I checked the df command, but I could redo this if I have to.

Quote:
What happens if this server "breaks"?
a) Are there users that will notice.
b) Will you lose money due to the downtime?
The server is not currently live so no, no-one will notice and we will not loose money. My concern is taking it down to single user mode and then getting in a mess and having to pay high support fees. If that is what happens I'll have to deal with it and pay, but I'd rather not

I can take it down to single user mode and still access the server via ssh (tested it the other day and it worked) so I think it will be possible, but I can't use a liveCD as I don't think I have a way of adding the media, unless I can do it via KVM.

Is there a way to do this in single user mode?
 
  


Reply



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
Disk Partitions tekmann33 Linux - Newbie 4 02-21-2008 02:38 PM
Using disk partitions ecuas Linux - Newbie 3 01-24-2007 07:54 AM
removed disk partitions - disk is now too small jordanthompson Linux - Software 18 12-09-2004 03:07 PM
How many partitions on one disk? alanbarnard Linux - Newbie 3 12-04-2004 09:04 AM
Sorting out partitions - help needed! foxy123 Linux - Newbie 10 11-13-2004 06:27 PM

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

All times are GMT -5. The time now is 07:47 PM.

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
Open Source Consulting | Domain Registration