linux下磁碟分割槽的案例
下面是一個linux下磁碟分割槽的案例,這裡只貼出來其中的操作過程,供大家學習!
[root@portal3115 ~]# fdisk -l
bash: fdisk: command not found
[root@portal3115 ~]# /sbin/fdisk -l
Disk /dev/cciss/c0d0: 291.3 GB, 291331192320 bytes
255 heads, 63 sectors/track, 35419 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 267 2040255 82 Linux swap
/dev/cciss/c0d0p3 268 5379 41062140 83 Linux
/dev/cciss/c0d0p4 5380 35419 241296300 5 Extended
/dev/cciss/c0d0p5 5380 7989 20964793+ 83 Linux
/dev/cciss/c0d0p6 7990 9294 10482381 83 Linux
/dev/cciss/c0d0p7 9295 15374 48837568+ 83 Linux
/dev/cciss/c0d0p8 15375 21600 50010313+ 83 Linux
/dev/cciss/c0d0p9 21601 26734 41238823+ 83 Linux
/dev/cciss/c0d0p10 26735 29343 20956761 83 Linux
Disk /dev/sda: 161.0 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 19581 157284351 5 Extended
[root@portal3115 ~]#
[root@portal3115 ~]# /sbin/fdisk /dev/sda
The number of cylinders for this disk is set to 19581.
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): 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):
[root@portal3115 ~]# /sbin/fdisk -l
Disk /dev/cciss/c0d0: 291.3 GB, 291331192320 bytes
255 heads, 63 sectors/track, 35419 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 267 2040255 82 Linux swap
/dev/cciss/c0d0p3 268 5379 41062140 83 Linux
/dev/cciss/c0d0p4 5380 35419 241296300 5 Extended
/dev/cciss/c0d0p5 5380 7989 20964793+ 83 Linux
/dev/cciss/c0d0p6 7990 9294 10482381 83 Linux
/dev/cciss/c0d0p7 9295 15374 48837568+ 83 Linux
/dev/cciss/c0d0p8 15375 21600 50010313+ 83 Linux
/dev/cciss/c0d0p9 21601 26734 41238823+ 83 Linux
/dev/cciss/c0d0p10 26735 29343 20956761 83 Linux
Disk /dev/sda: 161.0 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 19581 157284351 5 Extended
[root@portal3115 ~]# /sbin/fdisk /dev/sda
The number of cylinders for this disk is set to 19581.
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): 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
Command action
l logical (5 or over)
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
p
Partition number (1-4): 2
No free sectors available
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
p
Partition number (1-4): 3
No free sectors available
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
p
Partition number (1-4): 4
No free sectors available
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (1-19581, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-19581, default 19581): +51200M
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): p
Disk /dev/sda: 161.0 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 19581 157284351 5 Extended
/dev/sda5 1 6226 50010282 83 Linux
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (6227-19581, default 6227):
Using default value 6227
Last cylinder or +size or +sizeM or +sizeK (6227-19581, default 19581): +51200M
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): p
Disk /dev/sda: 161.0 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 19581 157284351 5 Extended
/dev/sda5 1 6226 50010282 83 Linux
/dev/sda6 6227 12452 50010313+ 83 Linux
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (12453-19581, default 12453):
Using default value 12453
Last cylinder or +size or +sizeM or +sizeK (12453-19581, default 19581): +51200M
Command (m for help): p
Disk /dev/sda: 161.0 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 19581 157284351 5 Extended
/dev/sda5 1 6226 50010282 83 Linux
/dev/sda6 6227 12452 50010313+ 83 Linux
/dev/sda7 12453 18678 50010313+ 83 Linux
[root@portal3115 ~]# mkfs.ext3 /dev/sda5
bash: mkfs.ext3: command not found
[root@portal3115 ~]# /sbin/mk
mkbootdisk mke2fs mkfs.cramfs mkfs.ext3 mkfs.vfat mkswap
mkdosfs mkfs mkfs.ext2 mkfs.msdos mkinitrd mkzonedb
[root@portal3115 ~]# /sbin/mkfs.ext3 /dev/sda5
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
6258688 inodes, 12502570 blocks
625128 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
382 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
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@portal3115 ~]#
[root@portal3115 /]# mkdir sda1
[root@portal3115 /]# mkdir sda2
[root@portal3115 /]# mkdir sda3
mount /dev/sda5 /sda1/ora10g
mount /dev/sda6 /sda2/ora10g
mount /dev/sda7 /sda3/ora10g
umount /dev/sda5 /sda1
umount /dev/sda6 /sda2
umount -fl /dev/sda7 /sda3
注意:這裡是umount而不是unmount,帶引數fl強制解除安裝。
vi /etc/fstab
chown -R bocbi.dba /sda1/ora10g
chown -R bocbi.dba /sda2/ora10g
chown -R bocbi.dba /sda3/ora10g
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-977455/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux下磁碟分割槽,fdisk,mkfsLinux
- Linux下磁碟分割槽工具cfdisk的使用Linux
- Linux 磁碟與磁碟分割槽Linux
- Linux下的磁碟分割槽和邏輯卷Linux
- linux下磁碟分割槽與格式化Linux
- Linux下掌控磁碟分割槽的九大神器Linux
- linux磁碟分割槽講解Linux
- linux 磁碟分割槽_luks cryptsetupLinux
- 【Linux】MBR磁碟分割槽表只能有四個分割槽?Linux
- Linux 磁碟分割槽和掛載Linux
- linux 新增磁碟 分割槽掛載Linux
- Linux核心之磁碟和分割槽Linux
- linux 磁碟分割槽掛載-fdiskLinux
- linux磁碟分割槽基本命令Linux
- Linux精講——fdisk磁碟分割槽Linux
- 調整Linux磁碟分割槽的大小的方法Linux
- linux新增新磁碟和建立分割槽Linux
- linux磁碟分割槽fdisk命令詳解Linux
- linux磁碟結構及分割槽(轉)Linux
- linux下查詢asm磁碟和linux的分割槽的對應關係LinuxASM
- 案例:磁碟分割槽壞掉-oracle無備份的恢復Oracle
- linux 磁碟 2T以上的分割槽partedLinux
- Mac磁碟如何分割槽?教你Mac系統磁碟自由分割槽教程!Mac
- Linux磁碟分割槽及自動掛載Linux
- Linux LVM 擴充套件磁碟分割槽LinuxLVM套件
- 談linux磁碟結構及分割槽(轉)Linux
- 一文全懂:Linux磁碟分割槽Linux
- linux下增加swap分割槽Linux
- 【LINUX學習】磁碟分割之建立primary和logical 分割槽Linux
- Linux 磁碟分割槽及檔案系統管理Linux
- linux磁碟分割槽格式化-fdisk命令工具Linux
- Linux 擴充套件磁碟分割槽(命令列操作)Linux套件命令列
- Linux磁碟分割槽瞭解多少?Linux入門必看Linux
- 分析asm對應的磁碟分割槽ASM
- linux的分割槽的最佳化和 磁碟配額(轉)Linux
- Windows伺服器如何磁碟分割槽,Windows伺服器磁碟分割槽常見的三種Windows伺服器
- linux下查詢asm磁碟和linux的分割槽的對應關係確認的方法LinuxASM
- (轉) linux下增加swap分割槽Linux