CN108595117A - 一种动态容量调整过程中安全平滑的方法 - Google Patents
一种动态容量调整过程中安全平滑的方法 Download PDFInfo
- Publication number
- CN108595117A CN108595117A CN201810272540.3A CN201810272540A CN108595117A CN 108595117 A CN108595117 A CN 108595117A CN 201810272540 A CN201810272540 A CN 201810272540A CN 108595117 A CN108595117 A CN 108595117A
- Authority
- CN
- China
- Prior art keywords
- space
- redundant space
- capacity
- redundant
- lower limit
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 18
- 239000007787 solid Substances 0.000 claims abstract description 5
- 238000003860 storage Methods 0.000 abstract description 10
- 239000010813 municipal solid waste Substances 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error 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/2053—Error 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/2094—Redundant storage or storage space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0631—Configuration or reconfiguration of storage systems by allocating resources to storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0653—Monitoring storage devices or systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-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 (2)
1.一种动态容量调整过程中安全平滑的方法,其特征在于每次固态硬盘上电时系统进行复位,获取设备初始用户容量信息和当前用户容量信息,根据当前容量和冗余空间计算确定冗余空间下限,当系统发现出现新的坏块时,检查当前的冗余空间是否小于冗余空间下限,如果小于则从当前用户容量中分配一部分空间补充到冗余空间,保证冗余空间不小于冗余空间下限。
2.根据权利要求1所述的动态容量调整过程中安全平滑的方法,其特征在于增加命令识别模块判断当前命令是否为写命令,如果是先判断当前命令的地址空间是否超出当前用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令;如果为非写命令,则增加判断当前命令的地址空间是否超出初始用户容量空间,如果是则返回失败,结束本次写命令,否则继续执行本次命令。
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 true CN108595117A (zh) | 2018-09-28 |
CN108595117B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113360080A (zh) * | 2020-03-06 | 2021-09-07 | 瑞昱半导体股份有限公司 | 存储空间管理方法 |
CN117149093A (zh) * | 2023-10-27 | 2023-12-01 | 四川省华存智谷科技有限责任公司 | 一种通过ssd缩容提升存储系统可靠性的方法 |
Citations (6)
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 | 成都华为技术有限公司 | 存储介质的管理方法、装置及可读存储介质 |
-
2018
- 2018-03-29 CN CN201810272540.3A patent/CN108595117B/zh not_active Expired - Fee Related
Patent Citations (6)
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 | 成都华为技术有限公司 | 存储介质的管理方法、装置及可读存储介质 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113360080A (zh) * | 2020-03-06 | 2021-09-07 | 瑞昱半导体股份有限公司 | 存储空间管理方法 |
CN117149093A (zh) * | 2023-10-27 | 2023-12-01 | 四川省华存智谷科技有限责任公司 | 一种通过ssd缩容提升存储系统可靠性的方法 |
CN117149093B (zh) * | 2023-10-27 | 2024-03-26 | 四川省华存智谷科技有限责任公司 | 一种通过ssd缩容提升存储系统可靠性的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN108595117B (zh) | 2021-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107844431B (zh) | 映射表更新方法、存储器控制电路单元与存储器存储装置 | |
CN102375788B (zh) | 为具有非易失性存储器的系统动态地分配功率预算的方法及装置 | |
US10459837B2 (en) | Data storage device with production state awareness and non-volatile memory operating method with production state awareness | |
US8352701B2 (en) | Method for utilizing a memory interface to control partitioning of a memory module | |
US20120179860A1 (en) | Suspension of memory operations for reduced read latency in memory arrays | |
US7797490B2 (en) | Memory card authentication system, memory card host device, memory card, storage area switching method, and storage area switching program | |
US20120155167A1 (en) | Non-volatile storage device, information processing system and write control method of non-volatile storage device | |
US20080114923A1 (en) | Apparatus and method for controlling operation processing in nonvolatile memory | |
CN102044295A (zh) | 非易失性存储器系统以及在电源中断期间保存数据的方法 | |
CN103902465A (zh) | 一种固态硬盘垃圾回收的方法、系统和固态硬盘控制器 | |
CN108255630A (zh) | 一种降低固态硬盘异常掉电处理时间的方法 | |
CN107484427A (zh) | 用于处理存储设备中分条的方法和存储设备 | |
CN108595117A (zh) | 一种动态容量调整过程中安全平滑的方法 | |
US20210216239A1 (en) | Host controlled garbage collection in a solid state drive | |
CN106951186B (zh) | 数据程序化方法、存储器存储装置及存储器控制电路单元 | |
CN107346211B (zh) | 映射表加载方法、存储器控制电路单元与存储器储存装置 | |
CN105487824A (zh) | 信息处理方法、存储装置及电子设备 | |
CN106814968B (zh) | 存储器管理方法与系统及其存储器存储装置 | |
CN101620568B (zh) | 存储装置和数据储存方法 | |
CN107204205B (zh) | 存储器管理方法、存储器控制电路单元与存储器存储装置 | |
CN101847110A (zh) | 数据存储系统及其备份方法 | |
KR20210026832A (ko) | 메모리 시스템의 입출력 성능을 향상시키는 장치 및 방법 | |
TW201401285A (zh) | 控制大容量儲存裝置資料寫入的方法 | |
US6883078B2 (en) | Microcomputer with reduced memory usage and associated method | |
CN102486757A (zh) | 存储器储存装置及其存储器控制器与回应主机指令的方法 |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210423 |