[comp.unix.sysv386] Changing hard disk partitions

moore@forty2.enet.dec.com (Paul Moore) (04/12/91)

I've just initialised the 140 Mbyte hard disk on my ISC-based system, as
follows:

       DOS Partition
       UNIX Parition:
          /
          /usr
          /usr2

and then spent 4 hours copying software into the root and /usr file systems.
While loading the last piece of software into /usr, I got the message that
there wasn't enough space left in /usr. Definitely a case of Murphy's Law
raising its ugly head!

Without re-initialising the disk and re-loading the software already loaded:

1. Can I increase the size of /usr at the expense of /usr2?

2. Can I vary the relative sizes of the DOS and UNIX partitions, or even remove 
   the DOS partition?

3. As an aside, any suggestions as to reasonable proportions for sizes of 
   UNIX file system partitions?

Thanks, PPM

cpcahil@virtech.uucp (Conor P. Cahill) (04/13/91)

moore@forty2.enet.dec.com (Paul Moore) writes:

>I've just initialised the 140 Mbyte hard disk on my ISC-based system, as
>follows:

for a 140MB disk I would compine /root and /usr so that they share 
tmp space.   How  much you need depends upon what you plan to load.
For a full workstation developer package (excluding the LPI junk),
you need around 60MB.  add an extra 10MB for tmp space and kernel
reconfigurations.

>Without re-initialising the disk and re-loading the software already loaded:

Nope.  Well, you don't have to re-initialize the disk, but you do have to
reload.  Might as well reload.

>1. Can I increase the size of /usr at the expense of /usr2?

0. go to single user mode
1. Shrink /usr2 (see the FAQ posting for related info on setting up partitons)
2. mkfs it
3. mount it.  
4. create lost+found
5. mount /usr
6. cd /usr; ulimit 99999999; find . -print | cpio -oBcv | compress > /usr2/save
7. cd /
8. umount /usr
9. adjust the size of /usr, mkfs, make lost+found, mount it
10. cd /usr; uncompress < /usr2/save | cpio -idvmucB

>2. Can I vary the relative sizes of the DOS and UNIX partitions, or even remove 
>   the DOS partition?

You can remove the dos partition, but you cannot change the size of the unix
partition

>3. As an aside, any suggestions as to reasonable proportions for sizes of 
>   UNIX file system partitions?

See above.
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

peter@ficc.ferranti.com (Peter da Silva) (04/23/91)

In article <1991Apr13.164855.1252@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
> for a 140MB disk I would compine /root and /usr so that they share 
> tmp space.

And I'd suggest the opposite for any disk over 40 MB. Why combine them?

> You can remove the dos partition, but you cannot change the size of the unix
> partition

You can also turn the DOS partition into a UNIX partition, since the partition
start is an absolute offset from the start of the disk just edit
/etc/partitions appropriately and mkfs. ("just" he says).
-- 
Peter da Silva.  `-_-'  peter@ferranti.com
+1 713 274 5180.  'U`  "Have you hugged your wolf today?"

cpcahil@virtech.uucp (Conor P. Cahill) (04/23/91)

peter@ficc.ferranti.com (Peter da Silva) writes:

>In article <1991Apr13.164855.1252@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
>> for a 140MB disk I would compine /root and /usr so that they share 
>> tmp space.

>And I'd suggest the opposite for any disk over 40 MB. Why combine them?

By combining them you share the extra space that you need to allocate for 
building kernels, /usr/spool, /usr/tmp, and /tmp.  Otherwise you have to 
calculate what you think you will need and never be able to go over in either
partition. 

>You can also turn the DOS partition into a UNIX partition, since the partition
>start is an absolute offset from the start of the disk just edit
>/etc/partitions appropriately and mkfs. ("just" he says).

If this actually can be done, I wouldn't recommend it because a year from 
now when you come up with a need for a dos partition and see that a portion
of the disk is not allocated in the partition table, you might forget
that it is used for unix and fdisk a dos partition on top of it.
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

tim@dell.co.uk (Tim Wright) (04/24/91)

In <1991Apr23.131919.8083@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:

>peter@ficc.ferranti.com (Peter da Silva) writes:
...
>>You can also turn the DOS partition into a UNIX partition, since the partition
>>start is an absolute offset from the start of the disk just edit
>>/etc/partitions appropriately and mkfs. ("just" he says).

