












Updated: 13 Mar, 2008
|
|
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.
- as root, run fdisk /dev/thenewdrive (hdb, hdc, hdd, sda, sdb, and so on)
- once in fdisk, you can use (p) to list the partitions (there may be some you want to (d)elete! )
- 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)
- 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.
- 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)
- make sure your mount point already exists (in my case, /d1)
- if you want to use different mount options, man mount is your friend.
- you're done.
Your Host: ec2-52-14-150-165.us-east-2.compute.amazonaws.com
Your Addr: 52.14.150.165
|

© 1999-2025 BenJammin.Net.
|
|