柳暗花明笔记

    阿里云磁盘分区及挂载经历

    所属分类:[ linux&mysql ] 猫哲学家 发表于:2016-11-10 15:10 浏览:317

    fdisk -l

    Disk /dev/vda: 42.9 GB, 42949672960 bytes
    255 heads, 63 sectors/track, 5221 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00078f9c

    Device Boot Start End Blocks Id System
    /dev/vda1 * 1 5222 41940992 83 Linux

    Disk /dev/vdb: 859.0 GB, 858993459200 bytes
    16 heads, 63 sectors/track, 1664406 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

    [root@lanmiz ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/vda1 40G 1.5G 36G 4% /
    tmpfs 3.9G 0 3.9G 0% /dev/shm
    [root@lanmiz ~]# fdisk /dev/vdb
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel with disk identifier 0xd753289a.
    Changes will remain in memory only, until you decide to write them.
    After that, of course, the previous content won't be recoverable.

    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

    WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
    switch off the mode (command 'c') and change display units to
    sectors (command 'u').

    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/vdb: 859.0 GB, 858993459200 bytes
    16 heads, 63 sectors/track, 1664406 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xd753289a

    Device Boot Start End Blocks Id System

    Command (m for help): n
    Command action
    e extended
    p primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-1664406, default 1): 1
    Last cylinder, +cylinders or +size{K,M,G} (1-1664406, default 1664406):
    Using default value 1664406

    Command (m for help): p

    Disk /dev/vdb: 859.0 GB, 858993459200 bytes
    16 heads, 63 sectors/track, 1664406 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xd753289a

    Device Boot Start End Blocks Id System
    /dev/vdb1 1 1664406 838860592+ 83 Linux

    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): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    Syncing disks.
    [root@lanmiz ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/vda1 40G 1.5G 36G 4% /
    tmpfs 3.9G 0 3.9G 0% /dev/shm
    [root@lanmiz ~]# fdisk -l

    Disk /dev/vda: 42.9 GB, 42949672960 bytes
    255 heads, 63 sectors/track, 5221 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00078f9c

    Device Boot Start End Blocks Id System
    /dev/vda1 * 1 5222 41940992 83 Linux

    Disk /dev/vdb: 859.0 GB, 858993459200 bytes
    16 heads, 63 sectors/track, 1664406 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xd753289a

    Device Boot Start End Blocks Id System
    /dev/vdb1 1 1664406 838860592+ 83 Linux
    [root@lanmiz ~]#
    [root@lanmiz ~]#
    [root@lanmiz ~]#
    [root@lanmiz ~]# df -hT
    Filesystem Type Size Used Avail Use% Mounted on
    /dev/vda1 ext4 40G 1.5G 36G 4% /
    tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
    [root@lanmiz ~]#
    [root@lanmiz ~]#
    [root@lanmiz ~]# fdisk -l

    Disk /dev/vda: 42.9 GB, 42949672960 bytes
    255 heads, 63 sectors/track, 5221 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00078f9c

    Device Boot Start End Blocks Id System
    /dev/vda1 * 1 5222 41940992 83 Linux

    Disk /dev/vdb: 859.0 GB, 858993459200 bytes
    16 heads, 63 sectors/track, 1664406 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xd753289a

    Device Boot Start End Blocks Id System
    /dev/vdb1 1 1664406 838860592+ 83 Linux
    [root@lanmiz ~]# mkfs.ext4 /dev/vdb1
    mke2fs 1.41.12 (17-May-2010)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    52428800 inodes, 209715148 blocks
    10485757 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=4294967296
    6400 block groups
    32768 blocks per group, 32768 fragments per group
    8192 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
    102400000

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

    This filesystem will be automatically checked every 30 mounts or
    180 days, whichever comes first. Use tune2fs -c or -i to override.
    [root@lanmiz ~]# df -hT
    Filesystem Type Size Used Avail Use% Mounted on
    /dev/vda1 ext4 40G 1.5G 36G 4% /
    tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
    [root@lanmiz ~]# ls
    [root@lanmiz ~]# ls /
    bin dev home lib64 media opt root selinux sys usr
    boot etc lib lost+found mnt proc sbin srv tmp var
    [root@lanmiz ~]# ls /mnt/
    [root@lanmiz ~]# top

    top - 15:05:14 up 2:24, 3 users, load average: 1.01, 0.89, 0.42
    Tasks: 126 total, 1 running, 125 sleeping, 0 stopped, 0 zombie
    Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 8061236k total, 227224k used, 7834012k free, 19616k buffers
    Swap: 0k total, 0k used, 0k free, 70404k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1012 root 20 0 24600 2844 2208 S 0.3 0.0 0:03.68 AliYunDunUpdate
    1085 root 20 0 65840 5692 3976 S 0.3 0.1 0:16.63 AliYunDun
    1 root 20 0 19232 1488 1196 S 0.0 0.0 0:00.61 init
    2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
    3 root RT 0 0 0 0 S 0.0 0.0 0:00.05 migration/0
    4 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/0
    5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 stopper/0
    6 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
    7 root RT 0 0 0 0 S 0.0 0.0 0:00.12 migration/1
    8 root RT 0 0 0 0 S 0.0 0.0 0:00.00 stopper/1
    9 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/1
    10 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
    11 root RT 0 0 0 0 S 0.0 0.0 0:00.06 migration/2
    12 root RT 0 0 0 0 S 0.0 0.0 0:00.00 stopper/2
    13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/2
    14 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/2
    15 root RT 0 0 0 0 S 0.0 0.0 0:00.07 migration/3
    16 root RT 0 0 0 0 S 0.0 0.0 0:00.00 stopper/3
    17 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/3
    18 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/3
    [root@lanmiz ~]# fdisk -l

    Disk /dev/vda: 42.9 GB, 42949672960 bytes
    255 heads, 63 sectors/track, 5221 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00078f9c

    Device Boot Start End Blocks Id System
    /dev/vda1 * 1 5222 41940992 83 Linux

    Disk /dev/vdb: 859.0 GB, 858993459200 bytes
    16 heads, 63 sectors/track, 1664406 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xd753289a

    Device Boot Start End Blocks Id System
    /dev/vdb1 1 1664406 838860592+ 83 Linux
    [root@lanmiz ~]# mount /dev/vdb
    vdb vdb1
    [root@lanmiz ~]# mount /dev/vdb1 /mnt/
    [root@lanmiz ~]#
    [root@lanmiz ~]#
    [root@lanmiz ~]# df -hT
    Filesystem Type Size Used Avail Use% Mounted on
    /dev/vda1 ext4 40G 1.5G 36G 4% /
    tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm
    /dev/vdb1 ext4 788G 69M 748G 1% /mnt

    标签: linux 
    上一编文章 linux cp -rf 还会提示覆盖的解决办法 下一编文章 linux 添加磁盘自动挂载
    最近文章
    发表评论