Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
zhairuo
V2EX  ›  Linux

关于linux分区迁移的问题

  •  
  •   zhairuo · Nov 16, 2012 · 3747 views
    This topic created in 4950 days ago, the information mentioned may be changed or developed.
    最近新添了一块硬盘, 想迁移一下 /home 分区, 方法有很多, 主要要求迁移以后Selinux标签环境不受影响, 不知大家有什么建议?
    2 replies    1970-01-01 08:00:00 +08:00
    zhairuo
        1
    zhairuo  
    OP
       Nov 16, 2012
    freeze /home,
    dd if=/dev/sda1 of=/dev/sdb1 bs=1024 conv=noerror,notrunc

    cd /home; find ./ -xdev -print0 | cpio -pa0V /mnt/sdb1
    cabbala
        2
    cabbala  
       Nov 16, 2012
    支持楼上,建议用dd,完全按字节复制,保证完全一样。。迁移后别忘了修改/etc/fstab
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1077 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 18:22 · PVG 02:22 · LAX 11:22 · JFK 14:22
    ♥ Do have faith in what you're doing.