Slave drive cant be accessed over network

Sl33py

Well-Known Member
Joined
Mar 11, 2009
Messages
262
Hi
I have a slave drive that is shared so my server can do a backup to it. I use Ubuntu 11.4
The problem is that the drive sleeps/spins down so nothing can access the shares. If I go to Places and then open the drive it spins up and I can access it from my pc and from the network.


The drive only gets used for backups and when my network scanner scans to it.
How do I solve this problem?


Thanks
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
Then check the following:

Make sure there is no "noauto" in fstab behind the drive entry.
Code:
sudo gedit /etc/fstab

To know what drive entry to look for:
Code:
ls -l /dev/disk/by-uuid

Secondly, check out the following file:
Code:
sudo gedit /etc/hdparm.conf

And make sure there is nothing like this:
Code:
/dev/sd(x) {
spindown_time = 241
}
/dev/sdf {
spindown_time = 241
}

Thirdly, make sure you did not accidentally put your desktop in laptop-mode:
https://wiki.ubuntu.com/PowerManagement
Confirm this quickly and then we know we can move on.
 

Sl33py

Well-Known Member
Joined
Mar 11, 2009
Messages
262
cp@cp-pc:~$ ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 2012-03-15 09:31 2EA204CFA2049E09 -> ../../sda1
lrwxrwxrwx 1 root root 10 2012-03-15 09:31 4C7C0B467C0B29F2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2012-03-15 09:31 7A089F99089F534D -> ../../sdc1
lrwxrwxrwx 1 root root 10 2012-03-15 09:31 aa577545-4d4d-4658-ac59-ba1442bb9346 -> ../../sda5
lrwxrwxrwx 1 root root 10 2012-03-15 09:31 b1d13253-54b5-4034-b16a-a6057e6fefe4 -> ../../sda6
lrwxrwxrwx 1 root root 10 2012-03-15 09:31 d7c9b952-20f7-4b00-a99b-de9421cd8cc2 -> ../../sdb1
cp@cp-pc:~$ ls



# /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).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=aa577545-4d4d-4658-ac59-ba1442bb9346 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=b1d13253-54b5-4034-b16a-a6057e6fefe4 none swap sw 0 0

//10.0.0.15/data /media/data cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
//10.0.0.15/customer /media/Customer-Backup cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
 

Sl33py

Well-Known Member
Joined
Mar 11, 2009
Messages
262
I am pretty sure it is d7c9b952-20f7-4b00-a99b-de9421cd8cc2 -> ../../sdb1
And it does not look like anything is commented out here

## This is the default configuration for hdparm for Debian. It is a
## rather simple script, so please follow the following guidelines :)
## Any line that begins with a comment is ignored - add as many as you
## like. Note that an in-line comment is not supported. If a line
## consists of whitespace only (tabs, spaces, carriage return), it will be
## ignored, so you can space control fields as you like. ANYTHING ELSE
## IS PARSED!! This means that lines with stray characters or lines that
## use non # comment characters will be interpreted by the initscript.
## This has probably minor, but potentially serious, side effects for your
## hard drives, so please follow the guidelines. Patches to improve
## flexibilty welcome. Please read /usr/share/doc/hdparm/README.Debian for
## notes about known issues, especially if you have an MD array.
##
## Note that if the init script causes boot problems, you can pass 'nohdparm'
## on the kernel command line, and the script will not be run.
##
## Uncommenting the options below will cause them to be added to the DEFAULT
## string which is prepended to options listed in the blocks below.
##
## If an option is listed twice, the second instance replaces the first.
##
## /sbin/hdparm is not run unless a block of the form:
## DEV {
## option
## option
## ...
## }
## exists. This blocks will cause /sbin/hdparm OPTIONS DEV to be run.
## Where OPTIONS is the concatenation of all options previously defined
## outside of a block and all options defined with in the block.

# -q be quiet
quiet
# -a sector count for filesystem read-ahead
#read_ahead_sect = 12
# -A disable/enable the IDE drive's read-lookahead feature
#lookahead = on
# -b bus state
#bus = on
# -B apm setting
#apm = 255
# -c enable (E)IDE 32-bit I/O support - can be any of 0,1,3
#io32_support = 1
# -d disable/enable the "using_dma" flag for this drive
#dma = off
# -D enable/disable the on-drive defect management
#defect_mana = off
# -E cdrom speed
#cd_speed = 16
# -k disable/enable the "keep_settings_over_reset" flag for this drive
#keep_settings_over_reset = off
# -K disable/enable the drive's "keep_features_over_reset" flag
#keep_features_over_reset = on
# -m sector count for multiple sector I/O
#mult_sect_io = 32
# -P maximum sector count for the drive's internal prefetch mechanism
#prefetch_sect = 12
# -r read-only flag for device
#read_only = off
# -s Turn on/off power on in standby mode
# poweron_standby = off
# -S standby (spindown) timeout for the drive
#spindown_time = 24
# -u interrupt-unmask flag for the drive
#interrupt_unmask = on
# -W Disable/enable the IDE drive's write-caching feature
#write_cache = off
# -X IDE transfer mode for newer (E)IDE/ATA2 drives
#transfer_mode = 34
# -y force to immediately enter the standby mode
#standby
# -Y force to immediately enter the sleep mode
#sleep
# -Z Disable the power-saving function of certain Seagate drives
#disable_seagate
# -M Set the acoustic management properties of a drive
#acoustic_management
# -p Set the chipset PIO mode
# chipset_pio_mode
# --security-freeze Freeze the drive's security status
# security_freeze
# --security-unlock Unlock the drive's security
# security_unlock = PWD
# --security-set-pass Set security password
# security_pass = password
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
Please use this to paste files:
http://pastebin.com/

and then post the link here, makes it easier and the last output you pasted is not the entire file.

Also, to make sure that it is indeed spinning down, next time the drive is sleeping:
Code:
sudo hdparm -C /dev/sdb

What is strange is that the drive is not listed in fstab, what files system is on the drive?
 
Last edited:

Sl33py

Well-Known Member
Joined
Mar 11, 2009
Messages
262
http://pastebin.com/Lmjiva9f

I am dual booting with win7, i switched over to Ubuntu about 3 weeks ago and now using it as my main os. the driver was first a ntfs drive but i have now deleted the windows partitions and created it with ext4 now maybe that is why its confused?

The drive is not sleepy now so will run that command later
 

Sl33py

Well-Known Member
Joined
Mar 11, 2009
Messages
262
drive state is: active/idle

I cant access the drive over the network, it is not showing up under my places after I double click on it under computer it shows up under places and can access over network
 

ponder

Honorary Master
Joined
Jan 22, 2005
Messages
92,823
Try setting the drives apm = 255 (or 254) and see if it helps.
 

Sl33py

Well-Known Member
Joined
Mar 11, 2009
Messages
262
cp@cp-pc:~$ sudo hdparm -B 255 /dev/sdb

/dev/sdb:
setting Advanced Power Management level to disabled
HDIO_DRIVE_CMD failed: Input/output error
APM_level = not supported
 
Top