linux磁碟分割槽基本命令
一直對磁碟分割槽這些一知半解,不管是window還是linux。今天裝ORACLE11g時拷檔案一直存在。
基本命令:
fdisk -l檢視有哪些磁碟及分割槽,大小等情況
對某個磁碟進行分割槽:
fdisk /dev/sda
n //進行分割槽 d //刪除分割槽
p //建主分割槽
1 //選擇分割槽number(1-4)
選擇該分割槽的首位置
選擇該分割槽的末位置
w //儲存
mkfs -t ext3 /dev/sdb1 //格式化分割槽
mount /dev/sdb1 /opt //掛載某個分割槽到某個檔案
以下為示例:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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 2610 20860402+ 8e Linux LVM
Disk /dev/sdb: 48.3 GB, 48318382080 bytes
255 heads, 63 sectors/track, 5874 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb2 2400 5874 27912937+ 83 Linux
[root@localhost ~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 5874.
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-5874, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2399, default 2399):
Using default value 2399
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# mkfs -t ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2410624 inodes, 4817484 blocks
240874 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
148 block groups
32768 blocks per group, 32768 fragments per group
16288 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# mount /dev/sdb1 /opt
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29227735/viewspace-1122535/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux磁碟分割槽fdisk命令詳解Linux
- Linux 磁碟與磁碟分割槽Linux
- linux磁碟分割槽格式化-fdisk命令工具Linux
- Linux 擴充套件磁碟分割槽(命令列操作)Linux套件命令列
- Linux系統磁碟和分割槽有哪些命令呢?Linux
- linux磁碟分割槽講解Linux
- linux 磁碟分割槽_luks cryptsetupLinux
- 【Linux】MBR磁碟分割槽表只能有四個分割槽?Linux
- Linux 磁碟分割槽和掛載Linux
- linux 新增磁碟 分割槽掛載Linux
- Linux核心之磁碟和分割槽Linux
- linux 磁碟分割槽掛載-fdiskLinux
- Linux下磁碟分割槽,fdisk,mkfsLinux
- Linux精講——fdisk磁碟分割槽Linux
- linux下磁碟分割槽的案例Linux
- linux fdisk 命令 磁碟劃分新的分割槽及掛載Linux
- linux新增新磁碟和建立分割槽Linux
- linux磁碟結構及分割槽(轉)Linux
- Linux中監控磁碟分割槽及使用情況的命令有哪些?Linux
- Linux分割槽之parted命令Linux
- Mac磁碟如何分割槽?教你Mac系統磁碟自由分割槽教程!Mac
- Linux下磁碟分割槽工具cfdisk的使用Linux
- Linux磁碟分割槽及自動掛載Linux
- Linux LVM 擴充套件磁碟分割槽LinuxLVM套件
- 談linux磁碟結構及分割槽(轉)Linux
- linux下磁碟分割槽與格式化Linux
- 一文全懂:Linux磁碟分割槽Linux
- 【LINUX學習】磁碟分割之建立primary和logical 分割槽Linux
- Linux 磁碟分割槽及檔案系統管理Linux
- linux 磁碟 2T以上的分割槽partedLinux
- 調整Linux磁碟分割槽的大小的方法Linux
- Linux下的磁碟分割槽和邏輯卷Linux
- Linux磁碟分割槽瞭解多少?Linux入門必看Linux
- Linux硬碟分割槽生效命令partprobeLinux硬碟
- 如何使用DOS命令判斷磁碟分割槽是否為NTFS格式
- 用GParted給linux系統進行磁碟分割槽?Linux
- Virtualbox中Linux新增新磁碟並建立分割槽Linux
- Linux磁碟分割槽、掛載、檢視檔案大小Linux