如何修复4k对齐(/home分区,要求保留数据)
Tofloor
poster avatar
meilihao
deepin
2017-09-05 09:30
Author
重装系统,偶然发现/home分区没有4k对齐,存在Free Space,求解决方案.
```$ sudo parted  /dev/nvme0n1  unit s print free
Model: Unknown (unknown)
Disk /dev/nvme0n1: 500118192s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start      End         Size        File system  Name  Flags
        34s        2047s       2014s       Free Space
1      2048s      1050623s    1048576s    fat32              boot, esp
2      1050624s   5244927s    4194304s    ext4
3      5244928s   88604671s   83359744s   ext4
        88604672s  88604705s   34s         Free Space
4      88604706s  500118158s  411513453s  ext4


```

Reply Favorite View the author
All Replies
avatar
xushaohua
deepin
2017-09-05 17:43
#1
你的 /home 是哪个分区呢?
Reply View the author
avatar
meilihao
deepin
2017-09-06 03:20
#2
https://bbs.deepin.org/post/145078
你的 /home 是哪个分区呢?

是编号4

1 -> /boot/efi
2 -> /boot
3 -> /
4 -> /home
Reply View the author
avatar
黑色
deepin
2017-09-06 03:39
#3
重新分区了吗?不应该啊。。。。。。。。。parted调一下
Reply View the author
avatar
meilihao
deepin
2017-09-06 05:55
#4
https://bbs.deepin.org/post/145078
重新分区了吗?不应该啊。。。。。。。。。parted调一下

重新分区了,原先/boot/efi只要200M左右,这次重装系统提示太小,只能重新分区,只剩/home分区没动,结果4k就不对齐了.
Reply View the author
avatar
woodelf
deepin
2017-09-06 06:39
#5
最好用align-check参数看一下分区对齐情况,而且有一点怪怪的,parted检测到你的逻辑扇区和物理扇区大小都是512B:
Sector size (logical/physical): 512B/512B







    来自:Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0  (zh-CN)
    ——2017/9/5 下午10:39:08
    Reply View the author
    avatar
    meilihao
    deepin
    2017-09-06 06:46
    #6
    已在deepin failsafe模式下重新分区,成功4k对齐,步骤:
    1. 挂载/home分区,拷贝数据到其他盘
    2. 重新用GParted分区
    3. 挂载已重新分区的/home,拷回数据,再重启.
    Reply View the author
    avatar
    黑色
    deepin
    2017-09-07 04:40
    #7
    https://bbs.deepin.org/post/145078
    重新分区了,原先/boot/efi只要200M左右,这次重装系统提示太小,只能重新分区,只剩/home分区没动,结果4k就 ...

    efi要那么大了吗。。。可怕,不会到时候所有人都让调整吧。。。
    Reply View the author