>If this actually can be done, I wouldn't recommend it because a year from 
>now when you come up with a need for a dos partition and see that a portion
>of the disk is not allocated in the partition table, you might forget
>that it is used for unix and fdisk a dos partition on top of it.

You can't do that. When you change the dos partition into a UNIX partition,
you have to change fdisk to reflect that it is a UNIX partition. DOS won't
let you delete it as it's "non-DOS". So, you're quite safe. Having said that,
it's messy and I'd always recommend re-installing for the reasons Conor has
already outlined.

Tim
-- 
Tim Wright, Dell Computer Corp., Bracknell    |  Domain: tim@dell.co.uk
Berkshire, UK, RG12 1RW. Tel: +44-344-860456  |  Uucp: ...!ukc!delluk!tim
Smoke me a Kipper, I'll be back for breakfast - Red Dwarf

cpcahil@virtech.uucp (Conor P. Cahill) (04/25/91)

peter@ficc.ferranti.com (Peter da Silva) said:
>You can also turn the DOS partition into a UNIX partition, since the partition
>start is an absolute offset from the start of the disk just edit
>/etc/partitions appropriately and mkfs. ("just" he says).

and then I said:
>If this actually can be done, I wouldn't recommend it because a year from...

and then tim@dell.co.uk (Tim Wright) writes:
>You can't do that. When you change the dos partition into a UNIX partition,
>you have to change fdisk to reflect that it is a UNIX partition. DOS won't

Peter made no mention of changing the fdisk table (hence why I said if it
can be done).

Either way, we both agree that it would be messy and shouldn't be done.
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

peter@ficc.ferranti.com (peter da silva) (04/25/91)

In article <1991Apr23.131919.8083@virtech.uucp>, cpcahil@virtech.uucp (Conor P. Cahill) writes:
> peter@ficc.ferranti.com (Peter da Silva) writes:
> >In article <1991Apr13.164855.1252@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
> >> for a 140MB disk I would compine /root and /usr so that they share 
> >> tmp space.

> >And I'd suggest the opposite for any disk over 40 MB. Why combine them?

> By combining them you share the extra space that you need to allocate for 
> building kernels, /usr/spool, /usr/tmp, and /tmp.  Otherwise you have to 
> calculate what you think you will need and never be able to go over in either
> partition. 

This is true, but on the other hand it gives you a relatively quiescent root
partition. With 140 MB I'd even throw in a 5-10 MB /tmp partition and almost
completely stop disk activity on root. This will pay in the long run, some
day when you have disk corruption and your nice quiet root partition survives.

Also, I suspect form your comments that SCO doesn't have this problem, but
in regular SVR3 the standalone FSCK really can't cope with more than about
a 20 MB root and you will have occasional link count table overflows.

> If this actually can be done, I wouldn't recommend it because a year from 
> now when you come up with a need for a dos partition and see that a portion
> of the disk is not allocated in the partition table, you might forget
> that it is used for unix and fdisk a dos partition on top of it.

Why would I see that? I can use fdisk to mark it a UNIX partition any time
I want. Besides, if I ever come up with a need for a DOS partition I hope
you'll put me out of my misery humanely.
-- 
Peter da Silva.  `-_-'  peter@ferranti.com
+1 713 274 5180.  'U`  "Have you hugged your wolf today?"

peter@ficc.ferranti.com (Peter da Silva) (04/26/91)

In article <1991Apr25.032927.407@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
> Peter made no mention of changing the fdisk table (hence why I said if it
> can be done).

Yeh, I made no mention of mkfsing and mounting the thing, either. I would
have expected this to be a given.

> Either way, we both agree that it would be messy and shouldn't be done.

Sometimes re-installing everything is more messy. Particularly if a user
has been mucking around as root for a while.
-- 
Peter da Silva.  `-_-'  peter@ferranti.com
+1 713 274 5180.  'U`  "Have you hugged your wolf today?"

klm@gozer.UUCP (Kevin L. McBride) (05/01/91)

