Linux Hard Disk Format Command
来源:互联网 发布:property python 编辑:程序博客网 时间:2024/04/27 21:53
Q. I've installed a new 250GB SATA hard disk on our office CentOS Linux server. How do I format a hard disk under Linux operating system from a shell prompt?
A.. There are total 4 steps involved for hard disk upgrade and installation procedure:
Step #1 : Partition the new disk using fdisk command A.. There are total 4 steps involved for hard disk upgrade and installation procedure:
Following command will list all detected hard disks:
# fdisk -l | grep '^Disk'
Output:
Disk /dev/sda: 251.0 GB, 251000193024 bytesDisk /dev/sdb: 251.0 GB, 251000193024 bytes# fdisk -l | grep '^Disk'
Output:
A device name refers to the entire hard disk. For more information see Linux partition naming convention and IDE drive mappings.
To partition the disk - /dev/sdb, enter:
# fdisk /dev/sdb
The basic fdisk commands you need are:
To partition the disk - /dev/sdb, enter:
# fdisk /dev/sdb
The basic fdisk commands you need are:
- m - print help
- p - print the partition table
- n - create a new partition
- d - delete a partition
- q - quit without saving changes
- w - write the new partition table and exit
To format Linux partitions using ext2fs on the new disk:
# mkfs.ext3 /dev/sdb1
Step#3 : Mount the new disk using mount command# mkfs.ext3 /dev/sdb1
First create a mount point /disk1 and use mount command to mount /dev/sdb1, enter:
# mkdir /disk1
# mount /dev/sdb1 /disk1
# df -H
Step#4 : Update /etc/fstab file# mkdir /disk1
# mount /dev/sdb1 /disk1
# df -H
Open /etc/fstab file, enter:
# vi /etc/fstab
Append as follows:
/dev/sdb1 /disk1 ext3 defaults 1 2# vi /etc/fstab
Append as follows:
Save and close the file.
Task: Label the partitionYou can label the partition using e2label. For example, if you want to label the new partition /backup, enter
# e2label /dev/sdb1 /backup
You can use label name insted of partition name to mount disk using /etc/fstab:
LABEL=/backup /disk1 ext3 defaults 1 2
# e2label /dev/sdb1 /backup
You can use label name insted of partition name to mount disk using /etc/fstab:
LABEL=/backup /disk1 ext3 defaults 1 2
- Linux Hard Disk Format Command
- Linux Hard Disk Format Command
- Linux Hard Disk Format Command
- Linux Hard Disk Format Command
- linux disk command
- Clone Hard Disk Under Linux
- Speed Up your Hard Disk on Linux
- Solve Linux & Unix Systems Hard Disk Problems
- VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
- Install Linux System via Hard Disk 硬盘安装系统
- HowTo: Linux Check IDE / SATA Hard Disk Transfer Speed
- lvm add new hard disk for oracle linux 5.8
- UEFI+GPT hard disk install multi linux system
- about ubuntu hard disk
- hard disk boot priority
- Hard disk hacking - Intro
- HDU4788 Hard Disk Drive
- Ubuntu - 硬盘分区、格式化、自动挂载配置 | Hard disk add new partition, format, auto mount in ubuntu
- RH133 Unit 7 Advanced Filesystem Management
- RH133 Unit 6 Filesystem Management
- RH133 Unit 5 User Administration
- Linux性能调优之虚拟内存篇
- 扩展Linux虚拟机硬盘、分区一例
- Linux Hard Disk Format Command
- 什么是IP PDU(数字电源分配器)
- Rescuing a running virtual machine with dd when datastore metadata is inacces
- 热浪岛+吉隆坡8日自由行之吉隆坡篇
- IT同仁们,节日快乐!
- 如果sudo不幸崩溃
- MSN中国网站中镖了?
- 使用ESXi 4.0的几点小结
- 热浪岛+吉隆坡8日自由行之热浪岛篇