All of lore.kernel.org
 help / color / mirror / Atom feed
* NVM Express Format
@ 2014-06-25 14:58 Ian Ziemba
  2014-06-25 15:34 ` Dan McLeran
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ian Ziemba @ 2014-06-25 14:58 UTC (permalink / raw)


Hi,

I am curious about how to issue a scsi format command to a PCIe SSD. I have the NVM Express Linux drivers loaded onto my system. I have tried using the Linux command "sg_format" but that does not work. Is there a NVM Express command that will accomplish this? If so, how would I go about using this command? My goal is to be able to have a method of purging the SSD in order to run performance tests on the drive.

My system is running OpenSUSE 11 SP13. The Linux kernel version is at 3.16.

I am new to NVM Express so any thoughts or insight will be appreciated.

Thanks,

Ian Ziemba
I/O Engineer Intern
Storage and Data Management
Cray Inc.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* NVM Express Format
  2014-06-25 14:58 NVM Express Format Ian Ziemba
@ 2014-06-25 15:34 ` Dan McLeran
  2014-06-25 15:47 ` Dan McLeran
  2014-06-25 15:47 ` Keith Busch
  2 siblings, 0 replies; 6+ messages in thread
From: Dan McLeran @ 2014-06-25 15:34 UTC (permalink / raw)


If you just want to get the disk formatted for testing
just use fdisk to partition the drive followed by 
mkfs.ext4 or whatever file system you want to use.

On my system:

fdisk /dev/nvme0n1

create a partition

mkfs.ext4 /dev/nvme0n1p1

works like a charm.

On Wed, 25 Jun 2014, Ian Ziemba wrote:

> Hi,
>
> I am curious about how to issue a scsi format command to a PCIe SSD. I have the NVM Express Linux drivers loaded onto my system. I have tried using the Linux command "sg_format" but that does not work. Is there a NVM Express command that will accomplish this? If so, how would I go about using this command? My goal is to be able to have a method of purging the SSD in order to run performance tests on the drive.
>
> My system is running OpenSUSE 11 SP13. The Linux kernel version is at 3.16.
>
> I am new to NVM Express so any thoughts or insight will be appreciated.
>
> Thanks,
>
> Ian Ziemba
> I/O Engineer Intern
> Storage and Data Management
> Cray Inc.
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* NVM Express Format
  2014-06-25 14:58 NVM Express Format Ian Ziemba
  2014-06-25 15:34 ` Dan McLeran
@ 2014-06-25 15:47 ` Dan McLeran
  2014-06-25 15:47 ` Keith Busch
  2 siblings, 0 replies; 6+ messages in thread
From: Dan McLeran @ 2014-06-25 15:47 UTC (permalink / raw)


FYI, if this is a device which has never before been formatted then you 
would need to send down MODE_SELECT before FORMAT_UNIT if you want to do 
this via SCSI. I've never done it this way so I don't know exactly what to 
do.

On Wed, 25 Jun 2014, Ian Ziemba wrote:

> Hi,
>
> I am curious about how to issue a scsi format command to a PCIe SSD. I have the NVM Express Linux drivers loaded onto my system. I have tried using the Linux command "sg_format" but that does not work. Is there a NVM Express command that will accomplish this? If so, how would I go about using this command? My goal is to be able to have a method of purging the SSD in order to run performance tests on the drive.
>
> My system is running OpenSUSE 11 SP13. The Linux kernel version is at 3.16.
>
> I am new to NVM Express so any thoughts or insight will be appreciated.
>
> Thanks,
>
> Ian Ziemba
> I/O Engineer Intern
> Storage and Data Management
> Cray Inc.
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* NVM Express Format
  2014-06-25 14:58 NVM Express Format Ian Ziemba
  2014-06-25 15:34 ` Dan McLeran
  2014-06-25 15:47 ` Dan McLeran
@ 2014-06-25 15:47 ` Keith Busch
  2014-07-03 13:03   ` Indraneel Mukherjee
  2 siblings, 1 reply; 6+ messages in thread
From: Keith Busch @ 2014-06-25 15:47 UTC (permalink / raw)


On Wed, 25 Jun 2014, Ian Ziemba wrote:
> I am curious about how to issue a scsi format command to a PCIe SSD. I have
> the NVM Express Linux drivers loaded onto my system. I have tried using the
> Linux command "sg_format" but that does not work. Is there a NVM Express
> command that will accomplish this? If so, how would I go about using this
> command? My goal is to be able to have a method of purging the SSD in order
> to run performance tests on the drive.

sg_format should work, otherwise it's a bug. Can you tell me what you're
running and what happens in your test?

If you want to go with a native nvme-express option instead of using scsi,
I have some example programs at

http://git.infradead.org/users/kbusch/nvme-user.git

Assuming your kernel's uapi headers are installed, it should compile
all the programs without issue, and there's an "nvme_format" that will
use the nvme passthrough to issue a format.

> My system is running OpenSUSE 11 SP13. The Linux kernel version is at 3.16.
>
> I am new to NVM Express so any thoughts or insight will be appreciated.
>
> Thanks,
>
> Ian Ziemba
> I/O Engineer Intern
> Storage and Data Management
> Cray Inc.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* NVM Express Format
  2014-06-25 15:47 ` Keith Busch
