Click to See Complete Forum and Search --> : How to access 2nd drive?


Andy2
11-04-2007, 02:30 AM
I recently added a second drive to my system for additional storage space. I followed a couple of tutorials and believe that it is partitioned, formatted and configured correctly. But when I open up my file system, all it shows available is the last 2 gigs on my first drive. Will somebody please explain how to access the new drive? There's probably an additional step or two I'm not aware of or I'm overlooking something obvious. Thank you.

saikee
11-04-2007, 04:19 AM
In root console type
fdisk -l
The command will list every partition of every disk you have got. A raw disk is showed up with no partition inside.

Tell us what partition you cannot access with the output from the above command.

retsaw
11-04-2007, 05:02 AM
Tell us what steps you actually took, or which tutorial you followed.

After you partition and format a drive, it has to be mounted somewhere, and if you want it to be permanently available you have to add it to your /etc/fstab. The "df -h" command which show what you have mounted, where, and how much space is used and available on them.

Andy2
11-04-2007, 05:32 PM
Thanks for the replies, guys. The partition I want to access is hdb1

output from ls -l

Disk /dev/hda: 17.0 GB, 17016717312 bytes
255 heads, 63 sectors/track, 2068 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 255 2048256 b W95 FAT32
/dev/hda2 256 1990 13936387+ 83 Linux
/dev/hda3 1991 2068 626535 5 Extended
/dev/hda5 1991 2068 626503+ 82 Linux swap / Solaris

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 77545 39082648+ 83 Linux

and from df -h


Filesystem Size Used Avail Use% Mounted on
/dev/hda2 14G 11G 1.8G 86% /
varrun 379M 84K 379M 1% /var/run
varlock 379M 8.0K 379M 1% /var/lock
udev 379M 140K 379M 1% /dev
devshm 379M 0 379M 0% /dev/shm
lrm 379M 19M 361M 5% /lib/modules/2.6.15-29-386/volatile
/dev/hda1 2.0G 789M 1.2G 40% /media/hda1
/dev/hdb1 37G 129M 35G 1% /mnt/drive2

The tutorials I used are from the following sites:
http://personal.riverusers.com/~thegrendel/lnxpg3.html
http://linuxplanet.com/linuxplanet/tutorials/4232/1/
http://justlinux.com/nhf/Hardware/Adding_a_Hard_Drive_in_Linux.html

Andy2
11-04-2007, 05:35 PM
**

saikee
11-04-2007, 06:29 PM
So you have hda2 as the root of your Linux and you have used up 11Gb out of the 14, leaving about 2Gb. That is what it should be. Adding a new disk does not increase hda2.

What you can do are

(1) Click the file manager to view the hidden folders and empty all the .trash

(2) "Move" (and not just copy) you personal data from hda2 to hdb1.

retsaw
11-04-2007, 07:39 PM
You have the new drive mounted at /mnt/drive2, that is where you will need to put files if you want to make use of it. What problem are you having exactly?

I think that perhaps you want more space in your home directory. For this you might wish to use your new drive for a dedicated /home partition. For this you just need to copy everything from /home to your new drive at /mnt/drive2 (with "cp -a /home/* /mnt/drive2"), change the fstab entry to mount your new drive at /home instead of /mnt/drive2, then unmount the drive from /mnt/drive2 ("umount /mnt/drive2") and mount it on /home ("mount /dev/hdb1 /home"). It is advisable not to have your user logged in while doing this so no programs will be writing to your /home dir while you are doing the copy.

Or alternatively you could just create a symlink from your home dir pointing to a directory on your new drive and just use it that way.

Andy2
11-06-2007, 12:30 AM
Saikee, I checked the hidden files in my file manager and did not find any .trash files. I took your suggestion literally because I wouldn't know which files to delete if you actually meant for me to delete "unnecessary" files. This is not a complaint. I just don't know. As you can see, I had to work with 3 tutorials, each with a slightly different perspective, to format and partition my second drive.

Retsaw, thank you for the step-by-step instructions. I think the best thing for me to do is to move /home to hdb1. Hda is 8 years old, and I have found myself wondering how much longer it's going to last.