New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support long nutanix device names #1471

Closed
phillxnet opened this Issue Oct 11, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@phillxnet
Member

phillxnet commented Oct 11, 2016

Thanks to forum member @dannyboy1121 it has come to light that serial numbers of Nutanix CE block devices (a KVM based platform) can exceed that of Rockstor's Disk.name db field, assuming the consequent by-id name uses the entire serial number. Is is not yet know however if udev is even providing the require by-id names. A request in the following forum thread has been placed to gain further information on the /dev/disk/by-id mappings that are required for all Rockstor versions from 3.8-14.02 onwards.

Please update the following forum thread for significant progress on this issue:
https://forum.rockstor.com/t/adding-virtual-disks-pool-issues/2006

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Oct 11, 2016

Member

@dannyboy1121 has responded in the referenced forum thread with an ls -la of /dev/disk/by-id which showed that by-id mappings were present and the base device names were of the form:
"scsi-1NUTANIX_NFS_3_0_453_" = 26 chars and then a uuid reference
of the usual 8_4_4_4_12 = 36 chars format, so the total length is 62 chars.
This is OK for the existing Disk.name db field however the system disk name would add an additional:
"-part3" = 6 chars to address the partition component of the by-id name.

So the end result is a failure to accommodate the system disk by-id name of 68 chars.

I propose that we double the current 64 char Disk.name db field to 128 chars; especially in light of potentially accommodating iSCSI targets which may likewise have very long by-id name references.

Member

phillxnet commented Oct 11, 2016

@dannyboy1121 has responded in the referenced forum thread with an ls -la of /dev/disk/by-id which showed that by-id mappings were present and the base device names were of the form:
"scsi-1NUTANIX_NFS_3_0_453_" = 26 chars and then a uuid reference
of the usual 8_4_4_4_12 = 36 chars format, so the total length is 62 chars.
This is OK for the existing Disk.name db field however the system disk name would add an additional:
"-part3" = 6 chars to address the partition component of the by-id name.

So the end result is a failure to accommodate the system disk by-id name of 68 chars.

I propose that we double the current 64 char Disk.name db field to 128 chars; especially in light of potentially accommodating iSCSI targets which may likewise have very long by-id name references.

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Oct 11, 2016

Member

@schakrava I will attempt to prepare a pr for this issue tomorrow (UK) in the hope of making it available ready for the next (pending) stable release. I have seen no other candidates for by-id name overflow and haven't noticed any reports of the same on the forum, for our current testing channel; however these more exotic mappings are the most likely to trigger this limitation, especially given their use of the long uuid4 components.

Member

phillxnet commented Oct 11, 2016

@schakrava I will attempt to prepare a pr for this issue tomorrow (UK) in the hope of making it available ready for the next (pending) stable release. I have seen no other candidates for by-id name overflow and haven't noticed any reports of the same on the forum, for our current testing channel; however these more exotic mappings are the most likely to trigger this limitation, especially given their use of the long uuid4 components.

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 12, 2016

double disk names field length to 128 characters rockstor#1471
With the move to the much longer by-id names the maximum
length of device names can in some circumstances exceed the
prior limit of 64 chars. Longest by-id name so far reported is
68 chars including the -part3 component.
@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Oct 12, 2016

Member

After applying the Disk.name field length changes in:
phillxnet@b038d9f
the following command was run to generated the South db migration file:

[root@rockdev rockstor-dev]# /opt/rockstor-dev/bin/django schemamigration storageadmin --auto
 ~ Changed field name on storageadmin.Disk
Created 0047_auto__chg_field_disk_name.py. You can now apply this migration with: ./manage.py migrate storageadmin
Member

phillxnet commented Oct 12, 2016

After applying the Disk.name field length changes in:
phillxnet@b038d9f
the following command was run to generated the South db migration file:

[root@rockdev rockstor-dev]# /opt/rockstor-dev/bin/django schemamigration storageadmin --auto
 ~ Changed field name on storageadmin.Disk
Created 0047_auto__chg_field_disk_name.py. You can now apply this migration with: ./manage.py migrate storageadmin

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 12, 2016

db migration file for disk.name field length from 64 to 128 characters
…rockstor#1471

With the move to the much longer by-id names the maximum
length of device names can in some circumstances exceed the
prior limit of 64 chars. Longest by-id name so far reported is
68 chars including the -part3 component.
@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Oct 12, 2016

Member

From local db access prior to migration command we have:

\d storageadmin_disk;

   Column      |          Type           |                           Modifiers
...
name            | character varying(64)   | not null
...

then after a migration command:

[root@rockdev rockstor-dev]# /opt/rockstor-dev/bin/django migrate storageadmin --database=default
Running migrations for storageadmin:
 - Migrating forwards to 0047_auto__chg_field_disk_name.
 > storageadmin:0047_auto__chg_field_disk_name
 - Loading initial data for storageadmin.
Installed 0 object(s) from 0 fixture(s)

we have:

     Column      |          Type           |                           Modifiers
...
name            | character varying(128)  | not null
...
Member

phillxnet commented Oct 12, 2016

From local db access prior to migration command we have:

\d storageadmin_disk;

   Column      |          Type           |                           Modifiers
...
name            | character varying(64)   | not null
...

then after a migration command:

[root@rockdev rockstor-dev]# /opt/rockstor-dev/bin/django migrate storageadmin --database=default
Running migrations for storageadmin:
 - Migrating forwards to 0047_auto__chg_field_disk_name.
 > storageadmin:0047_auto__chg_field_disk_name
 - Loading initial data for storageadmin.
Installed 0 object(s) from 0 fixture(s)

we have:

     Column      |          Type           |                           Modifiers
...
name            | character varying(128)  | not null
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment