TRIM / wiper script for SATA SSDs (June 2010)
=================================================
The wiper.sh script is for tuning up SATA SSDs (Solid-State-Drives).
It calculates a list of free (unallocated) blocks within a filesystem,
and informs the SSD firmware of those blocks, so that it can better manage
the underlying media for wear-leveling and garbage-collection purposes.
In some cases, this can restore a sluggish SSD to nearly-new speeds again.
This script may be EXTREMELY HAZARDOUS TO YOUR DATA.
It does work for me here, but it has not yet been exhaustively tested by others.
Please back-up your data to a *different* physical drive before trying it.
And if you are at all worried, then DO NOT USE THIS SCRIPT!!
DO NOT USE THIS SCRIPT if you cannot afford losing your data!!
This script works for read-write mounted ext4 and xfs filesystems,
and for read-only mounted/unmounted ext2, ext3, ext4, reiser3 and xfs filesystems.
As of Version 3.1, hfsplus and ntfs filesystem types are also supported,
but this code has not been widely tested yet. BE CAREFUL!
Invoke the script with the pathname to the mounted filesystem
or the block device path for the filesystem.
Eg. ./wiper.sh /boot
./wiper.sh /
./wiper.sh /dev/sda1
Note that the most comprehensive results are achieved when
wiping a filesystem that is not currently mounted read-write,
though the difference is small.
==================================================
btrfs -- DO NOT USE !!!
Chris Mason, the primary author/maintainer of btrfs, believes that
the FIEMAP/FIBMAP ioctl() calls are completely unsafe when used on
a btrfs filesystem. Even when only a single device is involved.
This seems rather strange. If true, those ioctls() should be removed from btrfs.
But there are other issues, as well.
btrfs breaks the Linux filesystem model in many ways, making it rather dangerous
to your data to try and TRIM it. It implements it's own internal multiple-device
layer, similar to DM/MD/VFS, but without any indication to external utilities like wiper.sh.
As a result, detection of the underlying device for the filesystem is haphazard at best,
and this could cause wiper.sh to destroy data on whatever device it thinks is the correct one.
Also, because of the built-in duplication of multiple-device support, the FIBMAP and FIEMAP
ioctl()s will work incorrectly on btrfs when more than a single device is involved.
This means that btrfs will mislead the wiper.sh script, causing it to TRIM the WRONG sectors,
destroying valuable data, programs, and filesystem metadata. You will lose everything.
Finally, due to the non-standard internal volume/device remapping done by btrfs,
it is very difficult for standard Linux tools like hdparm and wiper.sh to actually
determine the device that lies underneath a given file. Odd, but true.
So support for btrfs has been dropped as of wiper-2.5.
It used to work for single drives, but as of the Linux-2.6.31 kernel even hdparm
is now failing for simple operations like obtaining drive geometries from /sys on btrfs.
btrfs is an experimental beta with serious issues; use ext4 or xfs instead.
==================================================
The sil24_trim_protocol_fix.patch file in this directory is a kernel
patch for all recent Linux kernel versions up to and including 2.6.31.
This fixes the kernel device driver for the Silicon Image SiI-3132
SATA controller to correctly pass DSM/TRIM commands to the drives.
If you use this hardware in your system, then you will need to apply
the patch to your kernel before using the wiper scripts.
==================================================
The fiemap_compat_ioctl.patch file in this directory is a kernel patch
to speed up "hdparm --fibmap" when run as a 32-bit program on top of
a 64-bit Linux kernel. Kernels versions up to and including 2.6.31
are missing support for this, so hdparm will fall back to the older
and slower FIBMAP call, causing wiper.sh to take much longer to run.
The older call has other limitations, such as failing on really large
files or huge disks, so use of FIEMAP really is preferred.
As of August 16, a similar patch has now been backported to the -stable
streams of most recent Linux kernel versions. So update your kernel
and this functionality will already be included.
没有合适的资源?快使用搜索试试~ 我知道了~
硬盘升级以及调测工具hdparm
共61个文件
c:13个
txt:4个
patch:3个
需积分: 5 3 下载量 136 浏览量
2023-12-04
15:15:44
上传
评论
收藏 166KB RAR 举报
温馨提示
硬盘升级以及调测工具,适用于linux环境下:1.对硬盘的硬件信息如 硬盘型号、序列号、已运行时间等信息查看,对一线人员收集现场问题环境提供详细信息提取的帮助;2. 能够通过系统下进行硬盘固件的升级,方便硬盘固件的更新,避免现场开箱通过物理线升级麻烦。该工具还有一些其他常用功能,可通过help信息进行提取使用,比如常见参数信息说明: -a<快取分区> 设定读取文件时,预先存入块区的分区数,若不加上<快取分区>选项,则显示目前的设定。 -A<0或1> 启动或关闭读取文件时的快取功能。 -c 设定IDE32位I/O模式。 -C 检测IDE硬盘的电源管理模式。 -d<0或1> 设定磁盘的DMA模式。 -f 将内存缓冲区的数据写入硬盘,并清楚缓冲区。 -g 显示硬盘的磁轨,磁头,磁区等参数。 -h 显示帮助。 -i 显示硬盘的硬件规格信息,这些信息是在开机时由硬盘本身所提供。 -I 直接读取硬盘所提供的硬件规格信息。 -k<0或1> 重设硬盘时,保留-dmu参数的设定。 -K<0或1> 重设硬盘时,保留-APSWXZ参数的设定。 -m<磁区数> 设定硬盘多重分区存取的分区数。 -n<0或1>
资源推荐
资源详情
资源评论
收起资源包目录
hdparm_支持硬盘固件升级工具.rar (61个子文件)
hdparm_支持硬盘固件升级工具
hdparm-9.60
hdparm.h 4KB
identify.c 55KB
wdidle3.c 6KB
fibmap.c 8KB
hdparm-sysconfig 1KB
sgio.h 6KB
fwdownload.c 6KB
Makefile 2KB
debian
hdparm.manpages 30B
hdparm-udeb.install 23B
hdparm.postinst 265B
README.Debian 4KB
hdparm.dev 253B
hdparm.docs 37B
hdparm.conf.5 5KB
hdparm.install 299B
rules 1KB
hdparm.default 855B
hdparm.dirs 17B
compat 2B
hdparm.postrm 143B
hdparm.rules 92B
hdparm.preinst 1KB
watch 136B
20hdparm 2KB
hdparm.conf 5KB
hdparm.postinit 178B
copyright 566B
hdparm.init 10KB
control 980B
geom.c 7KB
sysfs.c 5KB
wiper
wiper.sh 27KB
diffs-3.1plus.patch 3KB
sil24_trim_protocol_fix.patch 1KB
GPLv2.txt 18KB
fiemap_compat_ioctl.patch 1KB
README.txt 4KB
Changelog 2KB
contrib
README.contrib 276B
raid1ext4trim.sh-1.5 11KB
Changelog 26KB
hdparm.8 36KB
hdparm.c 99KB
sgio.c 16KB
fallocate.c 1KB
LICENSE.TXT 471B
apt.c 8KB
dvdspeed.c 1KB
README.acoustic 2KB
TODO 448B
identify.c.orig 55KB
hdparm.lsm 7KB
contrib
fix_standby.c 6KB
README 624B
fix_standby 10KB
idectl 807B
ultrabayd 864B
wdidle3_trace.txt 16KB
buildit.empeg 109B
make_bad_sector.c 4KB
共 61 条
- 1
资源评论
wyh_halo
- 粉丝: 256
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 包括用 Java 编写的程序 欢迎您在此做出贡献!.zip
- (源码)基于QT框架的学生管理系统.zip
- 功能齐全的 Java Socket.IO 客户端库,兼容 Socket.IO v1.0 及更高版本 .zip
- 功能性 javascript 研讨会 无需任何库(即无需下划线),只需 ES5 .zip
- 分享Java相关的东西 - Java安全漫谈笔记相关内容.zip
- 具有适合 Java 应用程序的顺序定义的 Cloud Native Buildpack.zip
- 网络建设运维资料库职业
- 关于 Java 的一切.zip
- 爬虫安装 XPath Helper 2.0
- 使用特定版本的 Java 设置 GitHub Actions 工作流程.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功