Jump to content

Adding external HD to MDV 2008.1


Trio3b
 Share

Recommended Posts

MDV 2008.1 on hda with internal hdb mounted at /storage for backup.

 

Now would like to add exteranl HD. purchased WD320gb internal 3.5" with intention of installing into another PC but decided to go external. Bought enclosure (IDE 3.5" to USB) installed and plugged it in. USB flashdrive icon appears, and opens in konq, but cannot create any directories. "access media/disk denied"

 

Strange, but in MCC disk management volume shows up as ext3 but I don't remember formatting it.(could be wrong, I bought it several months ago, tinkered and then left it alone). Not likeley it came from store formatted in ext3.

 

Anyway, then went to MCC and it shows up as sda1 ( I regularly plug in little 2gb flashdrives and they also show up as sda1), labeled it and told MCC to save to fstab and tried again to access. No go. So I just commented it out in fstab and tried to just hotplug again as normal user, but access still denied.

 

Pretty sure I'm missing something simple (permissions) but just not seeing the forest for the trees. internal hdb is also owned by root but am able to create a separate backup folder for each user with no problem. Why not with this external IDE to USB HD?

 

Update: plugged external into lappy, went to MCC and formatted as ext3. (for some reason the dessktop earlier saw it as ext3 but had not been formatted so formatted entire part as ext3) . Then back to the desktop. Now went to MCC again and created two ext3 partitions for both users mounted as /ext_user01 and /ext_user02 each 150gb in size. Then created a directory in each part, one for user01 and one for user02 via CL and assigned ownerships for each user, but still can't mount the device as user. here is fstab:

 

# Entry for /dev/hda1 :

UUID=6ec45ab5-4b17-4e5e-81d6-6cd4caf22b84 / ext3 relatime 1 1

# Entry for /dev/sda5 :

UUID=bde2240a-c04f-4eba-a83a-05f553522a71 /ext_user01 ext3 relatime 0 0

# Entry for /dev/sda1 :

UUID=7963c1c7-7e85-490b-8eac-afa4742ab4aa /ext_user02 ext3 relatime 0 0

# Entry for /dev/sda1 :

#LABEL=WD-320external /external ext3 defaults 0 0

# Entry for /dev/hdb1 :

#UUID=200e5a69-099c-4fb5-98d6-9c72a2d91f0c /backup ext3 defaults 1 2

# Entry for /dev/hdb5 :

#UUID=bd4b11b7-b34d-47af-85a2-9c3b2be84d70 /cache ext3 defaults 1 2

# Entry for /dev/hda6 :

UUID=5a211a14-e29e-4616-9c3f-39062081a788 /home ext3 relatime 1 2

/dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0

none /proc proc defaults 0 0

none /proc/bus/usb usbdevfs auto,devmode=0666 0 0

# Entry for /dev/hdb1 :

#UUID=200e5a69-099c-4fb5-98d6-9c72a2d91f0c /media/hd ext3 defaults 0 0

# Entry for /dev/hdb5 :

#UUID=bd4b11b7-b34d-47af-85a2-9c3b2be84d70 /media/hd2 ext3 defaults 0 0

UUID=26980d91-2300-4653-a0ad-3482db8500f3 swap swap defaults 0 0

 

The two partitions I'm working with are sda1 and sda5 on the external.

 

