Linux下移动硬盘,创建windows,ntfs分区并挂载

环境准备

CentOS Linux release 7.8.2003 (Core)

yum install epel-release -y
yum install ntfs-3g ntfsprogs -y
分区
parted /dev/sdd
(parted) mklabel GPT
(parted) print                                                            
Model: WD Elements 25A2 (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start  End  Size  File system  Name  Flags
(parted) mkpart primary
File system type?  [ext2]? ntfs                                           
Start? 0                                                                  
End? 1000GB                                                               
Warning: You requested a partition from 0.00B to 1000GB (sectors 0..1953125000).
The closest location we can manage is 1049kB to 1000GB (sectors 2048..1953458142).
Is this still acceptable to you?
Yes/No? Yes                                                               
(parted) print                                                            
Model: WD Elements 25A2 (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  1000GB  1000GB               primary

(parted) quit
格式化为ntfs
mkfs.ntfs -fQ -v /dev/sdd1
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
Creating root directory (mft record 5)
Creating $MFT (mft record 0)
Creating $MFTMirr (mft record 1)
Creating $LogFile (mft record 2)
Creating $AttrDef (mft record 4)
Creating $Bitmap (mft record 6)
Creating $Boot (mft record 7)
Creating backup boot sector.
Creating $Volume (mft record 3)
Creating $BadClus (mft record 8)
Creating $Secure (mft record 9)
Creating $UpCase (mft record 0xa)
Creating $Extend (mft record 11)
Creating system file (mft record 0xc)
Creating system file (mft record 0xd)
Creating system file (mft record 0xe)
Creating system file (mft record 0xf)
Creating $Quota (mft record 24)
Creating $ObjId (mft record 25)
Creating $Reparse (mft record 26)
Syncing root directory index record.
Syncing $Bitmap.
Syncing $MFT.
Updating $MFTMirr.
Syncing device.
mkntfs completed successfully. Have a nice day.
挂载
#### mount -t ntfs /dev/sdd1 /mnt/test(这条命令也行)
mount /dev/sdd1 /mnt/test/
df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
devtmpfs                devtmpfs  126G     0  126G   0% /dev
tmpfs                   tmpfs     126G     0  126G   0% /dev/shm
tmpfs                   tmpfs     126G   11M  126G   1% /run
tmpfs                   tmpfs     126G     0  126G   0% /sys/fs/cgroup
/dev/mapper/centos-root xfs       198G  2.0G  197G   1% /
/dev/sda1               xfs       494M   94M  400M  19% /boot
/dev/sda3               vfat      200M  8.0K  200M   1% /boot/efi
/dev/mapper/centos-home xfs       232G   33M  232G   1% /home
tmpfs                   tmpfs      26G     0   26G   0% /run/user/0
/dev/sdd1               fuseblk   932G   94M  932G   1% /mnt/test
几个知识点

1.超过2TB的磁盘,分区方式一定选择gpt,mbr最大支持到2T
2.文件系统类型,选择xfs,和ext4都可以。ext4,性能和稳定性能力相对优秀
3.fdisk(较老,修改后需w保存),parted(较新,能处理大容量磁盘,且所有变动实时生效)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值