LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2013, 06:26 AM   #1
kishore_kumar
LQ Newbie
 
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
Wink sg_wr_mode: bad field in MODE SELECT (10) command


I would like to know how can I do a mode select (10) command effectively to save a page content. via sg_util tools .

While I tried the way using the help command provided by sg_wr_mode command , I see a response for my command as
"bad field in MODE SELECT (10) command". Appreciate some one can help me with this .

Here is the command I send . I used the command
sg_modes -vv -p 0x01 -c 1 /dev/sdb to see the page values as changeable before I attempted the sg_wr_mode command

sg_modes -vv -p 0x01 -c 1 /dev/sdb
open /dev/sdb with flags=0x800
inquiry cdb: 12 00 00 00 24 00
ATA TX21B10100GE8IBM SP3A peripheral_type: disk [0x0]
mode sense (10) cdb: 5a 00 41 00 00 00 00 10 00 00
mode sense (10): requested 4096 bytes but got 28 bytes
Mode parameter header from MODE SENSE(10):
Mode data length=28, medium type=0x00, WP=0, DpoFua=0, longlba=0
Block descriptor length=8
> Direct access device block descriptors:
Density code=0x0
00 00 00 00 00 00 00 02 00

>> Read-Write error recovery, page_control: changeable
00 01 0a 00 00 00 00 00 00 00 00 00 00

Here is the command in trouble.
[root@X-40f2e94c1ca8 /]# sg_wr_mode -vv -p 0x01 -c "0 0 0 0 11" -m "0 0 0 0 ff" /dev/sdb
open /dev/sdb with flags=0x802
inquiry cdb: 12 00 00 00 24 00
mode sense (10) cdb: 5a 00 01 00 00 00 00 08 00 00
mode sense (10): requested 2048 bytes but got 28 bytes
mode select (10) cdb: 55 10 00 00 00 00 00 00 1c 00
mode select (10) parameter list
00 00 00 00 00 00 00 08 00 00 00 00 00 00 02 00
01 0a 80 00 11 00 00 00 00 00 00 00
mode select (10): Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid field in parameter list
Raw sense data (in hex):
70 00 05 00 00 00 00 0a 00 00 00 00 26 00 00 00
00 00
bad field in MODE SELECT (10) command





Essentially I want to know , how Can I provide the correct input to the sg_wr_mode command to change the READ-WRITE error recovery page ( any chaengable page would do) with an working example . I am trying to see the mode select command works from guest using virtio-scsi path anyways.

Appreciate your help with this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ORACLE Select and group by excluding one field Lucas Rey Programming 4 08-17-2012 02:20 PM
Can I execute a shell command and put the result in command field? fran4tw Linux - General 9 08-08-2011 09:27 PM
[SOLVED] Select lines from FileA based on a key field in FileB danielbmartin Linux - Newbie 2 02-11-2011 12:37 PM
Firefox and URL field select-all in Linux? brianpbarnes Linux - Software 2 02-03-2009 10:34 AM
Which burn mode do I select? darklight55 Ubuntu 2 12-07-2006 12:24 AM


All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration