Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I mounted an external ntfs drive on my ubuntu server. Since it's an external hdd at night I unplugged it and when I plugged it back in ubuntu didn't detect the already mounted hdd :(

This is what I did to mount the hdd:

sudo mount -t ntfs-3g /dev/sdb1 /mnt/discoexterno1/

This worked great. I even shared it with my windows machine, but since I unplugged it and plugged back I can't access it. Every time I do:

ls /mnt/discoexterno1

I get:

ls: cannot access /mnt/discoexterno1: Input/output error

What can I do to make ubuntu server associate automatically the directory with the hdd?

This is everything I have in the dev directory starting with s

/dev/scd0 /dev/sda1 /dev/sda5 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sg1 /dev/sg3 /dev/snapshot /dev/sr0 /dev/stdin /dev/sda /dev/sda2 /dev/sdc /dev/sdd /dev/sde /dev/sg0 /dev/sg2 /dev/sg4 /dev/sndstat /dev/stderr /dev/stdout

/dev/shm:

/dev/snd: controlC0 pcmC0D0c pcmC0D0p pcmC0D1c pcmC0D1p timer

I also have 2 other external hdd but I only mounted one to test this. (I am a newbie)

So, do I have to keep mounting the hdd everytime I unplug and plug it?? Or is there some way (by detecting the serial number or something) that I can tell ubuntu server that I have mounted that hdd??

Thanks

share|improve this question
1  
The words you need to look up are "udev" which is used to create the devices and uuid which is an identifier for the disc. –  James Jul 10 '09 at 7:57

1 Answer 1

up vote 2 down vote accepted

Yes you should unmount the drive before you unplug it, and mount it when you plug it in. If you want to make this happen automatically you can use something like autofs. If you want to make this work nicely you probably should set a label for the filesystem and mount based on the label.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.