[mythtv-users] Adding a new hard drive

Campbell Vertesi cvertesi at indiana.edu
Tue Feb 17 16:11:50 EST 2004

On Tue, 2004-02-17 at 02:54, Darren Mak wrote:
> Hi All,
> I currently have all my myth data on an 80 Gig hard drive
> I bought a 120Gig drive an have added it to my system…

> I have one question and one problem…

> The question… Is it possible to join the two drives so that Fedora
> sees one drive?

YES.  The best way is to use RAID. This is where your system treats the
two hard drives as one mammoth 200GB drive.  It's built into the kernel,
works great.  There's lots of documentation online on how to set up
software RAID in Linux.  check www.tldp.org
> The problem…

> Until I figure out the answer to the above question I was going to
> transfer all data to the 120Gig drive as my 80 Gig is full. However I
> added the drive as the secondary master and when typing dmesg the
> drive is recognized as 120 Gig and comes up as hdc with unknown
> partition table because it has not been created yet.
To be expected.
> So I read up on the web about creating a partition and everything says
> use fdisk… try that and get bash: fdisk: command not found
Were you logged in as root?  use "su -" to sudo to the root user, with
the complete path for root.  That will include fdisk.  If all else
fails, "locate fdisk" .  It should be in /sbin .
> Long story short I try a few different partition tools such as parted
> and  when I type the command parted /dev/hdc I get the same error as
> above (but for parted), yet an apt-get install parted results in
> nothing being installed as parted is already the newest version.

You don't really need parted for this simple an operation, so don't
worry about it.
> Apt-get of fdisk yields an error directing me to linux-utils which
> when I try to install it says that linux-utils is the newest one.
That's right, fdisk is included in linux-utils.  As far as I know, it's
ALWAYS installed with Fedora, and probably 95% of distros. (don't quote
me on that though)
> I have never done anything with hard drives in Linux other than when
> initially installing the OS, so I am in need of some direction here,
> as I have been unbable ot find the answers anywhere. 
> As well is there a graphical partition tool for Fedora like diskdrake,
> ot maybe help make this a little easier?

Don't worry about the graphical tool, you really don't need one here. 
If you just want to make the drive usable as it's own 120gb unit, use
the following commands:

# su -
(enter your password here :)  )

# fdisk /dev/hdc

At the fdisk prompt, type m to see your options.  first thing you want
is p , to show you the existing partitions on hdc.  Mine comes up like

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        13    104391   83  Linux
/dev/hda2            14      4670  37407352+  83  Linux
/dev/hda3          4671      4865   1566337+  82  Linux swap

You can see that hda is divided into three partitions, and numbered
accordingly.  hda1 and hda2 are set up as standard Linux partitions, but
hda3 is set up as "Linux swap".  Exciting, isn't it?  Yours should be
empty.  If it isn't, you're probably looking at the wrong drive, so use
q to get out of fdisk and try again on the right drive.  If you're SURE
that this is the right drive, you can use the d command to delete the

>From your empty partition-less drive, you will want to use the n key to
create a new partition.  The defaults are fine (primary partition number
1).  Then use w to write the partition table to disk and exit.  Reboot
your computer to make the partition table active.

When your system is back up, you can format your new partition however
you want to.  the basic command for this is 

# mkfs -t ext3 /dev/hdc1

That will format your partition as ext3.  You may want to try xfs or
reiserfs instead, I've heard great things about them.  

The last step is to mount your new partition.  Make a new directory,
chmod it so that everyone can access it, and mount your drive.

# su -
# mkdir /mnt/storage
# chmod a+rwx /mnt/storage
# mount -t ext3 /dev/hdc1 /mnt/storage

and voila!  There's your partition.  You may want to add a line into
/etc/fstab to make it mount automatically on bootup.  Write me back
privately if you want instructions.

Good luck!


More information about the mythtv-users mailing list