本來是磁盤不夠用,新增磁盤的,結果出現問題,找了許久解決了,
利用『 mount -n -o remount,rw / 』重新掛載根目錄, 這之後就把剛纔錯誤的地方修改一下,注意,這個時候fstab就可以讀寫了。那麼,所有的問題也就可以迎刃而解了。
只需要將掛載語句刪除,再:wq保存退出,最後reboot重新載入系統,就可以解決問題了
The number of cylinders for this disk is set to 10402.
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 à創建新分區
Command action
e extended
p primary partition (1-4)
p
à創建主分區
Partition number (1-4):
1 à新建的主分區序號
First cylinder (1-10402, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-10402, default 10402):
+500M à創建主分區大小
Command (m for help):
w à保存創建的主分區
|
root#partprobe
|
[root@server ~]# mkfs.ext3 /dev/hda1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
122400 inodes, 488848 blocks
24442 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
60 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@server ~]#
|
Root#mount /dev/hda1 /mnt/rhce01
|
root# vim /etc/fstab à編輯這個文件,添加上下面的一行,使掛載在重啓後有效;
LABEL=/1 / ext3 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
/dev/hda1
/mnt/rhce01 ext3 defaults 0 0
|
Command (m for help): n
Command action
e extended
p primary partition (1-4)
輸入:e
Partition number (1-4): 1
First cylinder (1-9729, default 1):回車
Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729):回車
Command (m for help):w(保存退出)
mkfs -t ext3 /dev/sda1
Writing superblocks and filesystem accounting information:直接回車。
mount /dev/sda1 /test
編輯/etc/fstab 文件
添加:/dev/sda1 /test ext3 defaults 1 1