second HDD for media only

Asked by Mark Freeman

Hi folks, I have now upgraded my PC I ma running Ubuntu 7.10 GG, I have installed Ubuntu on a 80Gig HDD all has gone well after doing my homework. I have also fitted a 320Gig HDD that I want to use for media storage, I have spent hours going through existing threads on this issue, with no avail. The HDD's are both new, I don't want to install Windows at all!!! I have used the entire disk (80Gig) for the install of Ubuntu, as I said everything is spot on!! I even got my graphics card to work XfX Nvidia 8600GT XXX, but I don't know how to partition the second HDD or what format to use, I have read the Ubuntu book by Kier Thomas from front to back but it keeps referring to Windows . And is not specific enough on just using another HDD for media storage. Can anyone tell me how to do this? PLEASE!! I have had a look at Gparted before and know roughly how to use it, but I am not sure how to use this to install a second HDD. I want my second HDD to have a little icon on my desktop if possible so I can have easy access to it and just drag and drop images etc, from my removable media, digital camera usb stick for example.I have been trying to find the info out for 3 day's solid now and I am at a dead end and don't want to mess it up!! Please put me out of my misery guy's.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Freeman
Solved:
Last query:
Last reply:
Revision history for this message
Sébastien Corriveau (sebcor-deactivatedaccount) said :
#1

We're talking about an internal HDD, are we?

With your new HDD already installed, give me the result of the following commands (from a terminal window):

    dmesg | grep disk
    cat /etc/fstab
    mount

Revision history for this message
Vojtěch Trefný (vojtech.trefny) said :
#2

When you start GParted do you see the second disk? (You have two disk so you must choose the right one - in the right corner of Gparted window is "switcher".)

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#3

Yes I do have to choose from the window in the top right!

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#4

 dmesg | grep disk
[ 29.875135] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
[ 33.500202] sd 2:0:0:0: [sda] Attached SCSI disk
[ 33.508156] sd 3:0:0:0: [sdb] Attached SCSI disk
[ 33.763949] PM: Resume from disk failed.
[ 846.759024] sd 4:0:0:0: [sdc] Attached SCSI removable disk
[17201.141490] sd 5:0:0:0: [sdc] Attached SCSI removable disk
[24271.864957] sd 6:0:0:0: [sdd] Attached SCSI removable disk
mark@mark-desktop:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=b6f60e2d-8950-4bcf-8548-256ff7dc454c / ext3 defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=1995fbdf-5462-479f-b696-9ec094b46a57 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec 0 0
mark@mark-desktop:~$ mount

Is this what you mean?

Revision history for this message
Vojtěch Trefný (vojtech.trefny) said :
#5

So run GParted, choose the disk and make new partition (click on the "picture" of disk and choose new).You can make one partition or more if you want. "Create as" → Primary partion and "Filesystem" → ext3. You have created new partition(s) and you can mount them - it is possible that system will mount them automatically (after rebooting) or you can mount them manually.
More info about mounting:
https://help.ubuntu.com/community/Fstab
https://help.ubuntu.com/community/Mount

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#6

I have got the hard drive partitioned and mounted but it is showing the owner is root and I cant write to it I also cant change the permissions to read and write. how can I change the owner to me so I can put permissions to read and write?

Revision history for this message
Vojtěch Trefný (vojtech.trefny) said :
#7

As root change directory to you. Example: in Terminal (Applications → Accesories → Terminal) → sudo chown -R user /media/something (user = your user name, something = name of directory in /media where is disk/partition mounted).

(Not so correct way, but it works.)

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#8

I understand some of this, my pc name is mark, so, sudo chown -R mark /media/computer/media/sdb1 does this look right? what is the directory i think its in the computer directory, because I click on places, computer, and the hdd is there to see. Am I wrong?

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#9

 sudo chown -R mark /media/computer/mediasdb1 This is what I have typed but this is what I get,

