Comments (7)
I have changed the follow lines from the script forcing my enclosure wwn because he's getting a weird enclosure wwn:
66 #encl = enclosures[sasdev.attrs.enclosure_identifier]
67 encl = enclosures['0x50001ff2343d063e']
But, I'm still getting a weird alias name (at least the bay identifier was found):
sdc_no_snic-bay36
from sasutils.
Requires sg_ses from sg3_utils (recent version, like 1.77).
My sg3_utils is:
sg3_utils-1.37-9.el7.x86_64
This could be the problem. I gonna update it.
from sasutils.
@tcuryddn Thanks for sharing/reporting this. I guess you should be good with the version of sg3_utils shipped with CentOS 7.3.
The udev scripts only work when a SES-2 Subenclosure nickname is properly set on the enclosure. If not, it uses <device>_no_snic
so that's normal.
Subenclosure nickname is a SES-2 standard thing.
You can set/get subenclosure nickname using the commands below. You first need to find the SCSI generic device of your enclosure. You can use sas_discover -v --dev
to help find it.
Set nickname (persistent):
# sg_ses -p snic --nickname=io1-jbod2-1 -c /dev/sg130
QCT JB4602 SIM 1 1100
Get nickname:
# sg_ses -p snic /dev/sg130
QCT JB4602 SIM 1 1100
Subenclosure nickname status diagnostic page:
number of secondary subenclosures: 0
generation code: 0x0
subenclosure identifier: 0
nickname status: 0x0
nickname additional status: 0x0
nickname language code:
nickname: io1-jbod2-1
Still, I'm not sure why sasdev.attrs.enclosure_identifier
is not propertly set in your case. Could you print sasdev.attrs.enclosure_identifier in the script and let me know its value? This might be fixed in CentOS 7.4 too.
from sasutils.
root# sas_sd_snic_alias sdc
sasdev.attrs.enclosure_identifier = 0x50001ff2343d0400
enclosures = {'0x50001ff23440c63e': <sasutils.scsi.EnclosureDevice '/sys/class/enclosure/12:0:4:0/device'>, '0x50001ff2343d063e': <sasutils.scsi.EnclosureDevice '/sys/class/enclosure/1:0:5:0/device'>}
WARNING:root:sdc not an array device (/sys/block/sdc/device/block/sdc)
Not found: '0x50001ff2343d0400'
from sasutils.
@thiell, I figured out that my enclosure doesn't support subenclosure nickname (SES-2):
[root@oss01 ~]# sg_ses -p 0 /dev/sg5
DDN SS8462 0124
Supported diagnostic pages:
Supported Diagnostic Pages [sdp] [0x0]
Configuration (SES) [cf] [0x1]
Enclosure Status/Control (SES) [ec,es] [0x2]
String In/Out (SES) [str] [0x4]
Threshold In/Out (SES) [th] [0x5]
Element Descriptor (SES) [ed] [0x7]
Additional Element Status (SES-2) [aes] [0xa]
Download Microcode (SES-2) [dm] [0xe]
<unknown> [0x80]
So, I think that this script won't help me right?
from sasutils.
Hi @thiell, what file/function parses the instruction "sasdev.attrs.enclosure_identifier"? I want to debug and check why is getting a wrong wwn.
from sasutils.
hummmm My file system has a file inside de device with a wrong enclosure identifier. Strange.. looks like is a problem here, not the script.
from sasutils.
Related Issues (20)
- sas_devices outputs warning HOT 2
- unpack_from requires a buffer of at least 1 bytes HOT 1
- sas_devices: easy way to filter enclosure and drive
- UTF-8 issue with ses_report in Ubuntu 20.04.1 with sasutils-0.3.10 HOT 8
- AttributeError: 'SysfsAttributes' object has no attribute 'sas_address' HOT 2
- AttributeError: module 'collections' has no attribute 'MutableMapping'
- sas_devices: display sg devices for enclosures HOT 1
- 0.3.12: test suite uses `nose` HOT 1
- Not found: '/sys/class/sas_host/host4/device/port-4:3/end_device-4:3/target4:0:3/4:0:3:0/scsi_generic/*[0-9]' HOT 3
- No issue: sg_ses now supports JSON output HOT 4
- 0.3.13 throws exception when listing the sas devices HOT 6
- sas_counters: add block device to phy counters when applicable
- sas_discover: filter non-printable characters HOT 2
- Intermittent missing symlinks with sas_mpath_snic_alias; possible timing issue? HOT 1
- .deb from mkdeb.sh: SyntaxError: invalid syntax HOT 2
- Add sg3_utils as a general requirement
- Create man pages HOT 1
- sas_counters: Fix exception when bay_identifier returns EINVAL
- sas_discover: unorderable types in Python 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sasutils.