Linux添加硬盤(硬盤沒有充分使用問題)

[root@localhost ~]# fdisk -l

Disk /dev/sda: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        2624    20972857+  83  Linux
/dev/sda3            2625        3929    10482412+  82  Linux swap / Solaris
/dev/sda4            3930       65270   492721582+   5  Extended
/dev/sda5            3930       65270   492721551   83  Linux
[root@localhost ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 65270.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
No free sectors available

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n
No free sectors available

Command (m for help): q

[root@localhost ~]# mkfs -t ext3 /dev/sda5       //格式化sda5分區
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61603840 inodes, 123180387 blocks
6159019 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
3760 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
      32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
      4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
      102400000

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
done

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@localhost ~]# done
-bash: syntax error near unexpected token `done'
[root@localhost ~]# ls
anaconda-ks.cfg  index.html    index.html.2  index_p.jsp  install.log.syslog
Desktop          index.html.1  index.html.3  install.log  szxx_09.gif
[root@localhost ~]# mount /dev/sda5 /data       //重新掛載分區,如果要掛載新文件名要先創建文件系統
[root@localhost ~]# df-k
-bash: df-k: command not found
[root@localhost ~]# df -k
驛歡緋葷?              1K-?       宸茬?    瀵紼 宸茬? 驊澆綣
/dev/sda2             20315844   4980560  14286644  26% /
/dev/sda1               101086     11956     83911  13% /boot
tmpfs                  8218456         0   8218456   0% /dev/shm
/dev/sda5            484988756    202800 460149880   1% /data
[root@localhost ~]# df -h
驛歡緋葷?             瀹歸  宸茬?瀵紼 宸茬? 驊澆綣
/dev/sda2              20G  4.8G   14G  26% /
/dev/sda1              99M   12M   82M  13% /boot
tmpfs                 7.9G     0  7.9G   0% /dev/shm
/dev/sda5             463G  199M  439G   1% /data   原來只用了49G,現在充分利用上了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章