1, the creation of a 10G file system, the type of EXT4, requires the boot can be automatically mounted to a separate data/data directory;
[Email protected]/]# cat/proc/partitions
Major Minor #blocks name
8 0 52428800 SDA
8 1 204800 sda1
8 2 4096000 Sda2
8 3 48126976 Sda3
8 10485760 SDB
[Email protected]/]# Fdisk/devsdb
Unable to Open/devsdb
[Email protected]/]# Fdisk/dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel
Building a new DOS disklabel with disk identifier 0x68f6d495.
Changes'll remain in memory only, until the decide to write them.
After that, of course, the previous content won ' t is recoverable.
Warning:invalid flag 0x0000 of partition Table 4 would be a 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): P
disk/dev/sdb:10.7 GB, 10737418240 bytes
255 heads, Sectors/track, 1305 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x68f6d495
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-1305, default 1):
Using Default value 1
Last cylinder, +cylinders or +size{k,m,g} (1-1305, default 1305):
Using Default Value 1305
Command (M for help): P
disk/dev/sdb:10.7 GB, 10737418240 bytes
255 heads, Sectors/track, 1305 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x68f6d495
Device Boot Start End Blocks Id System
/DEV/SDB1 1 1305 10482381 Linux
Command (M for help): W
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
[Email protected]/]# Mkfs.ext4/dev/sdb
MKE2FS 1.41.12 (17-may-2010)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) Y
Filesystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621440 blocks
131072 blocks (5.00%) reserved for the Super user
First Data block=0
Maximum filesystem blocks=2684354560
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
Writing Inode Tables:done
Creating Journal (32768 blocks):
Done
Writing Superblocks and filesystem accounting Information:
Done
This filesystem would be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.
[Email protected]/]#
[Email protected]/]#
[Email protected]/]# cat/proc/partitions
Major Minor #blocks name
8 0 52428800 SDA
8 1 204800 sda1
8 2 4096000 Sda2
8 3 48126976 Sda3
8 10485760 SDB
8 10482381 SDB1
[Email protected]/]# mkdir/mydata1
[Email protected]/]# mount/dev/sdb1/mydata1/
Mount:you must specify the filesystem type
[Email protected]/]# mount/dev/sdb/mydata1/
[Email protected]/]# cd/mydata1/
[[email protected] mydata1]# ls
Lost+found
[[email protected] mydata1]# ls
Lost+found
[Email protected] mydata1]# CD lost+found/
[[email protected] lost+found]# ls
[Email protected] lost+found]# CD.
[[email protected] mydata1]# ls
Lost+found
[[email protected] mydata1]# DF
Filesystem 1k-blocks used Available use% mounted on
/dev/sda3 47371632 1628584 43336700 4%/
Tmpfs 510148 0 510148 0%/dev/shm
/DEV/SDA1 198337 26862 161235 15%/boot
/dev/sdb 10321208 154100 9642820 2%/mydata1
[Email protected] mydata1]# Vi/etc/fstab
[Email protected] mydata1]# Cat/etc/fstab
#
#/etc/fstab
# Created by Anaconda on Wed Dec 9 01:17:20 2015
#
# Accessible filesystems, by reference, is maintained under '/dev/disk '
# See mans Pages Fstab (5), Findfs (8), mount (8) and/or Blkid (8) for more info
#
UUID=1A36E597-B5E2-4B66-9250-2E4AF5EECF3F/EXT4 Defaults 1 1
Uuid=133f8aff-57bf-41d5-8570-1d40cae3d13b/boot EXT4 Defaults 1 2
UUID=DADABADB-1467-4921-88D1-47BA1EDDBF71 swap swap defaults 0 0
TMPFS/DEV/SHM TMPFS Defaults 0 0
Devpts/dev/pts devpts gid=5,mode=620 0 0
Sysfs/sys Sysfs Defaults 0 0
PROC/PROC proc Defaults 0 0
/dev/sdb/mydata1ext4defaults0 0
2, display the ' Netstat-tan ' command results with ' LISTEN ' followed by 0, one or more blank characters end of the line;
[Email protected] mydata1]# Netstat-tan |grep ' listen[]*$ '
TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:1433 0.0.0.0:* LISTEN
TCP 0 0:: 1:25:::* LISTEN
TCP 0 0::: 1433:::* LISTEN
Finished, changed several browsers have reported 405 errors, I have no words. I'm using the TXT document last time.
This article is from the "Learning Exchange" blog, please be sure to keep this source http://725689.blog.51cto.com/715689/1729273
Linux OPS Practice case-December 20, 2015-December 31