Re: repartitioning: joining two partitions

2003-03-26 Thread Bob Hilliard
Vineet Kumar [EMAIL PROTECTED] writes:

  If you want 5 or more (usable partitions), you'll have to 
 create at least one extended partition.  Each extended partition can
 hold up to 4 more partitions.  

 An extended partition is not limited to 4 logical partitions.
From /usr/share/doc/HOWTO/en-txt/mini/Partition.gz:

 The primary partition used to house the logical partitions is
 called an extended partition and it has its own file system type
 (0x05). Unlike primary partitions, logical partitions must be
 contiguous. Each logical partition contains a pointer to the next
 logical partition, which implies that the number of logical
 partitions is unlimited. However, linux imposes limits on the
 total number of any type of partition on a drive, so this
 effectively limits the number of logical partitions. This is at
 most 15 partitions total on an SCSI disk and 63 total on an IDE
 disk.

Regards,

Bob
-- 
   _
  |_)  _  |_Robert D. Hilliard[EMAIL PROTECTED]
  |_) (_) |_)   1294 S.W. Seagull Way [EMAIL PROTECTED]
Palm City, FL 34990 USA   GPG Key ID: 390D6559 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: repartitioning: joining two partitions

2003-03-26 Thread Vineet Kumar
* Bob Hilliard [EMAIL PROTECTED] [20030326 09:58 PST]:
 From /usr/share/doc/HOWTO/en-txt/mini/Partition.gz:
 
  The primary partition used to house the logical partitions is
  called an extended partition and it has its own file system type
  (0x05). Unlike primary partitions, logical partitions must be
  contiguous. Each logical partition contains a pointer to the next
  logical partition, which implies that the number of logical
  partitions is unlimited. However, linux imposes limits on the

Thanks for the correction!  So each extended partition contains a linked
list of partitions, rather than a separate partition table.

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
http://www.debian.org/  Set your computer Free.


pgp0.pgp
Description: PGP signature


Re: repartitioning: joining two partitions

2003-03-25 Thread Joris Huizer
Hello,

Derrick, you're reply is very helpfull - but I've got
a new question based on the adjacency of partitions.

This is the partition table as it is:

hda: hda1
hdb: hdb1 hdb2 hdb3 hdb4  hdb5 hdb6 

the hda disk is where windows lives (for my dad)
the /tmp is on hdb3, /home is on /hdb5

the partition has an extended partition - or so was
it called - because when I made the partitions I was
using Redhat 8 - and their partition tool insisted on
creating an extended partition in order to have more
than 5 partitions - I still don't know why this should
be necessary but... well this is the situation.

As far as I understand the extended partition, /hdb4,
isn't a real partition so hdb3 would be next to hdb5 -
which means lvm would work.

Can you tell me wether this is correct (or, what the
real situation is with extended partitions ?)

Thanks,

Joris 

--- Derrick 'dman' Hudson [EMAIL PROTECTED] wrote:

...

 
 One prerequisite for merging two physical partitions
 (without using
 lvm) is that they are adjacent.
 
 HTH,
 -D
 
 -- 
 Don't use C;  In my opinion,  C is a library
 programming language
  not an app programming language.  - Owen Taylor
 (GTK+ developer)
  
 http://dman.ddts.net/~dman/
 

 ATTACHMENT part 2 application/pgp-signature 



__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: repartitioning: joining two partitions

2003-03-25 Thread Vineet Kumar
* Joris Huizer [EMAIL PROTECTED] [20030325 13:59 PST]:
 Hello,
 
 Derrick, you're reply is very helpfull - but I've got
 a new question based on the adjacency of partitions.
 
 This is the partition table as it is:
 
 hda: hda1
 hdb: hdb1 hdb2 hdb3 hdb4  hdb5 hdb6 
 
 the hda disk is where windows lives (for my dad)
 the /tmp is on hdb3, /home is on /hdb5
 
 the partition has an extended partition - or so was
 it called - because when I made the partitions I was
 using Redhat 8 - and their partition tool insisted on
 creating an extended partition in order to have more
 than 5 partitions - I still don't know why this should
 be necessary but... well this is the situation.
 
 As far as I understand the extended partition, /hdb4,
 isn't a real partition so hdb3 would be next to hdb5 -
 which means lvm would work.

