LVM邏輯卷 芭届、 綜合串講 颇玷、 綜合練習(xí)

  1. 案例1:新建一個(gè)邏輯卷
  2. 案例2:調(diào)整現(xiàn)有磁盤的分區(qū)
  3. 案例3:擴(kuò)展邏輯卷的大小
  4. 案例4:查找并處理文件
  5. 案例5:Linux管理員 綜合測(cè)試

1 案例1:新建一個(gè)邏輯卷

1.1 問題

本例要求沿用前一天案例,使用分區(qū) /dev/vdb1 構(gòu)建 LVM 存儲(chǔ)坡椒,相關(guān)要求如下:

  1. 新建一個(gè)名為 systemvg 的卷組
  2. 在此卷組中創(chuàng)建一個(gè)名為 vo 的邏輯卷扰路,大小為180MiB
  3. 將邏輯卷 vo 格式化為 EXT4 文件系統(tǒng)
  4. 將邏輯卷 vo 掛載到 /vo 目錄,并在此目錄下建立一個(gè)測(cè)試文件 votest.txt倔叼,內(nèi)容為“I AM KING.”

1.2 方案

LVM創(chuàng)建工具的基本用法:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. vgcreate 卷組名 物理設(shè)備.. ..
  2. lvcreate -L 大小 -n 邏輯卷名 卷組名

</pre>

1.3 步驟

實(shí)現(xiàn)此案例需要按照如下步驟進(jìn)行汗唱。

步驟一:創(chuàng)建卷組

1)新建名為systemvg的卷組

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# vgcreate systemvg /dev/vdb1
  2. Physical volume "/dev/vdb1" successfully created
  3. Volume group "systemvg" successfully created

</pre>

2)確認(rèn)結(jié)果

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# vgscan
  2. Reading all physical volumes. This may take a while...
  3. Found volume group "systemvg" using metadata type lvm2

</pre>

步驟二:創(chuàng)建邏輯卷

1)新建名為vo的邏輯卷

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# lvcreate -L 180MiB -n vo systemvg
  2. Logical volume "vo" created

</pre>

2)確認(rèn)結(jié)果

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# lvscan
  2. ACTIVE '/dev/systemvg/vo' [180.00 MiB] inherit

</pre>

步驟三:格式化及掛載使用

1)格式化邏輯卷/dev/systemvg/vo

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkfs.ext4 /dev/systemvg/vo
  2. .. ..
  3. Allocating group tables: done
  4. Writing inode tables: done
  5. Creating journal (4096 blocks): done
  6. Writing superblocks and filesystem accounting information: done

</pre>

2)掛載邏輯卷/dev/systemvg/vo

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkdir /vo //創(chuàng)建掛載點(diǎn)
  2. [root@server0 ~]# mount /dev/systemvg/vo /vo //掛載
  3. [root@server0 ~]# df -hT /vo/ //檢查結(jié)果
  4. Filesystem Type Size Used Avail Use% Mounted on
  5. /dev/mapper/systemvg-vo ext4 171M 1.6M 157M 1% /vo

</pre>

3)訪問邏輯卷/dev/systemvg/vo

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# cat /vo/votest.txt
  2. I AM KING.

</pre>

2 案例2:調(diào)整現(xiàn)有磁盤的分區(qū)

2.1 問題

本例要求沿用前一天案例,對(duì)磁盤/dev/vdb的分區(qū)表進(jìn)行調(diào)整丈攒,要求如下:不更改原有分區(qū)哩罪,利用剩余空間新增三個(gè)分區(qū),大小依次為:500MiB巡验、2000MiB际插、512MiB

然后再基于剛建立的 2000MiB 分區(qū)構(gòu)建新的 LVM 存儲(chǔ):

  1. 新的邏輯卷命名為 database,大小為50個(gè)物理擴(kuò)展單元(Physical Extent)显设,屬于 datastore 卷組
  2. 在 datastore 卷組中的所有邏輯卷框弛,其物理擴(kuò)展單元(Physical Extent)的大小為16MiB
  3. 使用 EXT3 文件系統(tǒng)對(duì)邏輯卷 database 格式化,此邏輯卷應(yīng)該在開機(jī)時(shí)自動(dòng)掛載到 /mnt/database 目錄

2.2 方案

