打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Formatting an External Hard Disk with Ext4 | Borap Blag

Recently, I bought an external hard disk formatted with NTFS. Not that there is something really wrong with NTFS but I prefer using ext4.

First, I deleted the existing partition and created a new Linux partition using fdisk:

1
# fdisk /dev/sdb

Assuming /dev/sdb is the external hard disk. Use d to delete the partition and use n to create a new partition. 83 is the ID of the native Linux partition.

Them, I use mkfs.ext4 to format the partition with ext4:

1
# mkfs.ext4 /dev/sdb1

Note that mkfs.ext4 expects a partition as its argument.

Finally, I use tune2fs to adjust some parameters:

1
2
# tune2fs -m 0 /dev/sdb1
# tune2fs -L bakap01 /dev/sdb1

The -m option is for adjusting the percentage of reserved blocks. The reserved blocks are used by privileged processes which is by default 5% of the hard disk size. Since I’m using the external hard disk solely as a storage, I set this to 0 so I can also use those 5% for storage. The -L option is for labeling the filesystem.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Ubuntu环境下挂载新硬盘
linux新增磁盘分区时出现问题
大硬盘(大于2T)分区方法
Linux下使用parted命令分区大于2T的GPT的磁盘
ext4 使用
ubuntu中U盘硬盘格式化(NTFS,FAT12,FAT16,FAT32,EXT4,EXT3,EXT2)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服