[plug] Disk Partitioning & Dial on Demand questions
Chris Griffin
chrisg at doladns.dola.wa.gov.au
Mon Mar 13 11:27:51 WST 2000
Thanks Nick,
I put another 64Meg swap partition on the extra drive (exactly as you
suggested) and then the rest is now /var. It all went well. Thanks again.
Any dial up experts want to tackle the rest of the challenge?
Regards,
Chris
At 17:17 10/03/2000 +0800, you wrote:
>On Fri, Mar 10, 2000 at 09:43:22AM +0800, Chris Griffin wrote:
>[...]
> > The system has two drives in it. The first is a 4GB of which I can have
> > 1Gig for the system, the rest is for user data area. With all of the
> system
> > and facilities I had to install, it left me with that partition 93% full.
> > For this reason I fitted an old 240MB drive as a secondary and would like
> > to add this into the system. This raises two questions for me.
> > First, should I just move /var onto this drive or should I move other
> areas
> > onto it as well.
>
>As people suggested, some swap could be a good idea.
>
> > Secondly, how do I move it over without having to reinstall the system?
>[...]
>
>OK, guessing wildly, your first 4GB hard disc is /dev/hda, second 240MB
>hard disc is /dev/hdc. You have something like ;
>
># /etc/fstab: static file system information.
>#
># <file system> <mount point> <type> <options> <dump> <pass>
>/dev/hda1 / ext2 defaults,errors=remount-ro 0
> 1
>/dev/hda2 none swap sw 0 0
>/dev/hda3 /space ext2 defaults 0 2
>
>Use "cfdisk /dev/hdc" to make a (240-64)MB Linux /dev/hdc1 and a 64MB
>Linux swap /dev/hdc2.
>
>Substitute names, devices and partition numbers as appropriate. /space
>is that 3GB user data partition you mentioned.
>
>Now, after carefully checking that you're formatting the right disc...
>
> mkfs.ext2 /dev/hdc1
> mkswap /dev/hdc2
>
>Now - boot to single user mode. You can get away without it if the
>machine's not in use, but it means you won't lose any log file entries
>that you make in the next few minutes, etc.
>
> mkdir /mnt/tmp
> mount -t ext2 /dev/hdc1 /mnt/tmp
> (cd /var && tar c .) | (cd /mnt/tmp && cpio -im)
> mv /var /my_old_copy_of_var
> mkdir /var
> chmod 755 /var
>
>That'll copy /var over, with ownership, permissions, etc. You should
>also be able to use dump and restore, or something like
>"find /var -depth | cpio -pm /mnt/tmp".
>
>Now edit your fstab to look like ;
># /etc/fstab: static file system information.
>#
># <file system> <mount point> <type> <options> <dump> <pass>
>/dev/hda1 / ext2 defaults,errors=remount-ro 0
> 1
>/dev/hdc1 /var ext2 defaults 0 2
>/dev/hda2 none swap sw,pri=0 0 0
>/dev/hdc2 none swap sw,pri=0 0 0
>/dev/hda3 /space ext2 defaults 0 2
>
>Lo and behold! Two swap partitions striped together for extra speed.
>/ is mounted first and fscked in pass 1, then /var and /space are
>fscked in pass 2, in parallel.
>
>Tell us how it all goes.
>
>Nick.
>
>--
> Nick Bannon | "I made this letter longer than usual because
>nick at it.net.au | I lack the time to make it shorter." - Pascal
\\\___///
\\ - - //
( @ @ )
+----------------------------oOOo-(_)-oOOo--------------+
| Chris Griffin, Senior Network Engineer |
| Email: chris.griffin at mitswa.com.au |
| Managed Information Technology Solutions (M.I.T.S) |
| 1st Floor, Batholomew House, 31 Ventnor Avenue, |
| West Perth W.A. 6005 |
| PH: +61 (08) 9481-4066 FAX: +61 (08) 9481-4064 |
+-----------------------------------Oooo----------------+
I haven't lost my mind - oooO ( )
- it's backed up on tape ( ) ) /
somewhere. \ ( (_/
\_)
More information about the plug
mailing list