創(chuàng)建卷組時(shí)捕捂,可以通過-s選項(xiàng)指定PE的大小瑟枫。

在給新建的邏輯卷分配空間時(shí)斗搞,空間大小只能是PE大小的倍數(shù)。

2.3 步驟

實(shí)現(xiàn)此案例需要按照如下步驟進(jìn)行慷妙。

步驟一:調(diào)整現(xiàn)有磁盤分區(qū)

1)新建擴(kuò)展分區(qū)(使用剩余可用空間)

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# fdisk /dev/vdb

  2. Command (m for help): p //確認(rèn)原有分區(qū)表

  3. .. ..

  4. Device Boot Start End Blocks Id System

  5. /dev/vdb1 2048 411647 204800 8e Linux LVM

  6. /dev/vdb2 411648 4507647 2048000 83 Linux

  7. /dev/vdb3 4507648 6555647 1024000 83 Linux

  8. Command (m for help): n //新建分區(qū)

  9. Partition type:

  10. p primary (3 primary, 0 extended, 1 free)

  11. e extended

  12. Select (default e): e //類型指定為e(擴(kuò)展分區(qū))

  13. Selected partition 4 //只一個(gè)可用編號(hào)榜旦,自動(dòng)選取

  14. First sector (6555648-20971519, default 6555648): //起始位置默認(rèn)

  15. Using default value 6555648

  16. Last sector, +sectors or +size{K,M,G} (6555648-20971519, default 20971519):

  17. Using default value 20971519 //結(jié)束位置默認(rèn)

  18. Partition 4 of type Extended and of size 6.9 GiB is set

  19. Command (m for help): p

  20. .. ..

  21. Device Boot Start End Blocks Id System

  22. /dev/vdb1 2048 411647 204800 8e Linux LVM

  23. /dev/vdb2 411648 4507647 2048000 83 Linux

  24. /dev/vdb3 4507648 6555647 1024000 83 Linux

  25. /dev/vdb4 6555648 20971519 7207936 5 Extended

</pre>

2)在擴(kuò)展分區(qū)中新建3個(gè)邏輯分區(qū)

創(chuàng)建第1個(gè)邏輯卷(由于主分區(qū)編號(hào)已用完,分區(qū)類型自動(dòng)選l邏輯分區(qū)):

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. Command (m for help): n
  2. All primary partitions are in use
  3. Adding logical partition 5 //分區(qū)編號(hào)5
  4. First sector (6557696-20971519, default 6557696): //起始位置默認(rèn)
  5. Using default value 6557696
  6. Last sector, +sectors or +size{K,M,G} (6557696-20971519, default 20971519): +500M
  7. //結(jié)束位置默認(rèn)
  8. Partition 5 of type Linux and of size 500 MiB is set

</pre>

創(chuàng)建第2個(gè)邏輯卷:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. Command (m for help): n
  2. All primary partitions are in use
  3. Adding logical partition 6 //分區(qū)編號(hào)6
  4. First sector (7583744-20971519, default 7583744): //起始位置默認(rèn)
  5. Using default value 7583744
  6. Last sector, +sectors or +size{K,M,G} (7583744-20971519, default 20971519): +2000M
  7. //結(jié)束位置默認(rèn)
  8. Partition 6 of type Linux and of size 2 GiB is set

</pre>

創(chuàng)建第3個(gè)邏輯卷:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. Command (m for help): n
  2. All primary partitions are in use
  3. Adding logical partition 7 //分區(qū)編號(hào)7
  4. First sector (11681792-20971519, default 11681792): //起始位置默認(rèn)
  5. Using default value 11681792
  6. Last sector, +sectors or +size{K,M,G} (11681792-20971519, default 20971519): +512M
  7. //結(jié)束位置默認(rèn)
  8. Partition 7 of type Linux and of size 512 MiB is set

</pre>

