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 12-02-2009, 02:10 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
Partitioning question


I want to partition a new server the same way an existing server is, and if the current is using LVM to use it on the new server, etc. How can I see exactly what's setup on the current server, so when I go to partition it during the RHEL install on the new server, i can match it to the current one?
 
Old 12-02-2009, 02:19 PM   #2
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 78
I'm not sure if I'm answering what you want.... But I think that you are asking how to view your current server partition information.

I don't know much about your system, but from the command line, login as root. Then run

fdisk -l

Last edited by bret381; 12-02-2009 at 02:21 PM.
 
Old 12-02-2009, 02:21 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
fdisk -l to see the partitions and, if you do have an LVM partition, read the pvdisplay and lvdisplay man pages. That only leaves you needing to know the file system types which df -T will give for all mounted file systems.
 
Old 12-02-2009, 02:37 PM   #4
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
well here's the output of those two commands, not quite sure I understand what exactly to use in the partitioning tool as I load the new server though.


fdisk -l
Disk /dev/sda: 146.5 GB, 146557370368 bytes
255 heads, 63 sectors/track, 17817 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 17817 143010630 8e Linux LVM


df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
ext3 136551432 15328448 114174588 12% /
/dev/sda1 ext3 101086 23353 72514 25% /boot
tmpfs tmpfs 517572 0 517572 0% /dev/shm
 
Old 12-02-2009, 07:56 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
df -h is easier to read, but basically those results are saying you've got one disk /dev/sda, divided into 2 partitions sda1, sda2.
sda1 = boot partition and quite small
sda2 = everything else and its an LVM

cat /etc/fstab

also worth a look.

RHEL Admin howto : http://www.linuxtopia.org/online_boo...ion/index.html
LVM HOWTO : http://tldp.org/HOWTO/LVM-HOWTO/

Basically, your system looks like it was a 'take all the defaults' install.
 
Old 12-02-2009, 09:05 PM   #6
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 78
chrism01, I wasn't aware of that command. Thanks
 
Old 12-03-2009, 09:10 AM   #7
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Thanks Chris. So I don't even have to change anything in the partitioning program? that makes this a lot easier then if that's true.
 
Old 12-03-2009, 10:01 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by rjo98 View Post
fdisk -l
Disk /dev/sda: 146.5 GB, 146557370368 bytes
255 heads, 63 sectors/track, 17817 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 17817 143010630 8e Linux LVM
This output raises a question. It says the disk is 146.5 GB and the cylinder information says it is all used. The 512 in "Units = cylinders of 16065 * 512 = 8225280 bytes" vaguely implies the block size is 512 bytes but the block information says the blocks are actually 1024 bytes. Why the different block sizes? I vaguely recall that default block sizes were 512 (on the small side for today's HDD capacities). When did it change -- or did various distros change the default at different times?
 
Old 12-03-2009, 10:04 AM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by chrism01 View Post
df -h is easier to read ...
Good point; I should have suggested it as well as fdisk.

@rjo98: df is used to show mounted file systems; fdisk is used to show partitions, some of which are usually not mounted.
 
Old 12-03-2009, 12:00 PM   #10
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
ok, thanks.

So I should just accept the installers defaults when I load the server then?
 
Old 12-03-2009, 12:24 PM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by rjo98 View Post
So I should just accept the installers defaults when I load the server then?
Maybe. When you started the thread you wrote "I want to partition a new server the same way an existing server is, and if the current is using LVM to use it on the new server, etc.". If the existing server was set up using the installer's defaults and if the installer's defaults haven't changed then the answer to your question is "yes" -- but those are big "if"s. Maybe somebody familiar with your distro can answer them. What is your distro?

This could start a long LVM discussion but ... the existing partition setup isn't very clever. Arguably there's little point in having / in LVM because:
  • ext3 cannot be resized while the file system is mounted
  • the partition / is in a) cannot be extended and b) cannot be snapshotted (great for backups, especially verification) because it is already using all the available space.
If you are interested in this, search LQ; there have been quite a few debates about the usefulness of LVM. It's a great tool but has pros and cons that make it a good choice in some circumstances and a poor one in others.
 
Old 12-03-2009, 01:30 PM   #12
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
it's RHEL

and the person who built the original server is no longer here.

I've never used LVM in my limited experience, never thought the pros would benefit me. these are/will be FTP servers also, if that makes a difference in all this.
 
Old 12-03-2009, 06:17 PM   #13
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
If the current system works ok, I'd prob just go with that.
Later on, when you become more expert you can consider fine tuning it. Not a trivial task, but do-able.
See those links of mine; the RHEL Admin covers LVM in some detail. The other link is just for an alternate/background view.
Just keep an eye on the logs and disk space regularly. As a rule, the default settings of the logrotate service keep your logs under ctrl, and are easy to tune.
Here's another good link http://linux.die.net/man/, see http://linux.die.net/man/8/logrotate
 
Old 12-04-2009, 09:06 AM   #14
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
ok, thanks Chris. I'll just let the installer do the default partitioning on the new server.
 
  


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
Can anyone help with this partitioning question, please. limeylew Linux - Hardware 3 12-22-2007 11:19 AM
Another Partitioning Question Wamzlee Mandriva 5 02-14-2005 05:11 PM
partitioning question pablowablo Linux - General 2 02-13-2005 12:38 AM
I have a question about partitioning... Wind_Sp00n Linux - Newbie 12 09-07-2004 03:29 AM
Partitioning Question dfu23 Linux - Newbie 4 11-11-2002 03:48 PM


All times are GMT -5. The time now is 01:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration