Skip to contentSkip to conversation

btt device node disappeared after configure with non support sector_size

DISCUSSION Yi Zhang 2 participants 3 messages Aug 4, 2016 4 messages not in the archive libnvdimm: non-volatile memory device

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1128592617.11251323.1470302026839.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

Yi Zhang

author
#2 lore raw

Hi folks,

Seems I hit one issue that btt device node disappeared after configure with non support sector_size, could you help confirm it?

4.7.0

# ndctl create-namespace -f -e namespace0.0 --mode=sector  -l 512
{
  "dev":"namespace0.0",
  "mode":"sector",
  "uuid":"45b4900d-da76-47c8-956f-a70e4ea33fe3",
  "sector_size":512,
  "blockdev":"pmem0s"
}
# lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
pmem0s 259:0    0     8G  0 disk 
pmem1s 259:2    0   7.1G  0 disk 
pmem2s 259:1    0   7.1G  0 disk 
pmem3s 259:3    0   7.1G  0 disk 
# ndctl create-namespace -f -e namespace0.0 --mode=sector  -l 513
failed to reconfigure namespace
# lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
pmem1s 259:2    0   7.1G  0 disk 
pmem2s 259:1    0   7.1G  0 disk 
pmem3s 259:3    0   7.1G  0 disk 

Best Regards,
Yi Zhang

A message that is not in the archive (sent off-list or not yet received): 865881147.11251583.1470302147073.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#4 lore raw
Quoted 22 lines · Yi Zhang

Hi folks,

Seems I hit one issue that btt device node disappeared after configure with non support sector_size, could you help confirm it?

4.7.0

# ndctl create-namespace -f -e namespace0.0 --mode=sector  -l 512
{
  "dev":"namespace0.0",
  "mode":"sector",
  "uuid":"45b4900d-da76-47c8-956f-a70e4ea33fe3",
  "sector_size":512,
  "blockdev":"pmem0s"
}
# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
pmem0s 259:0    0     8G  0 disk
pmem1s 259:2    0   7.1G  0 disk
pmem2s 259:1    0   7.1G  0 disk
pmem3s 259:3    0   7.1G  0 disk
# ndctl create-namespace -f -e namespace0.0 --mode=sector  -l 513
failed to reconfigure namespace
Quoted 5 lines
# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
pmem1s 259:2    0   7.1G  0 disk
pmem2s 259:1    0   7.1G  0 disk
pmem3s 259:3    0   7.1G  0 disk

This is expected if you specify invalid namespace values, but we should be trapping this case and reporting a more useful error message from ndctl rather than letting the kernel fail the namespace setup.

For now, you can fix this by re-configuring the namespace with valid values.

A message that is not in the archive (sent off-list or not yet received): CAPcyv4i7o80YuYqpF07YQz4P3RAEYr-NZTLgi53=jMsYEPvOVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

author
#6 lore raw
Quoted 28 lines · Dan Williams
Quoted 22 lines · Yi Zhang

Hi folks,

Seems I hit one issue that btt device node disappeared after configure with non support sector_size, could you help confirm it?

4.7.0

# ndctl create-namespace -f -e namespace0.0 --mode=sector  -l 512
{
   "dev":"namespace0.0",
   "mode":"sector",
   "uuid":"45b4900d-da76-47c8-956f-a70e4ea33fe3",
   "sector_size":512,
   "blockdev":"pmem0s"
}
# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
pmem0s 259:0    0     8G  0 disk
pmem1s 259:2    0   7.1G  0 disk
pmem2s 259:1    0   7.1G  0 disk
pmem3s 259:3    0   7.1G  0 disk
# ndctl create-namespace -f -e namespace0.0 --mode=sector  -l 513
failed to reconfigure namespace
Quoted 5 lines
# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
pmem1s 259:2    0   7.1G  0 disk
pmem2s 259:1    0   7.1G  0 disk
pmem3s 259:3    0   7.1G  0 disk
Quoted 5 lines

This is expected if you specify invalid namespace values, but we should be trapping this case and reporting a more useful error message from ndctl rather than letting the kernel fail the namespace setup.

For now, you can fix this by re-configuring the namespace with valid values.

yes, I have re-configured with valid sector size and the pmem0s reconfigured.
I think it's better to let the pmem0s device node still exist and can be used rather than fail the kernel setup. :)

Thanks
Yi