mark@mark-desktop:~$ sudo chown -R mark /media/computer/mediasdb1
chown: cannot access `/media/computer/mediasdb1': No such file or directory

Revision history for this message
Vojtěch Trefný (vojtech.trefny) said :
#10

sudo chown -R mark /media/computer/mediasdb1 → this is wrong

sudo chown -R /media/sdb1

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#11

mark@mark-desktop:~$ sudo chown -R /media/sdb1
chown: missing operand after `/media/sdb1'
Try `chown --help' for more information.
mark@mark-desktop:~$
Now I get this!

Revision history for this message
Sébastien Corriveau (sebcor-deactivatedaccount) said :
#12

You have to specify the username of the new owner (replace the string "username" with the userid you use to login):

    sudo chown -R username /media/sdb1

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#13

I have done that still no joy!

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#14

When I click on properties of the HDD in the basic tab it say the name of the drive is,

298.1 GB volume: disk

So I repeated the command line, sudo chown -R fasthands:fasthands /media/298.1 GB volume: disk

Still no joy!! AAAAAAAAAAAAARRRRRRRRRRRRRRGGGGGGGGGGGGHHHHHHHHHHH !!!!!!!!

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#15

fasthands@fasthands-desktop:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0007567b

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 9327 74919096 83 Linux
/dev/sda2 9328 9729 3229065 5 Extended
/dev/sda5 9328 9729 3229033+ 82 Linux swap / Solaris

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c6a45

   Device Boot Start End Blocks Id System
/dev/sdb1 1 38913 312568641 83 Linux

Revision history for this message
Vojtěch Trefný (vojtech.trefny) said :
#16

I'm very sorry - I've made a mistake.

Correct command is:

sudo chown -R mark /media/sdb1

Revision history for this message
Sébastien Corriveau (sebcor-deactivatedaccount) said :
#17

If you run the command:

    ls -l /media

do you get a directory named: "298.1 GB volume: disk" ?

If so, the problem might be caused by the spaces in the directory name. Try this:

    sudo chown fasthands:fasthands "/media/298.1 GB volume: disk"

Revision history for this message
Sébastien Corriveau (sebcor-deactivatedaccount) said :
#18

Have you been able to fix your problem yet?

If you need more help please give us some feedback. And if you got your problem fixed, just mark this question as solved.

Revision history for this message
Mark Freeman (fasthandsfreeman) said :
#19

I hope this help anyone else trying to use a second HDD (int) to store media only like me, I followed this advice from a friend and it work a treat!!
ok, what you wanna do is change the root users password.

as yourself, type sudo passwd root
change root's password to the same as yours, it cant hurt, plus you'll
remember it. then, as you again, type sudo su -
this will then change you to the root user.

as root, you can gedit /etc/fstab and save changes properly.

your second disk will have its own unique device name, e.g. /dev/sdb1
or /dev/sda2 or something like that. the line in /etc/fstab should
 read

/dev/sdb1 /storage ext3 defaults 0 0

on the command line, you'll need to have created a folder called
 storage
in the root level directory, so as root type cd / then type mkdir
storage

then type umount /storage

then type mount -a

and try again. your second disk should be mounted into /storage so
 that
all data goes to it.

use the df -h command to have a butchers at whats going on, it'll give
you a human friendly readout.
Now, for convenience, you're gonna want a "symbolic link" to /storage on your desktop, so you can easily drag and drop files into it. To do this, on the command line, type...

cd /home/mark/Desktop - This changes directories so you're in your Desktop directory. Desktop has a capital D, remember! Unlike Windblows! Linux is case-sensitive.
ln -s /storage storage - This creates a symbolic link to /storage in /home/mark/Desktop/storage, i.e. another folder that represents the exact same location on disk, not a 'shortcut', but a 'link'

To be certain, take a df -h, then copy a gig of data into /storage, then take another df -h. If it is writing data to the other disk, i'd be surprised.

Now, as for the line in /etc/fstab....

/dev/sda1 / ext3 defaults,errors=remount-ro 1 1