国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

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

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

首先下載你要擴(kuò)容的分區(qū),這樣當(dāng)然是最保險(xiǎn)的,如果你就是不想卸載,只要你別對(duì)其做寫操作,也沒(méi)有問(wèn)題。

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

  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.  

我們?cè)賿燧d上來(lái),得到的就是我期望的大小了(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  
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Ubuntu下添加新分區(qū)并設(shè)置掛載點(diǎn)
【轉(zhuǎn)】轉(zhuǎn) parted創(chuàng)建GPT分區(qū)(fdisk不支持創(chuàng)建GPT分區(qū),GPT支持大于2TB分區(qū),MBR不支持)
自建NAS如何使用大于2TB的硬盤(從分區(qū)開始)
分區(qū)與格式化的原理
硬盤方式安裝Pentoo
折騰路由
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服