disk

SD does wear leveling work at the partition or disk level

寵の児 提交于 2020-05-16 22:01:20
问题 I wrote this question previously I'm testing SOLID STATE write failure times (c code) and the device isn't failing and it was brilliantly answered by Brendan. I was basically asking about writing to an SD card many times and when it would fail as I am writing an application that will be writing data to an SD card for many years. My follow up question is does wear leveling work at the disk or partition level. If for ease of setting my application up, say i wanted 3 partitions ie for examples

Data structure/algorithm for variable length record storage and lookup on disk withsearch only on primary keys

試著忘記壹切 提交于 2020-03-17 09:27:45
问题 I am looking for an algorithm / data structure that works well for large block based devices (eg a mechanical hard drive) which is optimised for insert, get, update and delete where searches are always done using the id of the data and where the data fields for any ID have a variable length. The B-Tree seems to be a commonly quoted structure but mainly for fixed length records. I also expect dramatically more gets and updates than I do inserts and deletes. Can I get rid of the O(log m) lookup

Data structure/algorithm for variable length record storage and lookup on disk withsearch only on primary keys

ⅰ亾dé卋堺 提交于 2020-03-17 09:25:07
问题 I am looking for an algorithm / data structure that works well for large block based devices (eg a mechanical hard drive) which is optimised for insert, get, update and delete where searches are always done using the id of the data and where the data fields for any ID have a variable length. The B-Tree seems to be a commonly quoted structure but mainly for fixed length records. I also expect dramatically more gets and updates than I do inserts and deletes. Can I get rid of the O(log m) lookup

integer out of range and remaining disk space too small to convert id to bigint and other solutions

给你一囗甜甜゛ 提交于 2020-01-24 15:04:05
问题 When I insert I am getting integer out of range because my id/primary key was mistakenly created as an int instead of a bigint or bigserial . I tried: ALTER TABLE tbl ALTER COLUMN id TYPE BIGINT; But I get the following error because my free disk space isn't big enough. ERROR: could not extend file "base/16401/3275205": No space left on device HINT: Check free disk space. SQL state: 53100 I can't increase the disk space right now, for frustrating reasons I won't go into. I also tried reusing

How to extend volume using powershell?

独自空忆成欢 提交于 2020-01-23 16:57:09
问题 How to extend volume using powershell (I prefer WMI over powershell remoting) on remote computer ? OS is win XP sp3. 回答1: I ended up with somethin like this: Invoke-Command -ComputerName $compName -Credential $compCred -ScriptBlock {"rescan","select volume 2","extend" | diskpart} I'm still looking for better solution, if there is one. 回答2: There is a set of scripts Microsoft's Storage Team wrote to handle this that can also be hooked into System Insights as automated remediation actions:

How to extend volume using powershell?

僤鯓⒐⒋嵵緔 提交于 2020-01-23 16:56:30
问题 How to extend volume using powershell (I prefer WMI over powershell remoting) on remote computer ? OS is win XP sp3. 回答1: I ended up with somethin like this: Invoke-Command -ComputerName $compName -Credential $compCred -ScriptBlock {"rescan","select volume 2","extend" | diskpart} I'm still looking for better solution, if there is one. 回答2: There is a set of scripts Microsoft's Storage Team wrote to handle this that can also be hooked into System Insights as automated remediation actions:

CHS to LBA mapping - (Disk Storage)

末鹿安然 提交于 2020-01-16 01:09:10
问题 Before LBA you simply had the physical mapping of a disk, which on originally on an old a IBM-PC compatible machine would look something like this the following: Cylinder Number : (10-bits) 0-1024 (1024 = 2^10) Head Number : (8-bits) 0-256 (256 = 2^8) Sector Number : (6-bits) 0 is reserved typically for the " boot sector " ( c -0, h -0, s -0) 1-64 (63 = 2^6 - 1) *0 is reserved Total CHS address bits : 24-Bits Back in day the average (file|block|sector) size was 512B. Example from wikipedia:

Is INT13H (non extended) capable of accessing drives with more than 16 heads per cylinder?

家住魔仙堡 提交于 2020-01-15 08:10:42
问题 I know that you need the INT 13H extended functions to access drives over 8GB in size. This question refers to standard INT 13H, function 02H. I also know the old 504MB hard drive limit was a result of: 1024 cylinders x 16 heads x 63 sectors x 512 bytes = 528,482,304 bytes. But was this hard drive limitation caused by Int 13h itself? Is there any particular reason the head number was limited to 16 when there is an entire byte of space (dh) for the head number? Obviously later on the standard

How can I get identity of a disk?

假如想象 提交于 2020-01-14 06:03:00
问题 I want to identify disk in c++ in my windows application. For example: I have a disk on E:\ Then I changed the disk, and replace it with another one. the name is still E:\ How can I know the disk is changed, it is not the original one? If I have no administrator priority in win7, Can I still use some method to identy different disks? Many thanks! 回答1: Probably the relevant methods are: GetLogicalDrives() BOOL WINAPI GetVolumeInformation( __in_opt LPCTSTR lpRootPathName, __out LPTSTR

How to find the amount of free storage (disk space) left on Android?

旧巷老猫 提交于 2020-01-09 04:39:05
问题 I am trying to figure out the available disk space on the Android phone running my application. Is there a way to do this programmatically? Thanks, 回答1: Try StatFs.getAvailableBlocks. You'll need to convert the block count to KB with getBlockSize. 回答2: Example: Getting human readable size like 1 Gb String memory = bytesToHuman(totalMemory()) /************************************************************************************************* Returns size in bytes. If you need calculate external