Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Friends, I have an existing Red Hat 9.0 (2.4.20-8) system running that I have added RAM and a CD-ROM drive to with no problems.
I've now added an additional 40GB hard drive to the system, and I would like to add it logically so my partitions have more space available. I have no idea how to do this! I have the drive physically connected, and the system sees it as /dev/hdb.
Currently, my system shows:
Code:
---------------------------------------------------------------------------
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 27G 2.6G 23G 11% /
/dev/hda1 99M 14M 80M 15% /boot
none 314M 0 314M 0% /dev/shm
---------------------------------------------------------------------------
# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
---------------------------------------------------------------------------
# fdisk -l
Disk /dev/hda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 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 3552 28427017+ 83 Linux
/dev/hda3 3553 3649 779152+ 82 Linux swap
Disk /dev/hdb: 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/hdb1 1 4865 39078081 83 Linux
---------------------------------------------------------------------------
So, I have successfully added the disk and deleted the NTFS partition table using fdisk. What do I do now???
Thanks for the tip -- what you stated makes perfect sense. I'm not sure if I'm doing something wrong or not, but when I run the command below as root (where <mount point> is various things like /var2, /temp2, etc. on the filesystem):
Code:
# mount -t ext2 /dev/hda3 <mount point>
I get an error that says
Code:
mount: mount point <mount point> does not exist
. Does this mean that the place I'm mounting the disk must exist first? I've tried touching a file (for example, /var2) but that doesn't seem to work either.
and it doesn't seem that you've formatted a filesystem on it yet, if you haven't then you'll run into that error after you fix the mount-point problem.
use mkfs to do so. (mkfs.ext2 or mkfs.ext3, as you may prefer)
DaWallace, that was the ticket! I used mkfs to format the disk first, as in:
Code:
mkfs.ext3 /dev/hdb
Then, I created a new directory to use as the mount point:
Code:
mkdir /var2
Next, I mounted the newly formatted partition (which happened to be the whole hdb device, in my case):
Code:
mount /dev/hdb /var2
I simply wrote out these steps in case it might help somebody else that comes along. I have one final question; what entries should I place in /etc/fstab to ensure that my new directory gets mounted each boot time? I'm a little confused about that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.