Tuesday 9 November 2010

The Battle Continues!

After thinking that I had finally resolved my problems with mounting a Windows NAS to my Ubuntu box, I've noticed that my system takes upwards of two minutes to shutdown. It wasn't a huge problem as, whatever was hanging at shutdown eventually timed-out and the box closed down successfully.

However, things like this irritate me and I just had to find out what was causing the problem. Running the usual logs (/var/log/dmesg & /var/log/messages) suggested that the problem was some sort of segfault with Python: that didn't make much sense to me as I hadn't done anything to cause Python to hang.

So, working on the assumption that the last thing I did caused the problem, my attention returned to my ongoing battle with my network attached storage device. A simple test to see if this was the problem revealed that, for some as yet undetermined reason, the NAS wasn't being unmounted properly at shutdown causing some kind of network interface error.

I used the CLI to unmount the NAS

sudo umount /media/device_name

Where device_name is the name of the NAS (in my case, mybook). Thereafter, shutting Ubuntu down took seconds rather than minutes indicating that I had found the problem.

After struggling for a week to get Ubuntu to mount the network share, I didn't really want to undo everything, but I did want to stop the automatic mount at bootup. This is easy: just comment out the device line in the fstab file.

sudo gedit /etc/fstab

Add a # (hash) to the relevant device and grub will ignore the line at boot. My file looks like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=d5837259-b437-46a8-a10c-3d962bf58e41 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=1b210c31-3575-4179-8fbd-c72984f8c8bb none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
#//MYBOOKWORLD/id19748494 /media/mybook cifs credentials=/home/jogga/.smbcredentials 0 0


I can still reach the device using Nautilus and the ip address but I can't use the device name (Netbios name) or the ip address to mount the device.

No comments:

Post a Comment