LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2001, 07:42 PM   #1
tkatrib
LQ Newbie
 
Registered: Mar 2001
Posts: 1

Rep: Reputation: 0
Cool


I just installed a new hard drive and I need to know how to partition it and access it from within Linux 7......can someone help me I'm sure it's such an easy command.....I just want to add the new drive to provide more space to my existing Linux workstation.

Thanks,
Tony
 
Old 03-05-2001, 04:27 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
The most difficult part about adding more space to Linux is where to add the space. Ask yourself, where do you want the extra space? /usr, /home, /var? I have seperate partitions for /home, /var, and /usr. Just as an example, I'll use /home and /usr as the mount points for your new drive.

Use the command 'fdisk /dev/hd?' where ? is the new drive to partition. Create two new partitions for what ever size. The use the 'mkfs /dev/hd?1' to create a ext2 filesystem for each of the partitions. (replace the 1 with a 2 for the second). Then mount the new partition under /mnt (for lack of a better place), and copy the existing data there.

mount /dev/hd?1 /mnt

cd /home
cp -a * /mnt ( is the -a correct? )

That will copy everything in /home to the new partition. Unmount the partition 'umount' and do the same with /usr. Now mv /home to /home.bak (whatever) and mkdir /home. Same for /usr.

modify the /etc/fstab file to mount the new filesystems when the system boots.

/dev/hdb2 /usr ext2 defaults 1 1
/dev/hdb1 /home ext2 defaults 1 1

reboot.

Since I may have left something out, please go out to http://www.linuxdoc.org and find a HOW-TO before really doing this.

Easy command huh?

Gary

PS. It would be nice to be able to allocate space to any filesystem as needed, as you can on AIX. Less wasted space.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a new hard drive ckr Mandriva 1 03-23-2005 01:12 PM
Adding a new drive raysr Linux - Hardware 2 12-30-2004 10:28 PM
Adding Hard Drive Cynthia Blue Linux - Hardware 3 12-19-2004 01:06 PM
Adding a hard drive Mack_T Linux - Hardware 10 09-21-2003 11:46 AM
Adding a new drive????? billkris Linux - Hardware 7 01-29-2003 07:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration