CN108595117B - 一种动态容量调整过程中安全平滑的方法 - Google Patents

一种动态容量调整过程中安全平滑的方法 Download PDF

Info

Publication number
CN108595117B
CN108595117B CN201810272540.3A CN201810272540A CN108595117B CN 108595117 B CN108595117 B CN 108595117B CN 201810272540 A CN201810272540 A CN 201810272540A CN 108595117 B CN108595117 B CN 108595117B
Authority
CN
China
Prior art keywords
space
capacity
redundant space
current
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201810272540.3A
Other languages
English (en)
Other versions
CN108595117A (zh
Inventor
李招远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongguan Memory Storage Technology Co ltd
Ramaxel Technology Shenzhen Co Ltd
Original Assignee
Dongguan Memory Storage Technology Co ltd
Ramaxel Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongguan Memory Storage Technology Co ltd, Ramaxel Technology Shenzhen Co Ltd filed Critical Dongguan Memory Storage Technology Co ltd
Priority to CN201810272540.3A priority Critical patent/CN108595117B/zh
Publication of CN108595117A publication Critical patent/CN108595117A/zh
Application granted granted Critical
Publication of CN108595117B publication Critical patent/CN108595117B/zh
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2094Redundant storage or storage space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

本发明公开了一种动态容量调整过程中安全平滑的方法,其特征在于每次固态硬盘上电时系统进行复位,获取设备初始用户容量信息和当前用户容量信息,根据当前容量和冗余空间计算确定冗余空间下限,当系统发现出现新的坏块时,检查当前的冗余空间是否小于冗余空间下限,如果小于则从当前用户容量中分配一部分空间补充到冗余空间,保证冗余空间不小于冗余空间下限。本发明通过动态容量,并设定冗余空间的上限和下限和禁止向新容量以外的空间写入数据,原来写过数据的空间仍然可以进行读访问的方法,让存储设备不需要重新格式化就可以平滑的转换到新容量,从而更方便消费者的使用。

Description

一种动态容量调整过程中安全平滑的方法
技术领域
本发明涉及存储技术领域,尤其涉及一种动态容量调整过程中安全平滑的方法。
背景技术
Nand Flash是当今使用的最广泛的一种存贮介质,在存储设备中的得到了大量的使用。由于工艺和材料的原因Nand Flash在出厂时会有一些坏块,在后来的使用过程中也会产生新的坏块。在基于Nnad Flash固态存储设备中,由于NAND Flash必须要先擦除才能写入数据,所以设备中需要有超出设备标称容量的冗余空间来对已存储空间进行垃圾回收。当一个设备中的坏块超过一定的数量的时候,冗余空间不够时,会导致垃圾回收效率变低,甚至当坏块足够多时,出现根本回收不出空间的状况。当出现这种情况时,要么整个盘不可用了,要么降低容量使用,对于一般消费级产品来说,降低容量以获取足够的冗余空间是一个经济的方法,但是由于这时候可能有些数据还在超出新容量的空间之外,如果直接把这些数据丢弃,就有可能会导致系统数据丢失,因此业界的做法往往是让设备先进入只读状态,等待设备重新格式化,然后才能降低容量使用。
发明内容
针对以上缺陷,本发明目的在于如何解决出现大量坏块在固定冗余空间情况出现数据丢失的问题。
为了实现上述目的,本发明提供了一种动态容量调整过程中安全平滑的方法,其特征在于每次固态硬盘上电时系统进行复位,获取设备初始用户容量信息和当前用户容量信息,根据当前容量和冗余空间计算确定冗余空间下限,当系统发现出现新的坏块时,检查当前的冗余空间是否小于冗余空间下限,如果小于则从当前用户容量中分配一部分空间补充到冗余空间,保证冗余空间不小于冗余空间下限。
所述的动态容量调整过程中安全平滑的方法,其特征在于增加命令识别模块判断当前命令是否为写命令,如果是先判断当前命令的地址空间是否超出当前用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令;如果为非写命令,则增加判断当前命令的地址空间是否超出初始用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令。
本发明通过动态容量,并设定冗余空间的上限和下限和禁止向新容量以外的空间写入数据,原来写过数据的空间仍然可以进行读访问的方法,让存储设备不需要重新格式化就可以平滑的转换到新容量,从而更方便消费者的使用。
附图说明
图1是动态容量参数初始化流程图;
图2是动态容量调整的触发流程图;
图3是动态容量存储设备命令执行过程流程图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本技术提出了一种平滑过渡的动态容量调整方法,通过设定冗余空间的上限和下限和禁止向新容量以外的空间写入数据,原来写过数据的空间仍然可以进行读访问的方法,让存储设备不需要重新格式化就可以平滑的转换到新容量,从而更方便消费者的使用。具体调整过程如下:
图1是动态容量参数初始化流程图;存储设备出厂时,根据原生容量,设定初始用户容量空间的大小以及冗余空间的下限,冗余空间的下限是厂商依据设备产品的性能要求确定的,它是能够确保存储设备正常运行的并能保证一定性能条件下最少系统需要的冗余空间。在于每次固态硬盘上电时系统进行复位,获取设备初始用户容量信息和当前用户容量信息,根据当前容量和冗余空间计算确定冗余空间下限,并根据当前坏块数量确定当前冗余空间的大小。
图2是动态容量调整的触发流程图;当坏块增加到一定程度,导致冗余空间大小低于冗余下限时,设备应该进行态容量的调整,在容量调整时,应该使得在新容量下,冗余空间的大小不低于下限。因此增加当系统发现出现新的坏块时,当前冗余空间大小减去坏块造成的空间损失,获得当前实际冗余空间,检查当前的实际冗余空间是否小于冗余空间下限,如果小于则从当前用户容量中分配一部分空间补充到冗余空间,保证冗余空间不小于冗余空间下限。
图3是动态容量存储设备命令执行过程流程图;容量调整后,新容量在设备的设备信息中更新,主机通过查询可以知道。在新容量下,主机不允许对超出新容量空间外的数据进行写操作,但是允许主机对超出新容量空间但仍在初始用户容量空间内的数据进行读取和擦除(或者Trim)操作。具体为通过增加命令识别模块判断当前命令是否为写命令,如果是先判断当前命令的地址空间是否超出当前用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令;如果为非写命令,则增加判断当前命令的地址空间是否超出初始用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令。
以上所揭露的仅为本发明一种实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于本发明所涵盖的范围。

Claims (1)

1.一种动态容量调整过程中安全平滑的方法,其特征在于每次固态硬盘上电时系统进行复位,获取设备初始用户容量信息和当前用户容量信息,根据当前容量和冗余空间计算确定冗余空间下限,当系统发现出现新的坏块时,检查当前的冗余空间是否小于冗余空间下限,如果小于则从当前用户容量中分配一部分空间补充到冗余空间,保证冗余空间不小于冗余空间下限;增加命令识别模块判断当前命令是否为写命令,如果是先判断当前命令的地址空间是否超出当前用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令;如果为非写命令,则增加判断当前命令的地址空间是否超出初始用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令。
CN201810272540.3A 2018-03-29 2018-03-29 一种动态容量调整过程中安全平滑的方法 Expired - Fee Related CN108595117B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810272540.3A CN108595117B (zh) 2018-03-29 2018-03-29 一种动态容量调整过程中安全平滑的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810272540.3A CN108595117B (zh) 2018-03-29 2018-03-29 一种动态容量调整过程中安全平滑的方法

Publications (2)

Publication Number Publication Date
CN108595117A CN108595117A (zh) 2018-09-28
CN108595117B true CN108595117B (zh) 2021-04-23

Family

ID=63623884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810272540.3A Expired - Fee Related CN108595117B (zh) 2018-03-29 2018-03-29 一种动态容量调整过程中安全平滑的方法

Country Status (1)

Country Link
CN (1) CN108595117B (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360080A (zh) * 2020-03-06 2021-09-07 瑞昱半导体股份有限公司 存储空间管理方法
CN117149093B (zh) * 2023-10-27 2024-03-26 四川省华存智谷科技有限责任公司 一种通过ssd缩容提升存储系统可靠性的方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023818A (zh) * 2010-12-06 2011-04-20 成都市华为赛门铁克科技有限公司 一种存储设备容量调整方法、装置及存储设备
CN103309816A (zh) * 2013-05-31 2013-09-18 苏州亮智科技有限公司 固态硬盘、电子装置和其动态容量控制方法
CN103455435A (zh) * 2013-08-29 2013-12-18 华为技术有限公司 数据写入方法及装置
CN105824667A (zh) * 2016-03-15 2016-08-03 深圳市硅格半导体股份有限公司 存储设备的管理方法、装置及系统
US9524113B2 (en) * 2013-05-24 2016-12-20 Seagate Technology Llc Variable redundancy in a solid state drive
CN107766180A (zh) * 2017-09-22 2018-03-06 成都华为技术有限公司 存储介质的管理方法、装置及可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023818A (zh) * 2010-12-06 2011-04-20 成都市华为赛门铁克科技有限公司 一种存储设备容量调整方法、装置及存储设备
US9524113B2 (en) * 2013-05-24 2016-12-20 Seagate Technology Llc Variable redundancy in a solid state drive
CN103309816A (zh) * 2013-05-31 2013-09-18 苏州亮智科技有限公司 固态硬盘、电子装置和其动态容量控制方法
CN103455435A (zh) * 2013-08-29 2013-12-18 华为技术有限公司 数据写入方法及装置
CN105824667A (zh) * 2016-03-15 2016-08-03 深圳市硅格半导体股份有限公司 存储设备的管理方法、装置及系统
CN107766180A (zh) * 2017-09-22 2018-03-06 成都华为技术有限公司 存储介质的管理方法、装置及可读存储介质

Also Published As

Publication number Publication date
CN108595117A (zh) 2018-09-28

Similar Documents

Publication Publication Date Title
CN112052188B (zh) 运用于固态存储装置的电脑系统的数据处理方法
US8352701B2 (en) Method for utilizing a memory interface to control partitioning of a memory module
US8856488B2 (en) Method for utilizing a memory interface to control partitioning of a memory module
US9760482B2 (en) Reconstruct drive for dynamic resizing
KR101566849B1 (ko) 메모리 장치 관리 방법, 그 관련 메모리 장치 및 그 관련 제어기
CN108595117B (zh) 一种动态容量调整过程中安全平滑的方法
CN101826367A (zh) 监测半导体存储设备可靠性的方法及其装置
CN104866429A (zh) 存储器管理方法、存储器控制电路单元与存储器存储装置
CN108255630A (zh) 一种降低固态硬盘异常掉电处理时间的方法
CN103942009A (zh) 扩展终端中存储器的设备和方法
CN114237984A (zh) 异常掉电下Trim数据的恢复方法、系统及固态硬盘
CN105487824A (zh) 信息处理方法、存储装置及电子设备
CN107403637B (zh) 数据储存装置的数据页对齐方法及其查找表的制作方法
CN106814968B (zh) 存储器管理方法与系统及其存储器存储装置
CN103389941B (zh) 存储器格式化方法、存储器控制器及存储器存储装置
CN101620568B (zh) 存储装置和数据储存方法
CN109871337B (zh) 一种ssd存储媒介切换方法及其系统
CN105868046B (zh) 存储装置中管理、写入及加载固件代码的方法
CN103324445B (zh) Usb存储设备运行的方法和系统、usb存储设备
US20110087828A1 (en) Method for enhancing performance of accessing a flash memory, and associated memory device and controller thereof
US11281379B2 (en) Storage device and operating method thereof for storing replicated data based on access frequency
CN111338846B (zh) 一种基于多核恢复l2p表的方法和装置
CN109933291B (zh) 一种sram数据的处理方法、装置、设备及存储介质
CN110442300B (zh) 整理指令记录方法、存储器控制电路单元与存储装置
US20100037004A1 (en) Storage system for backup data of flash memory and method for the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210423

CF01 Termination of patent right due to non-payment of annual fee