根據(jù)預(yù)計(jì)的用途調(diào)整分區(qū)類型(可選):

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. Command (m for help): t //修改

  2. Partition number (1-7, default 7): 5 //第5個(gè)分區(qū)

  3. Hex code (type L to list all codes): 8e //類型為8e(LVM)

  4. Changed type of partition 'Linux' to 'Linux LVM'

  5. Command (m for help): t //修改

  6. Partition number (1-7, default 7): 6 //第6個(gè)分區(qū)

  7. Hex code (type L to list all codes): 8e //類型為8e(LVM)

  8. Changed type of partition 'Linux' to 'Linux LVM'

  9. Command (m for help): t //修改

  10. Partition number (1-7, default 7): 7 //第7個(gè)分區(qū)

  11. Hex code (type L to list all codes): 82 //類型為82(交換分區(qū))

  12. Changed type of partition 'Linux' to 'Linux swap / Solaris'

</pre>

確認(rèn)分區(qū)結(jié)果并保存:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. Command (m for help): p

  2. .. ..

  3. Device Boot Start End Blocks Id System

  4. /dev/vdb1 2048 411647 204800 8e Linux LVM

  5. /dev/vdb2 411648 4507647 2048000 83 Linux

  6. /dev/vdb3 4507648 6555647 1024000 83 Linux

  7. /dev/vdb4 6555648 20971519 7207936 5 Extended

  8. /dev/vdb5 6557696 7581695 512000 8e Linux LVM

  9. /dev/vdb6 7583744 11679743 2048000 8e Linux LVM

  10. /dev/vdb7 11681792 12730367 524288 82 Linux swap / Solaris

  11. Command (m for help): w //保存退出

  12. The partition table has been altered!

  13. Calling ioctl() to re-read partition table.

  14. WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

  15. The kernel still uses the old table. The new table will be used at

  16. the next reboot or after you run partprobe(8) or kpartx(8)

  17. Syncing disks. //提示重啟

</pre>

3)刷新分區(qū)表

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# partprobe /dev/vdb
  2. [root@server0 ~]# reboot

</pre>

步驟二:新建卷組景殷、邏輯卷

1)新建卷組datastore,指定PE大小為16MiB

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# vgcreate -s 16MiB datastore /dev/vdb6
  2. Volume group "datastore" successfully created
  3. [root@server0 ~]# vgscan //確認(rèn)新建的卷組
  4. Reading all physical volumes. This may take a while...
  5. Found volume group "systemvg" using metadata type lvm2
  6. Found volume group "datastore" using metadata type lvm2

</pre>

2)新建邏輯卷database澡屡,大小設(shè)置為50個(gè)PE

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# lvcreate -l 50 -n database datastore
  2. Logical volume "database" created
  3. [root@server0 ~]# lvscan //確認(rèn)新建的邏輯卷
  4. ACTIVE '/dev/systemvg/vo' [180.00 MiB] inherit
  5. ACTIVE '/dev/datastore/database' [800.00 MiB] inherit

</pre>

步驟三:格式化及使用邏輯卷

1)格式化邏輯卷/dev/datastore/database

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkfs.ext3 /dev/datastore/database
  2. .. ..
  3. Allocating group tables: done
  4. Writing inode tables: done
  5. Creating journal (4096 blocks): done
  6. Writing superblocks and filesystem accounting information: done

</pre>

2)配置開機(jī)掛載

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkdir /mnt/database //創(chuàng)建掛載點(diǎn)
  2. [root@server0 ~]# vim /etc/fstab
  3. .. ..
  4. /dev/datastore/database /mnt/database ext3 defaults 0 0

</pre>

3)驗(yàn)證掛載配置

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mount -a
  2. [root@server0 ~]# df -hT /mnt/database/ //確認(rèn)掛載點(diǎn)設(shè)備
  3. Filesystem Type Size Used Avail Use% Mounted on
  4. /dev/mapper/datastore-database ext3 772M 828K 715M 1% /mnt/database

</pre>

3 案例3:擴(kuò)展邏輯卷的大小

3.1 問題

本例要求沿用練習(xí)一猿挚,將邏輯卷 vo 的大小調(diào)整為 300MiB,要求如下:

  1. 原文件系統(tǒng)中的內(nèi)容必須保持完整
  2. 必要時(shí)可使用之前準(zhǔn)備的分區(qū) /dev/vdb5 來補(bǔ)充空間
  3. 注意:分區(qū)大小很少能完全符合要求的大小驶鹉,所以大小在270MiB和300MiB之間都是可以接受的

3.2 方案

對(duì)于已經(jīng)格式化好的邏輯卷绩蜻,在擴(kuò)展大小以后,必須通知內(nèi)核新大小室埋。

