<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 167,  comments - 30,  trackbacks - 0
    記錄下,轉(zhuǎn)自:http://blog.csdn.net/wonderful19891024/article/details/6166264

    主機(jī)自帶硬盤超過300GB,目前只劃分使用了3個(gè)主分區(qū),不到70GB,如 下:
    [root@db2 ~]# df -h 
    Filesystem Size Used Avail Use% Mounted on 
    /dev/sda1 29G 3.7G  24G 14% / 
    /dev/sda2 29G  22G 5.2G 81% /oracle 
    tmpfs    2.0G    0 2.0G  0% /dev/shm 

    [root@db2 ~]# cat /proc/partitions
    major minor  #blocks  name

       8     0  311427072 sda
        sda1
       8     2   30716280 sda2
       8     3    8193150 sda3
       8    16     976896 sdb
       8    32     976896 sdc

    現(xiàn)在需要給系統(tǒng)添加1個(gè)100GB的空間存放數(shù)據(jù)文件,而又不影響現(xiàn)有系統(tǒng)上業(yè)務(wù)的運(yùn)行,
    使用fdisk結(jié)合partprobe命令不重啟系統(tǒng)添加 一塊新的磁盤分區(qū)。操作步驟如下:

     

     


    第1步,添加新的磁盤分區(qū) 
    [root@db2 ~]# fdisk /dev/sda
    The number of cylinders for this disk is set to 38770.
    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): p

    Disk /dev/sda: 318.9 GB, 318901321728 bytes
    255 heads, 63 sectors/track, 38770 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        3824    30716248+  83  Linux
    /dev/sda2            3825        7648    30716280   83  Linux
    /dev/sda3            7649        8668     8193150   82  Linux swap / Solaris

    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Selected partition 4
    First cylinder (8669-38770, default 8669):
    Using default value 8669
    Last cylinder or +size or +sizeM or +sizeK (8669-38770, default 38770): +100G   
    Command (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: 


    Device or resource busy.
    The kernel still uses the old table.
    The new table will be used at the next reboot.
    Syncing disks.
    [root@db2 ~]#


    第2步,使用工具partprobe讓kernel讀取分區(qū)信息 
    [root@db2 ~]# partprobe
    使用fdisk工具只是將分區(qū)信息寫到磁盤,如果需要mkfs磁盤分區(qū)則需要重啟系統(tǒng),
    而使用partprobe則可以使kernel重新讀取分區(qū) 信息,從而避免重啟系統(tǒng)。



    第3步,格式化文件系統(tǒng) 
    [root@db2 ~]# mkfs.ext3 /dev/sda4
    mke2fs 1.39 (29-May-2006)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    12222464 inodes, 24416791 blocks
    1220839 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=4294967296
    746 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, 20480000, 23887872

    Writing inode tables: done
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information:

    done

    This filesystem will be automatically checked every 26 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    [root@db2 ~]#



    第4步,mount新的分區(qū)/dev/sda4 
    [root@db2 ~]# e2label  /dev/sda4 /data
    [root@db2 ~]# mkdir /data
    [root@db2 ~]# mount /dev/sda4 /data
    [root@db2 ~]# df
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda1             29753556   3810844  24406900  14% /
    /dev/sda2             29753588  11304616  16913160  41% /oracle
    tmpfs                  2023936         0   2023936   0% /dev/shm
    /dev/sda4             96132968    192312  91057300   1% /data
    [root@db2 ~]#


    posted on 2012-11-29 14:56 David1228 閱讀(387) 評(píng)論(0)  編輯  收藏 所屬分類: Linux

    <2012年11月>
    28293031123
    45678910
    11121314151617
    18192021222324
    2526272829301
    2345678

    常用鏈接

    留言簿(4)

    隨筆分類

    隨筆檔案

    文章檔案

    新聞分類

    新聞檔案

    相冊(cè)

    收藏夾

    Java

    Linux知識(shí)相關(guān)

    Spring相關(guān)

    云計(jì)算/Linux/虛擬化技術(shù)/

    友情博客

    多線程并發(fā)編程

    開源技術(shù)

    持久層技術(shù)相關(guān)

    搜索

    •  

    積分與排名

    • 積分 - 359713
    • 排名 - 154

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 99免费在线视频| 色噜噜亚洲精品中文字幕| 免费一区二区无码东京热| 亚洲精华国产精华精华液| 亚洲AV无码不卡在线播放| 亚洲?v无码国产在丝袜线观看| 我的小后妈韩剧在线看免费高清版 | 亚洲精品午夜视频| 国产亚洲精品美女久久久 | 亚洲av无码专区在线电影天堂 | 一级黄色片免费观看| 亚洲精品久久久久无码AV片软件| 久久亚洲AV无码精品色午夜麻| 亚洲精品一级无码鲁丝片| 精品免费久久久久久成人影院| 国产h视频在线观看网站免费| 免费精品99久久国产综合精品| 一区视频免费观看| 深夜特黄a级毛片免费播放| 亚洲七久久之综合七久久| 亚洲人配人种jizz| 亚洲国产人成在线观看| 中文字幕亚洲精品资源网| 久久精品国产亚洲av麻| 亚洲国产成人一区二区三区| 亚洲色婷婷综合开心网| 免费在线视频一区| 亚洲?V无码乱码国产精品 | 免费在线人人电影网| 美女隐私免费视频看| 免费福利在线观看| 免费一级毛suv好看的国产网站| 久久亚洲精品无码gv| 在线精品自拍亚洲第一区| 色窝窝亚洲AV网在线观看| 国产亚洲综合精品一区二区三区| 亚洲av永久中文无码精品综合 | 成年在线网站免费观看无广告| 久久久久国产精品免费免费搜索| 免费看国产精品3a黄的视频| 插B内射18免费视频|