@ 2014-07-03 13:03   ` Indraneel Mukherjee
  2014-07-03 15:48     ` Keith Busch
  0 siblings, 1 reply; 6+ messages in thread
From: Indraneel Mukherjee @ 2014-07-03 13:03 UTC (permalink / raw)


> -----Original Message-----
> From: Linux-nvme [mailto:linux-nvme-bounces at lists.infradead.org] On Behalf
> Of Keith Busch
> Sent: Wednesday, June 25, 2014 9:17 PM
> To: Ian Ziemba
> Cc: linux-nvme at lists.infradead.org
> Subject: Re: NVM Express Format
> 
> On Wed, 25 Jun 2014, Ian Ziemba wrote:
> > I am curious about how to issue a scsi format command to a PCIe SSD. I
> > have the NVM Express Linux drivers loaded onto my system. I have tried
> > using the Linux command "sg_format" but that does not work. Is there a
> > NVM Express command that will accomplish this? If so, how would I go
> > about using this command? My goal is to be able to have a method of
> > purging the SSD in order to run performance tests on the drive.
> 
> sg_format should work, otherwise it's a bug. Can you tell me what you're
> running and what happens in your test?

sg_format does not appear to work with the NVMe driver. Reason being that
before doing the actual format, 
sg_format issues a MODE_SENSE with Page Code 0x1 to get info like current
Num Of Blocks, Block Size
and Write Protect setting for the SCSI disk in question.
The driver does not have implementation for Page Code 1 as the current
SCSI-NVMe translation spec(Rev 1.2) 
does NOT support Page Code 0x1 (Read-Write Error Recovery mode page).
The driver cannot be faulted for this.

> 
> If you want to go with a native nvme-express option instead of using scsi,
I have
> some example programs at
> 
> http://git.infradead.org/users/kbusch/nvme-user.git
> 
> Assuming your kernel's uapi headers are installed, it should compile all
the
> programs without issue, and there's an "nvme_format" that will use the
nvme
> passthrough to issue a format.
> 
> > My system is running OpenSUSE 11 SP13. The Linux kernel version is at
3.16.
> >
> > I am new to NVM Express so any thoughts or insight will be appreciated.
> >
> > Thanks,
> >
> > Ian Ziemba
> > I/O Engineer Intern
> > Storage and Data Management
> > Cray Inc.
> 
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 6+ messages in thread

* NVM Express Format
  2014-07-03 13:03   ` Indraneel Mukherjee
@ 2014-07-03 15:48     ` Keith Busch
  0 siblings, 0 replies; 6+ messages in thread
From: Keith Busch @ 2014-07-03 15:48 UTC (permalink / raw)


On Thu, 3 Jul 2014, Indraneel Mukherjee wrote:
> sg_format does not appear to work with the NVMe driver. Reason being that
> before doing the actual format, sg_format issues a MODE_SENSE with Page Code
> 0x1 to get info like current Num Of Blocks, Block Size and Write Protect
> setting for the SCSI disk in question.  The driver does not have
> implementation for Page Code 1 as the current SCSI-NVMe translation spec(Rev
> 1.2) does NOT support Page Code 0x1 (Read-Write Error Recovery mode page).
> The driver cannot be faulted for this.

Thanks for the info. I'll send a proposal to the committee and see if
they'll add translation support for this page in the next revision. I
don't think we need to wait for an official release before adding support
in the driver if it sounds like the proposal is acceptable.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-03 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 14:58 NVM Express Format Ian Ziemba
2014-06-25 15:34 ` Dan McLeran
2014-06-25 15:47 ` Dan McLeran
2014-06-25 15:47 ` Keith Busch
2014-07-03 13:03   ` Indraneel Mukherjee
2014-07-03 15:48     ` Keith Busch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.