如果此邏輯卷上的文件系統(tǒng)是EXT3/EXT4類型办绝,需要使用resize2fs工具;

如果此邏輯卷上的文件系統(tǒng)是XFS類型姚淆,需要使用xfs_growfs孕蝉。

3.3 步驟

實(shí)現(xiàn)此案例需要按照如下步驟進(jìn)行。

步驟一:確認(rèn)邏輯卷vo的信息

1)找出邏輯卷所在卷組

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# lvscan
  2. ACTIVE '/dev/systemvg/vo' [180.00 MiB] inherit
  3. ACTIVE '/dev/datastore/database' [800.00 MiB] inherit

</pre>

2)查看該卷組的剩余空間是否可滿足擴(kuò)展需要

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# vgdisplay systemvg
  2. --- Volume group ---
  3. VG Name systemvg
  4. System ID
  5. Format lvm2
  6. Metadata Areas 1
  7. Metadata Sequence No 2
  8. VG Access read/write
  9. VG Status resizable
  10. MAX LV 0
  11. Cur LV 1
  12. Open LV 0
  13. Max PV 0
  14. Cur PV 1
  15. Act PV 1
  16. VG Size 196.00 MiB //卷組總大小
  17. PE Size 4.00 MiB
  18. Total PE 49
  19. Alloc PE / Size 45 / 180.00 MiB
  20. Free PE / Size 4 / 16.00 MiB //剩余空間大小
  21. VG UUID czp8IJ-jihS-Ddoh-ny38-j521-5X8J-gqQfUN

</pre>

此例中卷組systemvg的總大小都不夠300MiB腌逢、剩余空間才16MiB降淮,因此必須先擴(kuò)展卷組疗隶。只有剩余空間足夠哼御,才可以直接擴(kuò)展邏輯卷大小。

步驟二:擴(kuò)展卷組

1)將提前準(zhǔn)備的分區(qū)/dev/vdb5添加到卷組systemvg

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# vgextend systemvg /dev/vdb5
  2. Physical volume "/dev/vdb5" successfully created
  3. Volume group "systemvg" successfully extended

</pre>

2)確認(rèn)卷組新的大小

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# vgdisplay systemvg
  2. --- Volume group ---
  3. VG Name systemvg
  4. .. ..
  5. VG Size 692.00 MiB //總大小已變大
  6. PE Size 4.00 MiB
  7. Total PE 173
  8. Alloc PE / Size 45 / 180.00 MiB
  9. Free PE / Size 128 / 512.00 MiB //剩余空間已達(dá)512MiB
  10. VG UUID czp8IJ-jihS-Ddoh-ny38-j521-5X8J-gqQfUN

</pre>

步驟三:擴(kuò)展邏輯卷大小

1)將邏輯卷/dev/systemvg/vo的大小調(diào)整為300MiB

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# lvextend -L 300MiB /dev/systemvg/vo
  2. Extending logical volume vo to 300.00 MiB
  3. Logical volume vo successfully resized

</pre>

2)確認(rèn)調(diào)整結(jié)果

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# lvscan
  2. ACTIVE '/dev/systemvg/vo' [300.00 MiB] inherit
  3. ACTIVE '/dev/datastore/database' [800.00 MiB] inherit

</pre>

3)刷新文件系統(tǒng)大小

確認(rèn)邏輯卷vo上的文件系統(tǒng)類型:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# blkid /dev/systemvg/vo
  2. /dev/systemvg/vo: UUID="d4038749-74c3-4963-a267-94675082a48a" TYPE="ext4"

</pre>

選擇合適的工具刷新大信锱狻:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# resize2fs /dev/systemvg/vo
  2. resize2fs 1.42.9 (28-Dec-2013)
  3. Resizing the filesystem on /dev/systemvg/vo to 307200 (1k) blocks.
  4. The filesystem on /dev/systemvg/vo is now 307200 blocks long.

</pre>

確認(rèn)新大忻教琛(約等于300MiB):

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mount /dev/systemvg/vo /vo/
  2. [root@server0 ~]# df -hT /vo
  3. Filesystem Type Size Used Avail Use% Mounted on
  4. /dev/mapper/systemvg-vo ext4 287M 2.1M 266M 1% /vo