If it helps my root part is on hda1, home on hda6, sda1 (#LABEL=WD-320external /external ext3 defaults 0 0) is where I first installed the external but then commented it out. please disregard the commented out hdb partitions as that is another mystery as to why it's still working. Will save that for another post.

 

Apparently I decided to mount sda1 and sda5 on /ext_user01 and /ext_user02, but the these are mounted on /dev. Is there a better way?

 

I am going to leave this external plugged in as backup most of the time BUT NOT RUNNING most of the time, just weekly backups and I just want it to mount automatically when a user turns it on to backup. then when they shut it off I guess it will unmount just like a flashdrive. I also purchased a larger flashdrive and did not have these issues. Why can I access the f/d as user but not the external HD?

 

 

Any help appreciated

 

Thanks

Edited by Trio3b
Link to comment
Share on other sites

Upon reflection, I believe hdb was added AFTER the initial OS installation on hda and my problem is coming from the inability to add additional devices to fstab properly. Had hdb (internal) and the new external device been present while installing mdv2008.1 on hda, I think all would be fine. I just assumed that the "new" external drive (IDE to USB) would be seen as a USB storage device just like any flashdrive.

 

Also just spotted aussiejohn's post about automounting an external just like a flashdrive. That is basically what I would like to do. Remembering to unmount and safely remove the device partition(s) is doable but in an office setting with someone unfamiliar, it could create problems.

Edited by Trio3b
Link to comment
Share on other sites

If you want a user to mount it, in the options where you have defaults, you need to add user as well, so it would be like this:

 

defaults,user

 

then the user can mount it. If you had a FAT32 filesystem it would be OK. Now, I do it slightly differently. For example, if I have /dev/hdb1 only as the partition on my disk, then I would do this from the console:

 

mke2fs -j /dev/hdb1
mkdir /mnt/mynewdisk
mount /dev/hdb1 /mnt/mynewdisk
chown user:user /mnt/mynewdisk

 

first command formats it ext3.

second command creates directory mynewdisk

third commant mounts it to mynewdisk

fourth command assigns ownership of that disk to my username - in this instance user - change this to what you want.

 

If you want multiple users to access the disk, then:

 

chmod 777 /mnt/mynewdisk

 

then all users have full world read/write access. I usually only do it for one user, but I don't know if you want for one user, or multiple users. Alternatively, you can do for groups, but then users have to be members of that group across all your systems, and the group must have the same GID on all machines. So the chmod command just gives full access irrelevant of group or user.

Link to comment
Share on other sites

I have removed all references to sda (which is what the external drive shows up as) from fstab and this has cleaned things up a bit.

 

The multiple hdb entries is also distracting me but I have started a different thread in software for that.

 

I am going to skip using MCC and try your method, but doesn't mdv mount these devices under /media? I notice that is where it shows up in the storage media.

 

Thank you

Link to comment
Share on other sites

Yes, it will mount under media. But once you've assigned the rights, it will be OK after that. Sometimes what I do is label a media also. So, another thing you can do is this:

 

mke2fs -j -L usbdisk /dev/sdb1

 

for example, will create ext3 on /dev/sdb1 with label usbdisk. When you connect it to system, it will mount as /media/usbdisk. Then you can assign rights as before:

 

chmod 777 /media/usbdisk

 

or own it as your user:

 

chown user:user /media/usbdisk

 

if it will be just for yourself. Sometimes I also had to set a sticky:

 

chmod g+s /media/usbdisk

 

so see how you go. This is usually what I do for my pendrives, I have freecom, kingston, etc, and label them accordingly as per this. So that they mount as /media/freecom or /media/kingston.

Link to comment
Share on other sites

have setup this drive now as sdb1 ( this is how MCC and fdisk identified the drive when plugged in)

 

followed suggestions and via console made directory called external in /mnt, mounted at /mnt/external, then changed ownership of /mnt/external05, gave 777 permissions and was able to create some new directories and even store an .iso there. These directories and tasks were allowed by user

 

However mounting and unmounting are only allowed by root in console.

 

if user tries to mount or unmount via GUI in Konq system://media

 

mount error: permission denied

 

unmount error: device to unmount is not in /media/.hal-mtab so is not mounted by HAL

 

Had to add drive to fstab manually and added the user to defaults but still no go.

 

# Entry for /dev/sda1 :

UUID=a26e688c-b021-4a85-9e90-660f401f51e5 / ext3 defaults 1 1

none /dev/pts devpts mode=0620 0 0

# Entry for /dev/sda6 :

UUID=e698be64-8041-42b1-bf44-0dd11c5dc9f9 /home ext3 defaults 1 2

# Entry for /dev/sdb1 :

UUID=a726a667-ea41-4d99-b46b-c9241a9ba709 /mnt/external05 ext3 defaults,user 0 0

none /proc proc defaults 0 0

none /tmp tmpfs defaults 0 0

# Entry for /dev/sda5 :

UUID=8de447ca-28a3-41be-b36c-1b2d1e4985af swap swap defaults 0 0

 

Ideas?

Thanks

Link to comment
Share on other sites

UPDATE: did two things

 

1. commented out the entry for sdb1 in fstab

2. moved mount point to /media/external05

 

and am now able to mount and unmount as user via GUI. Did this all NOT work via MCC because those tasks are done as root?

 

We'll see how it goes after several reboots.

 

THanks

Edited by Trio3b
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...