[ Table Of Contents ][ Answer Guy Current Index ] greetings   bios   1   2   3   4   5   6   7   8   9   10   12   13   14   15   16   17   18   19   20 [ Index of Past Answers ]

(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to tag@lists.linuxgazette.net

There is no guarantee that your questions here will ever be answered. You can be published anonymously - just let us know!


(?) Adding a new hard drive to a running system.

From Roy Bettle

Answered By Mike Orr

Here I was, all smart and all ... Got RH7.1 running fine, then decided I needed more drive space. So I added a new drive. Now what? I used "fdisk" as root to create a partition on it, but how do I "format"? I tried "mkextfs", "mkext2fs", "make ext2 /dev/hdb", etc., after my experiences using "mkreiserfs" earlier, but all my "ext2" attempts were in vain.

(!) [Mike] Linux's format command is "mkfs", which calls the appropriate filesystem-specific program. So you can run either:
mkfs -t ext2 /dev/hdb1
or:
mke2fs /dev/hdb1
Note: /dev/hdb1, not /dev/hdb. For hard disks, you format a partition, not the entire drive.
See the manpages for additional command-line options. I would especially use the -c option to check for bad blocks, since you are using a drive of unknown quality.
(For additional trivia, /sbin/mkfs.ext2 is a hardlink to /sbin/mke2fs.)
(Additional trivia: to format a floppy disk that has never been formatted, run 'superformat'. This creates a dos/vfat filesystem as a side effect. If you wish a different filesystem type, run mkfs after superformatting. The device in this case is /dev/hda since floppies don't have partitions.

(?) Also, to mount it (because I tried "mount -t ext2 /dev/hdb /mnt/tmp", etc.) do I just edit "/etc/fstab" and add the mount point or is there an additional step, possibly during the formatting stage? I tried the above line but was told the mount point didn't exist.

(!) [Mike] The mount point has to be an existing directory. If /mnt/tmp doesn't exist, 'mkdir' it.
You can run 'mount' and 'umount' to mount and unmount the partition whenever you need it, or add a line in /etc/fstab to have it mount automatically at boot time. There is no additional step. See "man mount" and "man 5 fstab".
[big abubble]

(!) You "da bomb"! Thanks! ;-)

RAB

Roy Bettle


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 67 of Linux Gazette June 2001
HTML script maintained by Heather Stern of Starshine Technical Services, https://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   bios   1   2   3   4   5   6   7   8   9   10   12   13   14   15   16   17   18   19   20 [ Index of Past Answers ]