Seagate Expansion external hard drive and removing STANDBY mode

A problem associated with several brands of external hard drives are the settings. Once setting in particular is the STANDBY mode. STANDBY mode is a resource saving mode, so the external USB drive does not consume power and kernel resources during periods of inactivity. The easiest way to disable the STANDBY mode is to attach the NTFS formatted device to a Window’s server, open the device’s management console, and disable the STANDBY setting. What if you have already attached the device to the Linux server?

The tool to working with USB devices is sdparm. In CentOS and RedHat you can obtain the version of sdparm compatible with your architecture using YUM. To find the package run: ‘sudo yum list \*sdparm\*`. The hardware I am using is i386, so the package returned is: sdparm.i386. Run: `sudo yum install sdparm.i386` to install the package.

To view the parameters of the device run: `sudo sdparm -a /dev/(device name for the USB disk)`.

sudo sdparm -a /dev/sdb

    /dev/sdb: Seagate   Desktop           0130

Power condition mode page:

PM_BG       		0  	[cha: n, def:  0, sav:  0]

STANDBY_Y   	0  	[cha: n, def:  0, sav:  0]

IDLE_C      		0  	[cha: n, def:  0, sav:  0]

IDLE_B      		0  	[cha: n, def:  0, sav:  0]

IDLE        		0  	[cha: n, def:  0, sav:  0]

STANDBY     	1  	[cha: y, def:  1, sav:  1]

ICT         		0  	[cha: n, def:  0, sav:  0]

SCT       		9000  	[cha: y, def:9000, sav:9000]

SAT ATA 		Power condition mode page:

APMP        		0  	[cha: n, def:  0, sav:  0]

APM         		0  	[cha: n, def:  0, sav:  0]

Running sdparm actually shows you the type of device. If you have an older device, you can use sdparm to see the device type. The parameter that is a concern with the Seagate Expansion external hard drive is the STANBY 1. That setting needs to be set to 0, so it is off.

You can run `sudo sdparm` to see a listing of options.

I ran `sudo sdparm –clear=STANDBY /dev/sdb` to clear or set to 0 the STANDBY mode. Now when I run `sudo sdparm -a /dev/sdb` this is what we see:

sudo sdparm -a /dev/sdb

 /dev/sdb: Seagate   Desktop           0130

Power condition mode page:

PM_BG       		0  		[cha: n, def:  0, sav:  0]

STANDBY_Y   	0  		[cha: n, def:  0, sav:  0]

IDLE_C      		0  		[cha: n, def:  0, sav:  0]

IDLE_B      		0  		[cha: n, def:  0, sav:  0]

IDLE        		0  		[cha: n, def:  0, sav:  0]

STANDBY     	0  		[cha: y, def:  1, sav:  1]

ICT         		0  		[cha: n, def:  0, sav:  0]

SCT       		4294967286  [cha: y, def:9000, sav:9000]

SAT ATA 		Power condition mode page:

APMP        		0  		[cha: n, def:  0, sav:  0]

APM         		0  		[cha: n, def:  0, sav:  0]

That should be all you need to perform to remove the STANDBY mode. Now, be warned that once you restart the Linux system the device will return to the default settings. What I did to overcome this limitation was to place the following two lines in the /etc/rc.local file:

if [[ `/sbin/fdisk -l /dev/sdb`]]
then
   /usr/bin/sdparm --clear=STANDBY /dev/sdb
   mount /dev/sdb1 /mnt/usb
fi

The last script to run is the /etc/rc.local so the changes take place prior to the device being mounted. The if statement ensures the device exists.

NTFS as a universal file system for Seagate, Western Digital, and other USB devices

I needed additional storage, The storage needed to be able to support Cent OS, Red Hat, and Windows. The storage would be required to house all types of files. The storage would also need to be inexpensive and portable.

The solution was the Seagate Expansion, USB 2.0 Plug-and-play, 1 TB external drive. Purchase price was $69 on amazon.com. I received the Seagate Expansion drive in three business days through the United States Postal Service.

When the external drive arrived, I need to decide which computer to attach the device. I have several laptops running Windows Vista and Windows 7; however, the laptops would not be available all the time. I could attach the device to a Windows 2000 server and share the file system or I could attach the device to Cent OS 5.7, i386.

I decided to work with the Cent OS system. The Cent OS 5.7 is running xen-3.0.3. The quests range in operating systems from Windows 2003 to Red Hat 5.6 server depending upon the current project. Cent OS and Red Hat can be configured to support NTFS partitions, but Windows had difficulty supporting ext3 partitions. Anther concern was the propagation of viruses on the share to the operating system, which Linux is very immune to due to permissions and file system structure.

The first step was to connect the USB drive to the laptop via a USB port. Once it was attached, a message immediately appeared that the device could not be mounted due to a file system issue. So, the first step is to configure NTFS file system support for the kernel.

In order for the kernel to support NTFS the ntfs-3g package needs to be installed. The package in CentOS 5.7 i386 is fuse-ntfs-3g-2010.2-1.el5.rf. A very good article was, “http://www.mywurdz.com/node/222” titled “Installing NTFS support in CentOS 5.5.” The laptop hardware is i386 and the article is written for x86_64, so here are the commands I ran:

That was all there is to mounting the device. Best of all, no OS restart was required to install the NTFS support. Now, the device is portable from CentOS to the other Window’s operating systems on the network. All Linux 2.6 kernels provide support for NTFS; however, the package to examine and install is ntfs-3g.

WordPress Themes