Debian下root分区的迁移

1709阅读 0评论2009-09-13 blue_stone
分类:LINUX

搞了一块新的500G硬盘, 给本本升级. Debian也从原来老硬盘迁移到了新的硬盘. 使用tar命令进行迁移.

迁移完成后硬盘分区格式如下:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x939f2d57                     

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20482843+   7  HPFS/NTFS
/dev/sda2            2551        2616      530145   83  Linux    
/dev/sda3            2617        7839    41953747+  83  Linux    
/dev/sda4            7840       60801   425417265    5  Extended
/dev/sda5            7840       20894   104864256   8e  Linux LVM
/dev/sda6           20895       28543    61440561    7  HPFS/NTFS
/dev/sda7           28544       60801   259112353+  8e  Linux LVM

逻辑卷划分如下:

blueice2:~# pvdisplay                                 
  --- Physical volume ---                             
  PV Name               /dev/sda5                     
  VG Name               vg00                          
  PV Size               100.01 GB / not usable 2.50 MB
  Allocatable           yes                           
  PE Size (KByte)       4096                          
  Total PE              25601                         
  Free PE               3612                          
  Allocated PE          21989                         
  PV UUID               xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
                                                              
  --- Physical volume ---                                     
  PV Name               /dev/sda7                             
  VG Name               vg00                                  
  PV Size               247.11 GB / not usable 3.41 MB        
  Allocatable           yes (but full)                        
  PE Size (KByte)       4096                                  
  Total PE              63259                                 
  Free PE               0                                     
  Allocated PE          63259                                 
  PV UUID               xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
                                                              
blueice2:~# vgdisplay
  --- Volume group ---
  VG Name               vg00
  System ID                 
  Format                lvm2
  Metadata Areas        2   
  Metadata Sequence No  10  
  VG Access             read/write
  VG Status             resizable
  MAX LV                0         
  Cur LV                6         
  Open LV               6         
  Max PV                0         
  Cur PV                2         
  Act PV                2         
  VG Size               347.11 GB
  PE Size               4.00 MB   
  Total PE              88860     
  Alloc PE / Size       85248 / 333.00 GB
  Free  PE / Size       3612 / 14.11 GB  
  VG UUID               xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
                                                              
blueice2:~# lvdisplay                                         
  --- Logical volume ---                                      
  LV Name                /dev/vg00/root                       
  VG Name                vg00                                 
  LV UUID                xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
  LV Write Access        read/write                            
  LV Status              available                             
  # open                 1                                     
  LV Size                40.00 GB                              
  Current LE             10240                                 
  Segments               1                                     
  Allocation             inherit                               
  Read ahead sectors     auto                                  
  - currently set to     256                                   
  Block device           254:0                                 
                                                               
  --- Logical volume ---                                       
  LV Name                /dev/vg00/swap                        
  VG Name                vg00                                  
  LV UUID                xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
  LV Write Access        read/write                            
  LV Status              available                             
  # open                 2                                     
  LV Size                3.00 GB                               
  Current LE             768                                   
  Segments               1                                     
  Allocation             inherit                               
  Read ahead sectors     auto                                  
  - currently set to     256                                   
  Block device           254:1                                 
                                                               
  --- Logical volume ---                                       
  LV Name                /dev/vg00/home                        
  VG Name                vg00                                  
  LV UUID                xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
  LV Write Access        read/write                            
  LV Status              available                             
  # open                 1                                     
  LV Size                30.00 GB                              
  Current LE             7680                                  
  Segments               1                                     
  Allocation             inherit                               
  Read ahead sectors     auto                                  
  - currently set to     256                                   
  Block device           254:2                                 
                                                               
  --- Logical volume ---                                       
  LV Name                /dev/vg00/soft                        
  VG Name                vg00                                  
  LV UUID                xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
  LV Write Access        read/write                            
  LV Status              available                             
  # open                 1                                     
  LV Size                100.00 GB                             
  Current LE             25600                                 
  Segments               1                                     
  Allocation             inherit                               
  Read ahead sectors     auto                                  
  - currently set to     256                                   
  Block device           254:3                                 

  --- Logical volume ---
  LV Name                /dev/vg00/u01
  VG Name                vg00
  LV UUID                xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                70.00 GB
  Current LE             17920
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:4

  --- Logical volume ---
  LV Name                /dev/vg00/vm
  VG Name                vg00
  LV UUID                xxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxx
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                90.00 GB
  Current LE             23040
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:5


文件系统信息:

/dev/mapper/vg00-root on / type ext4 (rw)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw)
/dev/mapper/vg00-home on /home type ext4 (rw)
/dev/mapper/vg00-soft on /soft type ext4 (rw)
/dev/mapper/vg00-u01 on /u01 type ext4 (rw)
/dev/mapper/vg00-vm on /vm type ext4 (rw)
/dev/sda2 on /boot type ext4 (rw)

上一篇:GnuPG配置的一些好文章
下一篇:升级至grub2