</pre>

4 案例4:查找并處理文件

4.1 問題

本例要求采用不少于兩種方法完成以下任務(wù):

  1. 找出所有用戶 student 擁有的文件
  2. 把它們拷貝到 /root/findfiles/ 文件夾中

4.2 步驟

實(shí)現(xiàn)此案例需要按照如下步驟進(jìn)行系吩。

步驟一:確認(rèn)能找到指定的文件

1)確認(rèn)新版內(nèi)核的下載地址

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# find / -user student -type f
  2. find: ‘/proc/1853/task/1853/fdinfo/6’: 沒有那個(gè)文件或目錄
  3. find: ‘/proc/1853/fdinfo/6’: 沒有那個(gè)文件或目錄
  4. /var/spool/mail/student
  5. /home/student/.bash_logout
  6. /home/student/.bash_profile
  7. /home/student/.bashrc
  8. /home/student/.ssh/authorized_keys
  9. /home/student/.config/gnome-initial-setup-done
  10. /home/student/.config/monitors.xml

</pre>

對(duì)于上述操作中出現(xiàn)的/proc信息忽略即可。

步驟二:處理找到的文件

1)創(chuàng)建目標(biāo)文件夾

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkdir /root/findfiles

</pre>

2)拷貝找到的文件到目標(biāo)文件夾

以下兩種方法任選一種:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# find / -user student -type f -exec cp -p {} /root/findfiles/ ;
  2. .. ..
  3. 或者
  4. [root@server0 ~]# \cp -p $(find / -user student -type f) /root/findfiles/
  5. .. ..

</pre>

3)確認(rèn)拷貝結(jié)果

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# ls -lhA /root/findfiles/
  2. 總用量 24K
  3. -rw-------. 1 student student 1.7K 7月 11 2014 authorized_keys
  4. -rw-r--r--. 1 student student 18 1月 29 2014 .bash_logout
  5. -rw-r--r--. 1 student student 193 1月 29 2014 .bash_profile
  6. -rw-r--r--. 1 student student 231 1月 29 2014 .bashrc
  7. -rw-r--r--. 1 student student 4 7月 11 2014 gnome-initial-setup-done
  8. -rw-r--r--. 1 student student 1.5K 7月 11 2014 monitors.xml
  9. -rw-rw----. 1 student mail 0 7月 11 2014 student

</pre>

5 案例5:Linux管理員 綜合測(cè)試

5.1 問題

根據(jù)本文提供的練習(xí)步驟完成所有練習(xí)案例妒蔚。

5.2 方案

開始練習(xí)之前穿挨,先依次重置虛擬機(jī)環(huán)境。

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@room9pc13 ~]# rht-vmctl reset classroom
  2. [root@room9pc13 ~]# rht-vmctl reset server

</pre>

5.3 步驟

實(shí)現(xiàn)此案例需要按照如下步驟進(jìn)行面睛。

步驟01:配置一個(gè)用戶

案例概述:

創(chuàng)建一個(gè)名為alex的用戶絮蒿,用戶ID是 3456。密碼是flectrag

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# useradd -u 3456 alex
  2. [root@server0 ~]# echo flectrag | passwd --stdin alex

</pre>

步驟02:創(chuàng)建用戶賬號(hào)和組

案例概述:

創(chuàng)建下列用戶叁鉴、組以及和組的成員關(guān)系:

  • 一個(gè)名為adminuser的組
  • 一個(gè)名為natasha的用戶土涝,其屬于adminuser,這個(gè)組是該用戶的從屬組
  • 一個(gè)名為harry的用戶幌墓,屬于adminuser但壮,這個(gè)組是該用戶的從屬組
  • 一個(gè)名為sarah的用戶冀泻,其在系統(tǒng)中沒有可交互的shell,并且不是adminuser組的成員用戶
  • natasha蜡饵、harry弹渔、和sarah的密碼都要設(shè)置為flectrag

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# groupadd adminuser //添加組

  2. [root@server0 ~]# useradd -G adminuser natasha //添加用戶

  3. [root@server0 ~]# useradd -G adminuser harry

  4. [root@server0 ~]# useradd -s /sbin/nologin sarah

  5. [root@server0 ~]# echo flectrag | passwd --stdin natasha //設(shè)置密碼

  6. [root@server0 ~]# echo flectrag | passwd --stdin harry

  7. [root@server0 ~]# echo flectrag | passwd --stdin sarah

