trouble with mounting and with ownership of 2nd drive

BKLounger

Golden Member
Mar 29, 2006
1,098
0
0
I have a linux machine setup i've used as a media server for a while, I've just installed a new secondary drive for more storage space. I fired up gparted and partitioned the drive and set the format as ext3, but now every time i reboot i need to remount the volume for that secondary drive. Also another issue is i can't create or put any data on that 2nd drive either because it says i don't have permission only root does. I am always logged in as user "johndoe". I am running ubuntu 8.0.4. Any help would be greatly appreciated.

btw the mount point for the secondary drive is /media/disk and i've already tried sudo chmod -R a+rw *

and i get nothing with that. Still no ability to write to drive.
 

Fallen Kell

Diamond Member
Oct 9, 1999
6,178
516
126
You need to setup the disk in your /etc/vfstab for it to be automatically mounted as something upon reboot. Unlike in Windows, your drives do not just show up in a list a-z, but you need to tell it what you want the drive to be (i.e. /export01 or /data, or whatever). I would not recommend using "/media/disk" for the mount point. The "/media" location is usually reserved for removable media, i.e. floppy disks, CDs, DVDs, USB/Firewire attached storage, etc. You should use something like /export01 (or whatever if you plan on sharing that disk out in the future with NFS, or something like /data01 otherwise).

Look at the other entries in the /etc/vfstab to get an idea how they are setup. You need to know the physical disk device, the filesystem that you formated it to, and a couple other options like automatically fsck and mount order, but it is pretty straight forward (you can usually just copy another entry in there as long as it is a hard drive entry and edit the device and mount point and you are done).

As for your permission denied issues, by default most things are locked down and you need to open them up for user access. You can either create a directory on that new drive and use the "chown johndoe <path to directory>" or you can open up permissions "chmod 777 <path to directory>". I recommend against the opening permissions as you are then letting anyone who has access be able to write and delete stuff in that directory. Changing the ownership to your normal user is the way to go.
 

BKLounger

Golden Member
Mar 29, 2006
1,098
0
0
Originally posted by: Fallen Kell
I would not recommend using "/media/disk" for the mount point. The "/media" location is usually reserved for removable media, i.e. floppy disks, CDs, DVDs, USB/Firewire attached storage, etc. You should use something like /export01 (or whatever if you plan on sharing that disk out in the future with NFS, or something like /data01 otherwise).
This would also explain why ubuntu is seeing the unmounted drive as a scsi drive. Thanks for the info. Apparently i have a long way to go to learning linux.
 

stevf

Senior member
Jan 26, 2005
290
0
0
I think the reason they show as scsi is that sata drives show up as scsi, not because of the mount point
 

BKLounger

Golden Member
Mar 29, 2006
1,098
0
0
Originally posted by: stevf
I think the reason they show as scsi is that sata drives show up as scsi, not because of the mount point

both drives in the machine are IDE drives though

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It doesn't matter what transport is being used, how the drives show up in Linux is based on how the drivers were developed. If the driver uses libata then it'll show up as /dev/sda, sdb, etc. The old IDE drivers show up as /dev/hda, hdb, etc because they were written before libata existed but they're slowly being converted or replaced so eventually everything will show up as /dev/sda, sdb, etc.

Fallen Kell's post is pretty much right, except that /etc/vfstab is a Solaris thing, the file you want to edit to make a mount permanent is /etc/fstab.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Just another reason why using filesystem labels, UUIDs, the symlinks in /etc/disk, etc are much better than the device node directly.
 

Fallen Kell

Diamond Member
Oct 9, 1999
6,178
516
126
Originally posted by: Nothinman
It doesn't matter what transport is being used, how the drives show up in Linux is based on how the drivers were developed. If the driver uses libata then it'll show up as /dev/sda, sdb, etc. The old IDE drivers show up as /dev/hda, hdb, etc because they were written before libata existed but they're slowly being converted or replaced so eventually everything will show up as /dev/sda, sdb, etc.

Fallen Kell's post is pretty much right, except that /etc/vfstab is a Solaris thing, the file you want to edit to make a mount permanent is /etc/fstab.

hehee... sorry. I'm a Solaris guy first and foremost, so a lot of times my brain will just say the solaris answer :D It is usually pretty close :p