免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
擴容ext4文件系統(tǒng)

原來一個分區(qū)分得太小了(只有5G),等拷貝完數據才知道太小了。于是嘗試了擴容的辦法。以前對ext3干過這樣的事情,看了ext3上的wiki介紹,得知做法和原來的ext2/ext3一樣(看來兼容性還是不錯)。下面是我的擴容過程

首先下載你要擴容的分區(qū),這樣當然是最保險的,如果你就是不想卸載,只要你別對其做寫操作,也沒有問題。

接下來就是用fdisk刪除該分區(qū),然后用你期望的大小重建該分區(qū)。這里要注意的是,分區(qū)的開始扇區(qū)一定要和刪除前保持一致,否則文件系統(tǒng)就會遭到破壞。下面是我的實際操作過程

  1. # fdisk /dev/sda  
  2.   
  3. Command (m for help): p  
  4.   
  5. Disk /dev/sda: 64.4 GB, 64424509440 bytes  
  6. 255 heads, 63 sectors/track, 7832 cylinders, total 125829120 sectors  
  7. Units = sectors of 1 * 512 = 512 bytes  
  8. Sector size (logical/physical): 512 bytes / 512 bytes  
  9. I/O size (minimum/optimal): 512 bytes / 512 bytes  
  10. Disk identifier: 0x00067b51  
  11.   
  12.    Device Boot      Start         End      Blocks   Id  System  
  13. /dev/sda1   *          63    29302559    14651248+  83  Linux  
  14. /dev/sda2        29302784    39061503     4879360   83  Linux  
  15.   
  16. Command (m for help): d  
  17. Partition number (1-4): 2  
  18.   
  19. Command (m for help): n  
  20. Command action  
  21.    e   extended  
  22.    p   primary partition (1-4)  
  23. p  
  24. Partition number (1-4, default 2):  
  25. Using default value 2  
  26. First sector (29302560-125829119, default 29302560): 29302784  
  27. Last sector, +sectors or +size{K,M,G} (29302784-125829119, default 125829119): +20G  
  28.   
  29. Command (m for help): p  
  30.   
  31. Disk /dev/sda: 64.4 GB, 64424509440 bytes  
  32. 255 heads, 63 sectors/track, 7832 cylinders, total 125829120 sectors  
  33. Units = sectors of 1 * 512 = 512 bytes  
  34. Sector size (logical/physical): 512 bytes / 512 bytes  
  35. I/O size (minimum/optimal): 512 bytes / 512 bytes  
  36. Disk identifier: 0x00067b51  
  37.   
  38.    Device Boot      Start         End      Blocks   Id  System  
  39. /dev/sda1   *          63    29302559    14651248+  83  Linux  
  40. /dev/sda2        29302784    71245823    20971520   83  Linux  
  41.   
  42. Command (m for help): w  
  43. The partition table has been altered!  
  44.   
  45. Calling ioctl() to re-read partition table.  
  46.   
  47. WARNING: Re-reading the partition table failed with error 16: Device or resource busy.  
  48. The kernel still uses the old table. The new table will be used at  
  49. the next reboot or after you run partprobe(8) or kpartx(8)  
  50. Syncing disks.  


而后執(zhí)行下面的指令

  1. # partprobe /dev/sda  
  2. # e2fsck -f /dev/sda2  
  3. e2fsck 1.41.12 (17-May-2010)  
  4. Pass 1: Checking inodes, blocks, and sizes  
  5. Pass 2: Checking directory structure  
  6. Pass 3: Checking directory connectivity  
  7. Pass 4: Checking reference counts  
  8. Pass 5: Checking group summary information  
  9. data: 38934/305216 files (0.1% non-contiguous), 1140469/1219840 blocks  
  10. [root@wgzhao-nb wgzhao]# resize2fs /dev/sda2 20G  
  11. resize2fs 1.41.12 (17-May-2010)  
  12. Resizing the filesystem on /dev/sda2 to 5242880 (4k) blocks.  
  13. The filesystem on /dev/sda2 is now 5242880 blocks long.  

我們再掛載上來,得到的就是我期望的大小了(20G)
  1. # df -h  
  2. Filesystem            Size  Used Avail Use% Mounted on  
  3. /dev/sda1              14G  6.5G  7.2G  48% /  
  4. tmpfs                 1.4G  296K  1.4G   1% /dev/shm  
  5. /dev/sda2              20G  4.3G   16G  22% /data  
本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Ubuntu下添加新分區(qū)并設置掛載點
【轉】轉 parted創(chuàng)建GPT分區(qū)(fdisk不支持創(chuàng)建GPT分區(qū),GPT支持大于2TB分區(qū),MBR不支持)
自建NAS如何使用大于2TB的硬盤(從分區(qū)開始)
分區(qū)與格式化的原理
硬盤方式安裝Pentoo
折騰路由
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服