</pre>

步驟03:配置文件 /var/tmp/fstab 的權(quán)限

案例概述:

拷貝文件/etc/fstab到/var/tmp/fstab,配置文件/var/tmp/fstab的權(quán)限:

  • 文件/var/tmp/fstab的擁有者是root用戶
  • 文件/var/tmp/fstab屬于root組
  • 文件/var/tmp/fstab對(duì)任何人都不可執(zhí)行
  • 用戶natasha 能夠?qū)ξ募?var/tmp/fstab執(zhí)行讀和寫操作
  • 用戶harry 對(duì)文件/var/tmp/fstab既不能讀溯祸,也不能寫
  • 所有其他用戶(當(dāng)前的和將來的)能夠?qū)ξ募?var/tmp/fstab進(jìn)行讀操作

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# cp /etc/fstab /var/tmp/fstab //復(fù)制文件
  2. [root@server0 ~]# setfacl -m u:natasha:rw /var/tmp/fstab //添加個(gè)別用戶權(quán)限
  3. [root@server0 ~]# setfacl -m u:harry:- /var/tmp/fstab

</pre>

步驟04:配置一個(gè) cron 任務(wù)

案例概述:

為用戶natasha配置一個(gè)定時(shí)任務(wù)肢专,每天在本地時(shí)間14:23時(shí)執(zhí)行以下命令:

/bin/echo hiya

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# systemctl restart crond

  2. [root@server0 ~]# systemctl enable crond

  3. [root@server0 ~]# crontab -e -u natasha

  4. 23 14 * * * /bin/echo hiya

</pre>

步驟05:創(chuàng)建一個(gè)共享目錄

案例概述:

創(chuàng)建一個(gè)共享目錄/home/admins ,特性如下:

  • /home/admins目錄的組所有權(quán)是adminuser
  • adminuser組的成員對(duì)目錄有讀寫和執(zhí)行的權(quán)限焦辅。除此之外的其他所有用戶沒有任何權(quán)限(root 用戶能夠訪問系統(tǒng)中的所有文件和目錄)
  • 在/home/admins目錄中創(chuàng)建的文件博杖,其組所有權(quán)會(huì)自動(dòng)設(shè)置為屬于adminuser組
  • [注]此處所謂的共享目錄并不是指網(wǎng)絡(luò)共享,只是某個(gè)組成員共用

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkdir /home/admins
  2. [root@server0 ~]# chown :adminuser /home/admins
  3. [root@server0 ~]# chmod ug+rwx,o-rwx /home/admins //調(diào)整權(quán)限
  4. [root@server0 ~]# chmod g+s /home/admins //設(shè)置Set UID權(quán)限

</pre>

步驟06:安裝內(nèi)核的升級(jí)

案例概述:

新版內(nèi)核文件從以下地址獲瓤甑恰:

http://classroom.example.com/content/rhel7.0/x86_64/errata/Packages/

  • 升級(jí)你的系統(tǒng)的內(nèi)核版本剃根,同時(shí)要滿足下列要求:
  • 當(dāng)系統(tǒng)重新啟動(dòng)之后升級(jí)的內(nèi)核要作為默認(rèn)的內(nèi)核
  • 原來的內(nèi)核要被保留,并且仍然可以正常啟動(dòng)

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# firefox \
  2. http://classroom.example.com/content/rhel7.0/x86_64/errata/Packages/
  3. //根據(jù)所給地址找到內(nèi)核文件前方,復(fù)制其下載地址
  4. [root@server0 ~]# wget \
  5. http://classroom.example.com/content/rhel7.0/x86_64/errata/Packages/kernel-3.10.0-123.1.2.el7.x86_64.rpm
  6. [root@server0 ~]# rpm -ivh kernel-3.10*.rpm //安裝新內(nèi)核(耐心等...)
  7. [root@server0 ~]# reboot //重啟以使新內(nèi)核生效
  8. [root@server0 ~]# uname -r
  9. 3.10.0-123.1.2.el7.x86_64 //確認(rèn)新內(nèi)核版本

</pre>

步驟07:綁定到外部驗(yàn)證服務(wù)