In article <1991Apr23.131919.8083@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
>peter@ficc.ferranti.com (Peter da Silva) writes:
>
>>In article <1991Apr13.164855.1252@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
>>> for a 140MB disk I would compine /root and /usr so that they share 
>>> tmp space.
>
>>And I'd suggest the opposite for any disk over 40 MB. Why combine them?
>
>By combining them you share the extra space that you need to allocate for 
>building kernels, /usr/spool, /usr/tmp, and /tmp.  Otherwise you have to 
>calculate what you think you will need and never be able to go over in either
>partition. 

Yes, but when you graduate to multiple and/or BIG disks, you might
want to do things similar to what I have done:

1)  First drive: Micropolis 318 MB ESDI

    Contains: / (root) (make it bigger than you KNOW you will ever need)
              swap     (ditto)
              /usr     (ditto)
              /extra (98 MB of *slack* that I can use anywhere, typically
                     for archiving/unarchiving source tapes, etc. Mounted
                     only when needed.)

    in that order.  Note that not only do I have separate root and /usr
    partitions, but I have swap physically located between them.  Tests
    have shown that this CAN be a big performance win in a heavily loaded
    system that is paging a lot.  It reduces head travel and hence, seek
    time, to the swap partition by placing it in the middle of the disk
    rather than at the end.  Note that ISC's installation scripts won't
    set up the disk this way.  You have to hack some to get there.  The
    most convenient way to do this is to have an extra disk that you can
    partition by hand AFTER you have installed the system.  Copy the file
    systems from the 1st disk onto the 2nd and then take your system apart
    and make the 2nd disk the 1st.

2)  Second drive: Seagate 1.2 GB SCSI

    Contains: /usr/spool (320 MB for Usenet, Mail, and freeware archives)
              /mit       (275 MB for X11R4 sources and development work)
              /usr2      (remainder of disk for user's directories)

Granted, not everyone is going to go to these extremes, but similar
things can and, in some circumstances, should be done even on systems
with disk space totalling less than 400MB.

In the other extreme, I was working at a site that had numerous ISC
boxes connected on a network to a DECSystem 5400 with multiple Gigs of
disk space.  The ISC boxes were setup essentially 'dataless'.  The
local disk was an 80MB Quantum which contained root (/) and swap.
/usr was part of the root partition.  All user's directories were
mounted from the file server, as was /usr/mail and /usr/spool/news.

The 80MB Quantum drive is just big enough to load all of the ISC
Architech Workstation Developers package and Motif and give you a
reasonable amount of swap space.

--
Kevin L. McBride     |Contract programming (on and offsite)   |Brewmeister and
President            |X, Motif, TCP/IP, UNIX, VAX/VMS,        |Bottle Washer
MSCG, Inc.           |Integration issues, Troubleshooting.    |McBeer Brewery
uunet!wang!gozer!klm |Reseller of ISC UNIX and Telebit Modems.|Nashua, NH

wes@harem.clydeunix.com (Wes Peters) (05/02/91)

In article <WGZAGE9@xds13.ferranti.com>, peter@ficc.ferranti.com (peter da silva) writes:
> This is true, but on the other hand it gives you a relatively quiescent root
> partition. With 140 MB I'd even throw in a 5-10 MB /tmp partition and almost
> completely stop disk activity on root. This will pay in the long run, some
> day when you have disk corruption and your nice quiet root partition survives.

Helps stop system crashes on overflows.  Microport V/AT creates a tmp
filesystem that gets mounted on /tmp.  Several years ago I got tired of news
crashing my system when the spool directory overflowed (/usr: out of space)
so I bought a cheap 20m hard disk, formatted and partitioned it, and mounted
the whole thing on /usr/spool.  Never crashed again, even the few times I
ran out of space in /usr/spool.  For $180, it was worth it to not have to
rebuild /usr every 2 weeks or so.

> [...]
> Why would I see that? I can use fdisk to mark it a UNIX partition any time
> I want. Besides, if I ever come up with a need for a DOS partition I hope
> you'll put me out of my misery humanely.

DOS - the world's most widespread computer virus!  De-Operating System?

	Wes Peters
-- 
#include <std/disclaimer.h>                               The worst day sailing
My opinions, your screen.                                   is much better than
Raxco had nothing to do with this!                        the best day at work.
     Wes Peters:  wes@harem.clydeunix.com   ...!sun!unislc!harem!wes