HOWTO? I want to add an additional HD

bronto yellowdog-general@lists.terrasoftsolutions.com
Sun Aug 18 15:10:01 2002


Thanks Stefan, Robert and Rick, your suggestions were all helpful and 
it appears that everything has gone perfectly.

While doing this it occurred to me that I will have other data that 
needs to go on the 60 gig disk too; specifically the user email 
accounts and sql databases.  So it seems to me that I should have the 
whole /var directory on the new disk as well.  But I'm having trouble 
getting my head wrapped around the implications of this file system 
where the hardware is abstracted from the directory structure.  Is it 
as simple as repeating instructions from "mkdir" to "mount" as below, 
only for the var directory?  It doesn't seem that I would have to 
create a whole new partition for /var, but I get lost in all this.

Thanks

Rob


>At 13:52 -0700 on 11-8-2002 bronto wrote:
>  >
>  > I just purchased a new hard drive that I want to add to my YDL 2.2
>  > server.  The server is a beige G3 tower, and it already has the 4gb IDE
>  > drive it came with, plus a very small SCSI drive.  I use the SCSI drive to
>  > boot MacOS, and YDL is on the IDE drive.  My intention is to leave it that
>  > way, reserve the IDE for YDL/Linux/Apps, and use the new drive for  the
>  > 'home' directory where all the data will be stored.
>  >
>  > The new drive is a 60gb EIDE Maxtor.
>  >
>  > Is there a HOWTO somewhere that I don't see, or is it too easy to 
>document? :')
>
>Well, I don't know whether there is a simpler way to do it, but the
>following is quite simple and more importantly should work:
>
>o Put the new hard disk in place, and boot Mac OS.
>
>o Use drive setup (disk utility in Mac OS X) to initialize the new
>   disk, e.g. by creating on it one large HFS partition (I don't know
>   whether drive setup allows you to leave the whole disk unallocated; I
>   somehow doubt it too).  I don't think you can skip this since you
>   will have to install somehow the Apple drivers on the disk, thing
>   which to my knowledge is not possible from within Linux.
>
>o Boot Linux.  Depending on how you put the new disk in place, the new
>   disk could be /dev/hdb or something else.  If you are not sure, take
>   a look at /var/log/dmesg to find out.  I will hereby assume that the
>   disk is indeed /dev/hdb.  Everything below happens as root.
>
>o Fire up pdisk /dev/hdb, type ? to see the available commands, type p
>   to see the partition map, delete the HFS partition you just created
>   (it should be the one of type Apple_HFS), and create the
>   partition(s) you need (of type Apple_UNIX_SVR2 if you want ext2
>   filesystems on them).  Let's assume for the sake of the argument
>   that you create only one (ext2) partition that is partition number 9
>   (60 Gig partition? wow, I have never owned that much space on one
>   machine in my whole life! ;-) ).
>
>o Save the new partition map (w), quit pdisk (q), reboot if instructed
>   to do so by pdisk.
>
>o Run mkfs /dev/hdb9 (or whichever is the number of the partition you
>   are interested in).  You will end up with an ext2 filesystem that
>   just craves to be mounted and used.  You may also want to tune it to
>   your tastes using tune2fs (see man tune2fs for details).
>
>o Let's assume again (for the argument's sake, how else?) that you
>   want to put /home on your brand new ext2 volume. First, temporarily
>   mount /dev/hdb9 somewhere, e.g.,
>
>      mkdir /some-unused-hairy-name
>      mount -t ext2 /dev/hdb9 /some-unused-hairy-name
>
>o Then, move the content of /home to its new location:
>
>      mv /home/* /some-unused-hairy-name
>
>o Open /etc/fstab and add the following line:
>
>      /dev/hdb9    /home   ext2          defaults        1  2
>
>   There should be at least one space or tab between `/dev/hdb9' and
>   `/home', between `/home' and `ext2', etc.  See man fstab for
>   details.
>
>o Reboot, or issue the following commands:
>
>      umount /some-unused-hairy-name
>      mount /home
>
>o Optional, remove the /some-unused-hairy-name mount point (rmdir
>   /some-unused-hairy-name), you don't need it any longer.
>
>o That's it, you are back in business, only with a larger /home.
>
>   Of course, if you want more partitions on the new disk you will have
>   to do similar things (mkfs, mount points, etc.) for each of them.
>
>Hope this helps.  I am not sure in how much details should I go,
>please get back to me with any point that may be unclear.  There is a
>howto on the tldp site (called Multi-Disk HOWTO) but it is tailored on
>the x86 machines; take a look at it but don't trust everything you
>read there (for example, fdisk is indeed present in the YDL
>distribution but won't work on disks initialized by drive setup).
>
>Stefan
>
>--
>``There's no use trying, one can't believe impossible things.''
>``I daresay you haven't had much practice.  When I was your age, I
>always did it for half an hour a day. Why, sometimes I believed as
>many as six impossible things before breakfast.''
>     --Lewis Carroll, Through the Looking-Glass
>_______________________________________________
>yellowdog-general mailing list
>yellowdog-general@lists.terrasoftsolutions.com
>http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general