Você está na página 1de 8

[root@localhost ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 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: 0x00055520

Device Boot Start End Blocks Id System

/dev/sda1 * 1 39 307200 83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2 39 2354 18598912 83 Linux

/dev/sda3 2354 2611 2064384 82 Linux swap / Solaris

Disk /dev/sdb: 1073 MB, 1073741824 bytes

255 heads, 63 sectors/track, 130 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: 0x2521d6d8

Device Boot Start End Blocks Id System

/dev/sdb1 1 130 1044193+ 8e Linux LVM


Disk /dev/sdc: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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: 0x10e5bb4e

Device Boot Start End Blocks Id System

/dev/sdc1 1 65 522081 83 Linux

/dev/sdc2 66 130 522112+ 83 Linux

/dev/sdc3 131 195 522112+ 8e Linux LVM

Disk /dev/dm-0: 314 MB, 314572800 bytes

255 heads, 63 sectors/track, 38 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: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

[root@localhost ~]# fdisk -l /dev/sdc

Disk /dev/sdc: 2147 MB, 2147483648 bytes


255 heads, 63 sectors/track, 261 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: 0x10e5bb4e

Device Boot Start End Blocks Id System

/dev/sdc1 1 65 522081 83 Linux

/dev/sdc2 66 130 522112+ 83 Linux

/dev/sdc3 131 195 522112+ 8e Linux LVM

[root@localhost ~]# fdisk /dev/sdc

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): n

Command action

e extended

p primary partition (1-4)

Invalid partition number for type `4'

Command action

e extended

p primary partition (1-4)


p

Selected partition 4

First cylinder (196-261, default 196):

Using default value 196

Last cylinder, +cylinders or +size{K,M,G} (196-261, default 261): +100M

Command (m for help): p

Disk /dev/sdc: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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: 0x10e5bb4e

Device Boot Start End Blocks Id System

/dev/sdc1 1 65 522081 83 Linux

/dev/sdc2 66 130 522112+ 83 Linux

/dev/sdc3 131 195 522112+ 8e Linux LVM

/dev/sdc4 196 209 112455 83 Linux

Command (m for help): t

Partition number (1-4): 4

Hex code (type L to list codes): 82

Changed system type of partition 4 to 82 (Linux swap / Solaris)


Command (m for help): p

Disk /dev/sdc: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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: 0x10e5bb4e

Device Boot Start End Blocks Id System

/dev/sdc1 1 65 522081 83 Linux

/dev/sdc2 66 130 522112+ 83 Linux

/dev/sdc3 131 195 522112+ 8e Linux LVM

/dev/sdc4 196 209 112455 82 Linux swap / Solaris

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 or after you run partprobe(8) or kpartx(8)

Syncing disks.
You have new mail in /var/spool/mail/root

[root@localhost ~]#

[root@localhost ~]# partprobe /dev/sdc4

[root@localhost ~]# free -m

total used free shared buffers cached

Mem: 1007 570 436 0 99 281

-/+ buffers/cache: 189 817

Swap: 2015 0 2015

[root@localhost ~]# swapon -s

Filename Type Size Used Priority

/dev/sda3 partition 2064376 0 -1

[root@localhost ~]# cat /proc/swaps

Filename Type Size Used Priority

/dev/sda3 partition 2064376 0 -1

You have new mail in /var/spool/mail/root

[root@localhost ~]# mkswap /dev/sdc4

Setting up swapspace version 1, size = 112448 KiB

no label, UUID=c10545d1-990e-45c6-9c8b-8f1c4bf14909

[root@localhost ~]# swapon /dev/sdc4

You have new mail in /var/spool/mail/root

[root@localhost ~]# vi /etc/fstab

[root@localhost ~]# cat /etc/fstab


#

# /etc/fstab

# Created by anaconda on Mon Jan 8 09:17:19 2018

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

UUID=901a4c8a-ed07-4345-9a05-49da54cb19f7 / ext4 defaults 11

UUID=3d1988d1-663f-4c60-95ce-e808882219a6 /boot ext4 defaults 12

UUID=0427fcf5-9f03-4197-8166-c315ebbbc9e5 swap swap defaults 00

tmpfs /dev/shm tmpfs defaults 00

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 00

proc /proc proc defaults 00

UUID=0c04f193-af72-4812-be27-cdafe71edfa4 /newhd ext4 defaults 00

/dev/sdc1 /dbt ext4 defaults 00

/dev/sdc2 /db1t ext4 defaults 00

/dev/vg_dbt3/lv_dbt3 /dbt3 ext4 defaults 00

/dev/sdc4 swap swap defalts 00

[root@localhost ~]# free -m

total used free shared buffers cached


Mem: 1007 570 436 0 99 281

-/+ buffers/cache: 189 817

Swap: 2125 0 2125

You have new mail in /var/spool/mail/root

[root@localhost ~]# swapon -s

Filename Type Size Used Priority

/dev/sda3 partition 2064376 0 -1

/dev/sdc4 partition 112444 0 -2

[root@localhost ~]# cat /proc/swaps

Filename Type Size Used Priority

/dev/sda3 partition 2064376 0 -1

/dev/sdc4 partition 112444 0 -2

Você também pode gostar