Well, actually, LVM will work for non-adjacent partitions as well.  I
think dman said that you'll only be able to create a new, large
partition out of two smaller partitions without anything fancy (e.g.
lvm) if they are adjacent.

Also, hdb3 and hdb5 are not strictly adjacent in that sense.  The
problem is that the partition table is only big enough to store 4
entries.  So if you want 4 partitions, they can all just be regular
partitions.  If you want 5 or more (usable partitions), you'll have to 
create at least one extended partition.  Each extended partition can
hold up to 4 more partitions.  It does this by creating that dummy
extended partition which has another partition table at its beginning.
So in your case, hdb4 occupies all of the space of hdb5 and hdb6, and
includes a partition table specifying where hdb5 and hdb6 start and end.
So you can't delete hdb4 without deleting hdb5 and hdb6 first.  So you
can't just join hdb3 and hdb5.

One thing that will *probably* work (i.e. it looks like it should, but I
haven't done it so BACK BACK BACK UP UP UP your data if you're thinking
about trying this.  No wait, back it up anyway. =) is to write down the
blocks on which the existing partitions start and end, then create the
new ones in exactly the same places.

For example, in your case, if you wanted to join partitions 3 and 5, you
would go like this:

(you'll have to store the data from 3 and 5 somewhere else and create
restore it after creating a new, larger filesystem on the new, joined
partition ... or do some yet fancier moves with growing the existing
hdb3 filesystem to fill the new available space)

