Techtips
 
Home
Info
Consulting
Projects
TechTips
Library
Gizmos
Links
Misc
Opinions
Microsoft
SPAM
SiteMap

Updated:
13 Mar, 2008



KQLZ.Org - Rock and Roll the way we remember it best!
KQLZ - Click to Rock

Members and Affiliates of the RIAA are expressly forbidden from accessing this website.
 

Linux - Adding additional Disks

This is quick cheap and dirty! And FYI, I did this on Fedora and it works fine. I also did it on with a USB drive.

I'm going to assume the reader already knows that to crack open the PC and do this internally, they need to power down the system!

Also! If you want the fancy graphical version of doing this from Gnome, there is an editor called GPARTED which is nice, but I'm still looking to see where I set disk labels which in this example is kind of important.

  1. as root, run fdisk /dev/thenewdrive (hdb, hdc, hdd, sda, sdb, and so on)

  2. once in fdisk, you can use (p) to list the partitions (there may be some you want to (d)elete! )

  3. From there:
    (n)ew partition
    (p)rimary partition
    (1) partition number
    (enter) (defaults to cylinder 1)
    (enter) (defaults to last cylinder)
    (w)rite new partition table (and exit)

  4. Format the drive with the command: mkfs.ext3 -L /sharename /dev/thenewpartition (in my case, sdb1) Keep in mind, you ran fdisk and pointed to the DRIVE (in my case, /dev/sdb) but NOW you want to format the PARTITION which is suffixed with the partition number. (in my case, /dev/sdb1)
    NOTE: I used a "-" in my LABEL and that was bad. mount couldn't find the drive on startup. I haven't looked up the rules on labels, but just stick to ascii A-Z and 0-9 for now.

  5. When fdisk is done, you can edit fstab to mount your new drive:
    LABEL=/yourlabel /mountpoint ext3 defaults 1 2
    In my case, LABEL=/backup /d1 ext3 defaults 1 2
    What's nice about LABELS is that in my case, I have a USB drive which can plug in and mount who knows where. but using the LABEL to ID the drive now allows it to mount in the same place every time no matter what else is plugged into the USB system. let AutoMount mount those other things where it may.. but this drive ALWAYS gets mounted in the same spot. (crossing fingers)

  6. make sure your mount point already exists (in my case, /d1)

  7. if you want to use different mount options, man mount is your friend.

  8. you're done.



Your Host: ec2-18-223-172-252.us-east-2.compute.amazonaws.com
Your Addr: 18.223.172.252



© 1999-2024 BenJammin.Net.