案例概述:

系統(tǒng) classroom.example.com 提供了一個(gè) LDAP 驗(yàn)證服務(wù)狈醉。您的系統(tǒng)需要按照以下要求綁定到這個(gè)服務(wù)上:

  • 驗(yàn)證服務(wù)器的基本 DN 是:dc=example,dc=com
  • 帳戶信息和驗(yàn)證信息都是由 LDAP 提供的
  • 連接要使用證書進(jìn)行加密,證書可以在下面的鏈接中下載 :
  • http://classroom.example.com/pub/example-ca.crt
  • 當(dāng)正確完成配置后惠险,用戶 ldapuser0 應(yīng)該能夠登錄到您的系統(tǒng)中苗傅,但是沒有主目錄。當(dāng)您完成 autofs的題目之后班巩,才能生成主目錄
  • 用戶ldapuser0的密碼是password

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# yum -y install sssd
  2. [root@server0 ~]# authconfig-tui //使用簡易配置工具

</pre>

根據(jù)提示完成用戶和認(rèn)證方式設(shè)置 ——

User Information:[*] Use LDAP

Authentication Method:[*] Use LDAP Authentication

根據(jù)提示選中 [*] Use TLS金吗,并設(shè)置下列參數(shù) ——

Server:classroom.example.com

Base DN:dc=example,dc=com

提示下載證書到 /etc/openldap/cacerts 目錄時(shí),另開一終端執(zhí)行:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# cd /etc/openldap/cacerts/ //進(jìn)入CA機(jī)構(gòu)證書目錄
  2. [root@server0 ~]# wget http://classroom.example.com/pub/example-ca.crt

</pre>

然后回到 authconfig-tui 工具確認(rèn)趣竣,稍等片刻即可摇庙。

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# systemctl restart sssd
  2. [root@server0 ~]# systemctl enable sssd
  3. [root@server0 ~]# id ldapuser0 //驗(yàn)證LDAP用戶可用
  4. uid=1700(ldapuser0) gid=1700(ldapuser0) groups=1700(ldapuser0)

</pre>

步驟08:家目錄漫游

案例概述:

按照下述要求配置手動(dòng)掛載 LDAP 用戶的主目錄:

  • classroom.example.com(172.25.254.254)通過 NFS 輸出 /home/guests 目錄到您的系統(tǒng),這個(gè)文件系統(tǒng)包含了用戶ldapuser0的主目錄遥缕,并且已經(jīng)預(yù)先配置好了
  • ldapuser0用戶的主目錄是 classroom.example.com:/home/guests/ldapuser0
  • ldapuser0的主目錄應(yīng)該掛載到本地的/home/guests/ldapuser0 目錄下
  • 用戶對(duì)其主目錄必須是可寫的
  • ldapuser0用戶的密碼是password

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkdir /home/guest/ldapuser0

  2. [root@server0 ~]# mount classroom.example.com:/home/guests/ldapuser0 /home/guests/ldapuser0 //掛載LDAP家目錄

  3. [root@server0 ~]# su - ldapuser0 -c 'pwd' //驗(yàn)證結(jié)果

  4. /home/guests/ldapuser0

</pre>

步驟09:配置NTP網(wǎng)絡(luò)時(shí)間客戶端

案例概述:

配置您的系統(tǒng)卫袒,讓其作為一個(gè) classroom.example.com 的 NTP 客戶端

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# yum -y install chrony
  2. [root@server0 ~]# vim /etc/chrony.conf
  3. server 0.rhel.pool.ntp.org iburst //注釋掉不可用server配置,

  4. server 1.rhel.pool.ntp.org iburst

  5. server 2.rhel.pool.ntp.org iburst

  6. server 3.rhel.pool.ntp.org iburst

  7. server classroom.example.com iburst //添加新的配置
  8. .. ..
  9. [root@server0 ~]# systemctl restart chronyd
  10. [root@server0 ~]# systemctl enable chronyd

</pre>

步驟10:查找文件

案例概述:

找出所有用戶student擁有的文件单匣,并且把它們拷貝到/root/findfiles 目錄中

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# mkdir /root/findfiles
  2. [root@server0 ~]# find / -user student -type f -exec cp -p {} /root/findfiles/ ;

</pre>

