linux下fdis格式化磁盘(维护日志)
2012年1月10日维护日志
服务器磁盘未分区格式化的处理。
[root@yzradius ~]# fdisk -lDisk /dev/sda: 143.9 GB, 143998844928 bytes
255 heads, 63 sectors/track, 17506 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sda1 * 1 1305 10482381 83 Linux
/dev/sda2 1306 1827 4192965 82 Linux swap / Solaris
/dev/sda4 10787 17506 53978400 5 Extended[root@yzradius ~]# fdisk /dev/sdaThe number of cylinders for this disk is set to 17506.
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 actionl logical (5 or over)p primary partition (1-4)
p
Selected partition 3
First cylinder (1828-17506, default 1828):
Using default value 1828
Last cylinder or +size or +sizeM or +sizeK (1828-10786, default 10786):
Using default value 10786Command (m for help): pDisk /dev/sda: 143.9 GB, 143998844928 bytes
255 heads, 63 sectors/track, 17506 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sda1 * 1 1305 10482381 83 Linux
/dev/sda2 1306 1827 4192965 82 Linux swap / Solaris
/dev/sda3 1828 10786 71963167+ 83 Linux
/dev/sda4 10787 17506 53978400 5 ExtendedCommand (m for help): w
The partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.[root@yzradius ~]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda1 10153988 8552776 1077096 89% /
tmpfs 2069716 0 2069716 0% /dev/shm[root@yzradius ~]# fdisk -lDisk /dev/sda: 143.9 GB, 143998844928 bytes
255 heads, 63 sectors/track, 17506 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System
/dev/sda1 * 1 1305 10482381 83 Linux
/dev/sda2 1306 1827 4192965 82 Linux swap / Solaris
/dev/sda3 1828 10786 71963167+ 83 Linux
/dev/sda4 10787 17506 53978400 5 Extended[root@yzradius ~]# mkfs.ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda3 --- 没有那个文件或目录The device apparently does not exist; did you specify it correctly?[root@yzradius ~]# rpm -q parted
parted-1.8.1-27.el5[root@yzradius ~]# partprobe[root@yzradius ~]# mkfs -t ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
9011200 inodes, 17990791 blocks
899539 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
550 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, 11239424Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.[root@yzradius ~]# mkdir /data[root@yzradius ~]# mount /dev/sda3 /data[root@yzradius ~]# df -lh
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda1 9.7G 8.2G 1.1G 89% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda3 68G 180M 64G 1% /data
linux下fdis格式化磁盘(维护日志)相关推荐
- oracle 格式化命令,Linux下硬盘格式化的相关命令Partprobe
Linux下硬盘格式化的相关命令Partprobe [root@db ~]# fdisk /dev/sdb The number of cylinders for this disk is set t ...
- Linux下定时切割Mongodb数据库日志并删除指定天数前的日志记录(转)
文章转自:http://www.osyunwei.com/archives/8998.html 说明: 操作系统:CentOS Mongodb安装目录:/usr/local/mongodb Mongo ...
- Linux 下 4 种实时监控日志文件的方法,总有一种适合你
点击上方蓝色"程序猿DD",选择"设为星标" 回复"资源"获取独家整理的学习资料! 来源 | http://t.cn/AiKIk7c3 在 ...
- Linux 下的格式化输出命令:print
原文链接:http://blog.csdn.net/zgf19930504/article/details/51912765 printf 是linux 下的格式化输出命令,有点儿类似于python ...
- linux下用cronolog分割apache日志
linux下用cronolog分割apache日志,大神莫拍砖,菜鸟留一记录,小白请默默转载.连linux登陆和vi编辑都不会的,请默默关闭此页面.入正题 说明:淡绿色底的为linux命令,其他的为备 ...
- 获取linux命令硬盘信息,Linux下如何获取磁盘信息
HUX布斯 1,Linux下可以在/proc/cpuinfo中看到每个cpu的详细信息.但是对于双核的cpu,在cpuinfo中会看到两个cpu.常常会让人误以为是两个单核的cpu.其实应该通过Phy ...
- linux启用日志记录功能,Linux下启用Open vSwitch的日志功能以便调试和排障
问题 我试着为我的Open vSwitch部署排障,鉴于此,我想要检查它的由内建日志机制生成的调试信息.我怎样才能启用Open vSwitch的日志功能,并且修改它的日志等级(如,修改成INFO/DE ...
- linux 下使用crontab 定时打包日志并删除已被打包的日志
crontab是和用户相关的,每个用户有自己对应的crontab . cron是Linux下的定时执行工具,以下是重启/关闭等等的命令 #/sbin/service crond start //启动服 ...
- Linux下的格式化字符串漏洞利用姿势
[转]http://www.cnblogs.com/Ox9A82/p/5429099.html linux最早的漏洞防护机制nx-stack刚刚出现后就有人想出了突破方法.那就是只有栈是不可执行,而除 ...
最新文章
- 【Python】Radiobutton组件 LabelFrame组件 Entry组件
- 【带你重拾Redis】Redis事务
- Telnet不是内部或外部命令解决办法
- Windows中报错:Fatal error in launcher: Unable to create process using ‘“‘ 的解决方案
- java: BigDecimal 调用add后,求和结果没有变化
- 零基础带你快速入门consul-难道consul还能这样用?
- Linux主流架构运维工作简单剖析
- uc浏览器TV版最新版本功能简介
- BootstrapTable冻结表头(二)
- Docker与虚拟机技术
- Shell脚本参数值包含空格的处理
- 100%抄袭!ICLR 2022投稿论文剽窃两篇顶会,程序主席放「实锤」严词拒稿!
- 设计模式和java实现
- snmpwalk , snmpget
- iOS 【真机调试-免证书-开发者信任问题】
- 拥有“中国诺贝尔奖”的未来论坛,会告诉我们怎样的未来? | 未来论坛 2017...
- python爬贴吧回复_Python爬虫实践,获取百度贴吧内容
- 汤姆猫代码python_用树莓派实现会说话的汤姆猫
- 移动硬盘数据丢失如何恢复
- 汽车指示器数字仪表盘logo标志AE视频模版免费下载【56期】