write down where 6 starts and ends
delete 6
delete 5
delete 4
delete 3
create a new Extended partition #3, filling all of the space from
where the old 3 started through where the old 6 ended (which is probably
all of the available space on the drive, and the defaults in the prompts
for whatever fdisk program you're using).
create a new partition #4, starting where the old 3 started and ending
where the old 5 ended.
create a new partition #5, starting where the old 6 started and ending
where the old 6 ended.

Now your old partition 6 is partition 5, and should be ready to mount
and use, without re-creating a new filesystem (the old one is still
there, and the new partition is in exactly the same place).

Your new partition 4 is the combination of your old partitions 3 and 5.
Your new partition 3 is the same as your old dummy partition 4.

Create a new filesystem on hdb4 (or grow the old one, if you decided to
go that route, which I didn't go into here), restore your data, update
your fstab, and Bob's your uncle!


That may have gotten a little out-of-hand ... I hope at least my initial
explanation helps, and that you can use the example to reinforce the
ideas in the explanation, even if you decide to use a little less voodoo
for your particular situation =)

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
Extremism in the defense of liberty is no vice.
Moderation in the pursuit of justice is no virtue.  -- Barry Goldwater 


pgp0.pgp
Description: PGP signature


Re: repartitioning: joining two partitions

2003-03-25 Thread Derrick 'dman' Hudson
On Tue, Mar 25, 2003 at 02:16:23PM -0800, Vineet Kumar wrote:
| * Joris Huizer [EMAIL PROTECTED] [20030325 13:59 PST]:
 
|  Derrick, you're reply is very helpfull - but I've got
|  a new question based on the adjacency of partitions.
[...]
| Well, actually, LVM will work for non-adjacent partitions as well.  I
| think dman said that you'll only be able to create a new, large
| partition out of two smaller partitions without anything fancy (e.g.
| lvm) if they are adjacent.

Correct.  LVM doesn't care where the partitions are (or even if
they're on the same disk).  You only care if they're adjacent if you
want to merge them without using lvm.

| One thing that will *probably* work (i.e. it looks like it should, but I
| haven't done it so BACK BACK BACK UP UP UP your data if you're thinking
| about trying this.  No wait, back it up anyway. =) is to write down the
| blocks on which the existing partitions start and end, then create the
| new ones in exactly the same places.

I can verify that it does work, at least for non-extended partitions.
I once overwrote my partition table by accident.  After using 'gpart'
to figure out exactly where the old partitions were, I was able to
recreate them using fdisk (or cfdisk) and the data wasn't lost.

| (you'll have to store the data from 3 and 5 somewhere else and create
| restore it after creating a new, larger filesystem on the new, joined
| partition ... or do some yet fancier moves with growing the existing
| hdb3 filesystem to fill the new available space)

True.

HTH,
-D

-- 
The nice thing about windoze is - it does not just crash,
it displays a dialog box and lets you press 'ok' first.
 
http://dman.ddts.net/~dman/


pgp0.pgp
Description: PGP signature


repartitioning: joining two partitions

2003-03-24 Thread Joris Huizer
Hello everybody,

I have the following question:
I have four partitions:
/, /tmp, /usr, /home

Is it possible to change the situation so that the
/tmp partition space becomes part of the /home (so the
/tmp is a normal folder in / ) ? It's usually hardly
used and I could use some space for my personal stuff.

Oh, and what is the name of the partition program
Debian uses during the installation? If possible, I'd
like to use that one for this

Thanks for any help,

Joris Huizer

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: repartitioning: joining two partitions

2003-03-24 Thread Jorge Santos
Joris Huizer [EMAIL PROTECTED] writes:

 Hello everybody,
 
 I have the following question:
 I have four partitions:
 /, /tmp, /usr, /home
 
 Is it possible to change the situation so that the
 /tmp partition space becomes part of the /home (so the
 /tmp is a normal folder in / ) ? It's usually hardly
 used and I could use some space for my personal stuff.
 
 Oh, and what is the name of the partition program
 Debian uses during the installation? If possible, I'd
 like to use that one for this
 

Read its documentation thoroughly, then, use parted.  You will also
have to modify the entry that refers to the /tmp entry in fstab (that
is, remove it) and do mkdir /tmp as root and change its persmissions
acordingly.

Greetings,

Jorge


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: repartitioning: joining two partitions

2003-03-24 Thread Alvin Oga

hi ya

On Mon, 24 Mar 2003, Joris Huizer wrote:

 Hello everybody,
 
 I have the following question:
 I have four partitions:
 /, /tmp, /usr, /home
 
 Is it possible to change the situation so that the
 /tmp partition space becomes part of the /home (so the
 /tmp is a normal folder in / ) ? It's usually hardly
 used and I could use some space for my personal stuff.

putting /tmp into a different partition is a bad idea

/tmp should always stand by itself .. same for /var and /home

if you need more disk space... buy another 10GB disk for $10
and save yourself hours of headaches if something goes wrong
( prices is about $1 - $2 per GB of disk now days )

c ya
alvin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: repartitioning: joining two partitions

2003-03-24 Thread Derrick 'dman' Hudson
On Mon, Mar 24, 2003 at 11:37:59AM -0800, Joris Huizer wrote:
| Hello everybody,
| 
| I have the following question:
| I have four partitions:
| /, /tmp, /usr, /home
| 
| Is it possible to change the situation so that the
| /tmp partition space becomes part of the /home (so the
| /tmp is a normal folder in / ) ? It's usually hardly
| used and I could use some space for my personal stuff.

Yes.  I recommend using lvm for this.

First you'll need to unmount /tmp (but be sure it isn't in use when
you do that).  Then comment out the entry in /etc/fstab.  Move all of
your data currently in /home to somewhere else and unmount it like
with /tmp.

Then use the lvm tools to create a volume group that contains the
physical partitions currently used for /home and /tmp.  In that volume
group, create a logical volume which you'll create a filesystem on and
then mount as /home.

Once you've done that you can move your data back to /home.  The lvm
system will handle distribution of the data across the physical
paritions (and disks, if you have multiple disks in the volume group)
transparently to the rest of the file system handling.

| Oh, and what is the name of the partition program
| Debian uses during the installation? If possible, I'd
| like to use that one for this

Probably 'cfdisk'.  In any case it's the one I often use.  Note,
though, that with a traditional disk partitioner, you must destroy the
current partitions in order to reallocate the space.

'parted' will allow limited editing of partitions without destroying
them.

One prerequisite for merging two physical partitions (without using
lvm) is that they are adjacent.

HTH,
-D

-- 
Don't use C;  In my opinion,  C is a library programming language
 not an app programming language.  - Owen Taylor (GTK+ developer)
 
http://dman.ddts.net/~dman/


pgp0.pgp
Description: PGP signature