步驟11:查找一個(gè)字符串

案例概述:

在文件/usr/share/dict/words中查找到所有包含字符串seismic的行:

  • 將找出的行按照原文的先后順序拷貝到/root/wordlist文件中
  • /root/wordlist文件不要包含空行夕凝,并且其中的所有行的內(nèi)容都必須是 /usr/share/dict/words文件中原始行的準(zhǔn)確副本

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# grep 'seismic' /usr/share/dict/words > /root/wordlist

</pre>

步驟12:創(chuàng)建一個(gè)歸檔

案例概述:

創(chuàng)建一個(gè)名為 /root/backup.tar.bz2 的歸檔文件,其中包含 /usr/local 目錄中的內(nèi)容户秤,tar 歸檔必須使用 bzip2 進(jìn)行壓縮

解題參考:

<pre class="code sh_javascript snippet-formatted sh_sourceCode" style="font-size: 14px; color: rgb(0, 0, 0); margin-left: 40px; background-color: rgb(238, 238, 238); font-weight: normal; font-style: normal; padding: 1em; line-height: 1.8em; overflow: auto; position: relative; border-radius: 15px; box-shadow: rgb(0, 0, 0) 2px 2px 5px;">

  1. [root@server0 ~]# tar -jcf /root/backup.tar.bz2 /usr/local/

</pre>

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
禁止轉(zhuǎn)載码秉,如需轉(zhuǎn)載請(qǐng)通過簡信或評(píng)論聯(lián)系作者。
  • 序言:七十年代末鸡号,一起剝皮案震驚了整個(gè)濱河市转砖,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌鲸伴,老刑警劉巖府蔗,帶你破解...
    沈念sama閱讀 216,402評(píng)論 6 499
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件晋控,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡姓赤,警方通過查閱死者的電腦和手機(jī)赡译,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,377評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來不铆,“玉大人蝌焚,你說我怎么就攤上這事∈某猓” “怎么了综看?”我有些...
    開封第一講書人閱讀 162,483評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵,是天一觀的道長岖食。 經(jīng)常有香客問我,道長舞吭,這世上最難降的妖魔是什么泡垃? 我笑而不...
    開封第一講書人閱讀 58,165評(píng)論 1 292
  • 正文 為了忘掉前任,我火速辦了婚禮羡鸥,結(jié)果婚禮上蔑穴,老公的妹妹穿的比我還像新娘。我一直安慰自己惧浴,他們只是感情好存和,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,176評(píng)論 6 388
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著衷旅,像睡著了一般捐腿。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上柿顶,一...
    開封第一講書人閱讀 51,146評(píng)論 1 297
  • 那天茄袖,我揣著相機(jī)與錄音,去河邊找鬼嘁锯。 笑死宪祥,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的家乘。 我是一名探鬼主播蝗羊,決...
    沈念sama閱讀 40,032評(píng)論 3 417
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼仁锯!你這毒婦竟也來了耀找?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 38,896評(píng)論 0 274
  • 序言:老撾萬榮一對(duì)情侶失蹤业崖,失蹤者是張志新(化名)和其女友劉穎涯呻,沒想到半個(gè)月后凉驻,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,311評(píng)論 1 310
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡复罐,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,536評(píng)論 2 332
  • 正文 我和宋清朗相戀三年涝登,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片效诅。...
    茶點(diǎn)故事閱讀 39,696評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡胀滚,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出乱投,到底是詐尸還是另有隱情咽笼,我是刑警寧澤,帶...
    沈念sama閱讀 35,413評(píng)論 5 343
  • 正文 年R本政府宣布戚炫,位于F島的核電站剑刑,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏双肤。R本人自食惡果不足惜施掏,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,008評(píng)論 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望茅糜。 院中可真熱鬧七芭,春花似錦、人聲如沸蔑赘。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,659評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽缩赛。三九已至耙箍,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間酥馍,已是汗流浹背究西。 一陣腳步聲響...
    開封第一講書人閱讀 32,815評(píng)論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留物喷,地道東北人卤材。 一個(gè)月前我還...
    沈念sama閱讀 47,698評(píng)論 2 368
  • 正文 我出身青樓,卻偏偏與公主長得像峦失,于是被迫代替她去往敵國和親扇丛。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,592評(píng)論 2 353