忍者ブログ

◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例

   

【PowerShell】ローカルアカウント作成スクリプト

ローカルアカウント作成するスクリプトのサンプル作ってみました。
※パワーシェルを実行する為には色々な条件が必要な為、実際に上記スクリプトを実行する際には環境を整えてから実行してください。

ファイル名:A.ps1
# //変数格納//
  $computer = $Env:ComputerName
  $cdpath = (Get-Location).Path
# //text⇒CSV変換//
  $csv = import-csv -path $cdpath\A.txt

# //テキスト情報の読込み//
 foreach($strUser in $csv)
{
# //情報取得//
    $user = $struser.user
    $password = $struser.password
    $description =  $struser.description
    $group = $struser.group
# //初期化//
    Clear-Host

# //ユーザー作成//
    $ObjOU = [ADSI]"WinNT://$computer"
    $objUser = $objOU.Create("User", $user)
    $objUser.setpassword($password)
    $objUser.put("description",$description)
    $objUser.UserFlags = 0x10000 #パスワードを無期限に設定
    $objUser.SetInfo()
# //グループ設定//
    $objGroup = [ADSI]"WinNT://$computer/$group"
    $objGroup.add("WinNT://$computer/$user")
    $objGroup.SetInfo()
}

PR

【PowerShell】読み込ませるテキストデータ

テストデータのサンプル作ってみました。
※文字コードは、Unicodeでテキストを保存する or 変換しておかないと文字化けするのに注意

ファイル名:A.txt
user,password,description,group
Test01,Password01,"説明文01",administrators
Test02,Password01,"説明文02",administrators

【リモート接続先でXWindow起動】gnome-control-center

サーバ側のランレベル3であっても以下の方法でリモートからGUI操作が可能です。

【クライアント側の設定】
①Windowsマシンに以下のアプリをインストールして設定する。
 ・TeraTerm
 (SSH転送「リモートの(X)アプリケーションをローカルのXサーバに表示する」にチェック)
 ・Xming
 (接続先の設定しておく)

②SSH接続する。(rootに移行)

③GUIアプリの起動コマンド実行する。
 例えば、gnomeの設定画面を開く場合
 [root@Cent ~]# gnome-control-center &

 === === === === === === === === === === === === === === ===
【サーバ側の設定】
 ・XWindowが使用可能であること
 ・SSH接続出来ること
 === === === === === === === === === === === === === === ===
※前提条件としてサーバ側の設定を済ませておくこと。

【LPIC 117-301 合格】

【報告】
 2011/12/28(水)
 301取得だぜ☆
 
【得点】
 630点
 
【感想】
 何これ?日本語の問題?状態だった。

【その他】
 302を目指す予定

【試験に役立つアドバイス】
 茶本・黒本・赤本、全て読もう!

【LPIC 117-202 合格】

【報告】
 2011/4/2(土)
202試験に合格したッス。

【得点】
 530点


【感想】
 ぶっちゃけ何故合格できたか分からない
…と思う程に運が良かった。

【その他】
 次の前に暫く休憩予定(暇つぶしに読書とか)

【試験に役立つアドバイス】
 茶本は基本だから読んでおくことが前提条件ですが
それ以上の知識を求めないと試験では通用しないと思います。
※amazonの評価を参考に多くの本を見つけて読むことを推奨します。

【LPIC 117-201 合格】

【報告】
 2011/1/28(金) 
 201試験に合格しました☆(ヤッホー) 

【得点】
 590点 

【感想】
 運と勘を頼りに頑張ってみたら何とかなりました。 

【その他】
 次は202試験だな・・・(遠い目) 

【試験に役立つアドバイス】
 やっぱり茶本は基本なので、絶対読むことが大事です。 
 (ただし、基本なので応用力は実力でカバーしてくだしぁ) 

【DNS】名前解決確認

[root@sentos5 ~]# nslookup www.lpi.or.jp
Server:         192.168.0.1
Address:        192.168.0.1#53
Non-authoritative answer:
Name:   www.lpi.or.jp
Address: 202.218.212.222

[root@sentos5 ~]# nslookup
> server 192.168.0.1
Default server: 192.168.0.1
Address: 192.168.0.1#53
> www.isc.org
Server:         192.168.0.1
Address:        192.168.0.1#53

Non-authoritative answer:
Name:   www.isc.org
Address: 149.20.64.42
>
exit

[root@sentos5 ~]# host sv1.lpi.jp
sv1.lpi.jp has address 203.174.74.34

[root@sentos5 ~]# host 203.174.74.34
34.74.174.203.in-addr.arpa domain name pointer sv1.lpi.jp.

[root@sentos5 ~]# host -t mx lpi.org
lpi.org mail is handled by 10 mail.lpi.org.

[root@sentos5 ~]# host -t ns lpi.org
lpi.org name server server1.moongroup.com.
lpi.org name server ns.starnix.com.

[root@sentos5 ~]# host www.lpi.org 172.17.0.1
Using domain server:
Name: 192.168.0.1
Address: 192.168.0.1#53
Aliases:
www.lpi.org has address 24.215.7.162

[root@sentos5 ~]# dig lpi.org mx
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> lpi.org mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63305
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;lpi.org.                       IN      MX
;; ANSWER SECTION:
lpi.org.                3600    IN      MX      10 mail.lpi.org.
;; AUTHORITY SECTION:
lpi.org.                3600    IN      NS      server1.moongroup.com.
lpi.org.                3600    IN      NS      ns.starnix.com.
;; ADDITIONAL SECTION:
mail.lpi.org.           3600    IN      A       24.215.7.168
ns.starnix.com.         3600    IN      A       24.215.7.99
;; Query time: 1870 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Mon Jan 10 16:30:53 2011
;; MSG SIZE  rcvd: 138

[root@sentos5 ~]# cat /etc/named.rfc1912.zones
zone "." IN {
        type hint;
        file "named.ca";
};
zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};
zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};
zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};
zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

[root@sentos5 named]# cat /etc/named.caching-nameserver.conf
options {
        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; };
        allow-query-cache { localhost; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};

[root@sentos5 etc]# dig @m.root-servers.net ns > /var/named/named.ca

[root@sentos5 etc]# cat /var/named/named.ca
;; ANSWER SECTION:
.                       518400  IN      NS      m.root-servers.net.
.                       518400  IN      NS      c.root-servers.net.
;; ADDITIONAL SECTION:
b.root-servers.net.     3600000 IN      A       192.228.79.201
c.root-servers.net.     3600000 IN      A       192.33.4.12

[root@sentos5 etc]# rndc status
number of zones: 6
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running

[root@sentos5 etc]# cat /var/named/named.local
$TTL    86400
@       IN      SOA     localhost. root.localhost.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      localhost.
1       IN      PTR     localhost.

[root@sentos5 etc]# dig @localhost version.bind chaos txt
;; ANSWER SECTION:
version.bind.           0       CH      TXT     "9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2"

[root@sentos5 etc]# ps -f -C named
UID        PID  PPID  C STIME TTY          TIME CMD
named     2495     1  0 15:26 ?        00:00:00 /usr/sbin/named -u named -t /var/named/chroot

[root@sentos5 etc]# dnssec-keygen -a RSA -b 1024 -n ZONE example.net.
[root@sentos5 etc]# dnssec-keygen -a RSA -b 4096 -n ZONE example.net.
[root@sentos5 etc]# dnssec-signzone -k Kexample.net.+005+28778.key example.net

[root@sentos5 etc]# dig +dnssec @localhost smtp.exaple.com
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> +dnssec @localhost smtp.exaple.com

【システムメンテナンス】

[root@A]# tar -cvzf software.tar.gz software
software

[root@A]# tar -cvjf software.tar.bz2 software
software

[root@A]# gzip -dc software.tar.gz | tar xvf -
software

[root@A]# bzip2 -dc software.tar.bz2 | tar xvf -
software

/// Makefile作成~コンパイル~インストールの手順 ///
[user@A]# ./configure
[user@A]# make
[user@A]$ su
パスワード:
[root@sentos5 user]#make install
/// Makefile作成~コンパイル~インストールの手順 ///

[root@A]# ls -ld /usr/local/bin
drwxr-xr-x 2 root root 4096  3月 10  2009 /usr/local/bin

[root@A]# ls -ld /usr/local/sbin
drwxr-xr-x 2 root root 4096  3月 10  2009 /usr/local/sbin

/// バックアップ予備知識 ///
完全「full
差分「incremental
増分「differential
/// バックアップ予備知識 ///

/// バックアップ媒体 ///
追記不可:「DVD-R,DVD-R DL
追記可能:「DVD-RW,DVD-RAM,DVD+R,DVD+R DL,DVD+RW
容量:4.7~8.54GB
DDS4」 40GB
DLT-320」 320GB
LTO」 800GB
/// バックアップ媒体 ///

/// バックアップ方法 ///
AMANDA,Bacura」ネットワーク経由バックアップツール
NAS」でネットワーク接続バックアップ
SAN」ファイバーチャネルのストレージ専用ネットワーク
tar,cpio,dd,dump,restore」バックアップコマンド
/// バックアップ方法 ///

[root@A]# tar cjvf /tmp/home.tar.bz2 /home/user
tar: メンバ名から先頭の `/' を取り除きます
/home/user/
/home/user/.gnome/

[root@A]# tar tjf /tmp/home.tar.bz2
home/user/
home/user/.gnome/

[root@A]# tar vjf /tmp/home.tar.bz2 --delete readtest.sh
アボートしました

[root@sentos5 /]# tar xjf /tmp/home.tar.bz2

[root@sentos5 /]# tar xvf /dev/st0 var/log/secure

[root@sentos5 testuser]# ls | cpio -o > /tmp/backup
1 block

[root@sentos5 testuser]# dd if=/dev/sr0 /of=/tmp/cdrom.iso

[root@sentos5 testuser]# dump 0uf /dev/nst0 /dev/sda2
  DUMP: Date of this level 0 dump: Sat Jan  8 17:13:14 2011
  DUMP: Dumping /dev/sda2 (an unlisted file system) to /dev/nst0
/dev/sda2: Bad magic number in super-block while opening filesystem
  DUMP: The ENTIRE dump is aborted.

[root@sentos5 testuser]# cat /etc/dumpdates
/dev/mapper/VolGroup00-LogVol02 0 Wed Jun  2 00:50:26 2010 +0900

[root@sentos5 testuser]# restore rf /dev/st0

[root@sentos5 testuser]# rsync -auv --delete dir /backup
building file list ... rsync: link_stat "/root/home/testuser/dir" failed: No such file or directory (2)
done
sent 29 bytes  received 20 bytes  98.00 bytes/sec
total size is 0  speedup is 0.00

  

【ネットワーク】

[root@A]# dmesg | grep eth
eth0: registered as PCnet/PCI II 79C970A
eth0: link up
eth0: no IPv6 routers present

[root@A]# lspci
02:01.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)

[root@A]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:C9:99:4C
          inet addr:192.168.0.55  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fec9:994c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3702 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2489 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:360938 (352.4 KiB)  TX bytes:301017 (293.9 KiB)
          Interrupt:75 Base address:0x2000

[root@A]# ifconfig eth0:0 192.168.0.56 netmask 255.255.255.0 up

[root@A]# ifconfig eth0:0
eth0:0    Link encap:Ethernet  HWaddr 00:0C:29:C9:99:4C
          inet addr:192.168.0.56  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:75 Base address:0x2000

[root@A]# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.0.21             ether   E0:CB:4E:11:FC:EC   C                     eth0
buffalo.setup            ether   00:0D:0B:B6:0A:B6   C                     eth0

[root@A]# arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.0.21             ether   E0:CB:4E:11:FC:EC   C                     eth0
192.168.0.1              ether   00:0D:0B:B6:0A:B6   C                     eth0

[root@A]# traceroute sentos5
traceroute to sentos5 (127.0.0.1), 30 hops max, 40 byte packets
 1  sentos5.localdomain (127.0.0.1)  0.019 ms  0.011 ms  0.009 ms

[root@A]# traceroute -n sentos5
traceroute to sentos5 (127.0.0.1), 30 hops max, 40 byte packets
 1  127.0.0.1  0.018 ms  0.009 ms  0.013 ms

[root@A]# tcpdump -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
22:50:53.721877 IP 192.168.0.55.ssh > 192.168.0.21.52146: P 2187861119:2187861235(116) ack 2768986704 win 7504
22:50:53.722047 IP 192.168.0.55.ssh > 192.168.0.21.52146: P 116:232(116) ack 1 win 7504

[root@A]# tcpdump -nli eth0 port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
22:52:56.040693 IP 192.168.0.21.53094 > 192.168.0.1.domain:  17340+ A? www.nicovideo.jp. (34)
22:52:56.073466 IP 192.168.0.1.domain > 192.168.0.21.53094:  17340 1/2/1 A 202.248.110.243 (116)

[root@A]# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 sentos5.localdomain:2208    *:*                         LISTEN
tcp        0      0 *:nfs                       *:*                         LISTEN

[root@A]# netstat -i
Kernel Interface table
Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0     8091      0      0      0     8978      0      0      0 BMRU
lo        16436   0     3180      0      0      0     3180      0      0      0 LRU

[root@A]# netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.0.0     buffalo.setup   255.255.255.0   UG        0 0          0 eth0
192.168.0.0     *               255.255.255.0   U         0 0          0 eth0
default         buffalo.setup   0.0.0.0         UG        0 0          0 eth0

[root@A]# nc 192.168.0.55 25
220 sentos5.localdomain ESMTP Postfix

[root@A]# nc -vz 192.168.0.55 1-1000
nc: connect to 192.168.0.55 port 1 (tcp) failed: Connection refused
nc: connect to 192.168.0.55 port 2 (tcp) failed: Connection refused

[root@A]# nc -vzu 192.168.0.55 1-1000
Connection to 192.168.0.55 111 port [udp/sunrpc] succeeded!
Connection to 192.168.0.55 161 port [udp/snmp] succeeded!

[root@A]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0

[root@A]# route add default gw 192.168.0.1

[root@A]# route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1

[root@A]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     buffalo.setup   255.255.255.0   UG    0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
default         buffalo.setup   0.0.0.0         UG    0      0        0 eth0

[root@A]# ip route show
192.168.0.0/24 via 192.168.0.1 dev eth0
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.55
default via 192.168.0.1 dev eth0

[root@A]# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.
sit0      no wireless extensions.

[root@A]# iwconfig wlan0
wlan0     No such device

[root@A]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               sentos5.localdomain sentos5 localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6

[root@A]# cat /etc/nsswitch.conf
passwd:     files ldap
shadow:     files ldap
group:      files ldap
hosts:      files ldap dns

[root@A]# cat /etc/resolv.conf
nameserver 192.168.0.1

[root@A]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=sentos5.localdomain

[root@A]# ls -l /etc/sysconfig/network-scripts/*
-rw-r--r-- 3 root root   193    羌  2010 /etc/sysconfig/network-scripts/ifcfg-eth0

[root@A]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:0c:29:c9:99:4c
NETMASK=255.255.255.0
IPADDR=192.168.0.55
GATEWAY=192.168.0.1
TYPE=Ethernet

[root@A]# cat /etc/hosts.allow

[root@A]# cat /etc/hosts.deny

[root@A]# tracepath 192.168.0.55
 1:  192.168.0.55 (192.168.0.55)                            0.079ms pmtu 16436
 1:  192.168.0.55 (192.168.0.55)                            0.021ms reached
     Resume: pmtu 16436 hops 1 back 1

[root@A]# cat /etc/issue
CentOS release 5.3 (Final)
Kernel \r on an \m

[root@A]# cat /etc/issue.net
CentOS release 5.3 (Final)
Kernel \r on an \m

[root@A]# cat /etc/motd

[root@A]# wall "Test Message !"
Broadcast message from root (pts/2) (Wed Jan  5 23:28:43 2011):
Test Message !

[root@A]# shutdown -k now "Test Message!!!"
Broadcast message from root (pts/2) (Wed Jan  5 23:29:23 2011):
Test Message!!!
The system is going down to maintenance mode NOW!
Shutdown cancelled.

 

【ストレージ】

[root@A]# fdisk -l /dev/sda
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = シリンダ数 of 16065 * 512 = 8225280 bytes
デバイス Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1044     8281507+  8e  Linux LVM

[root@A]# cat /proc/mdstat
Personalities :
unused devices: <none>

[root@A]# lvscan
  /dev/cdrom: read failed after 0 of 2048 at 0: 入力/出力エラーです
  ACTIVE            '/dev/VolGroup00/LogVol00' [4.00 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol03' [1.00 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol02' [1.00 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol01' [1.00 GB] inherit

[root@A]# df -T
Filesystem    Type   1K-ブロック    使用   使用可 使用% マウント位置
/dev/mapper/VolGroup00-LogVol00
              ext3     4062912   3460740    392460  90% /
/dev/mapper/VolGroup00-LogVol03
              ext3     1015704     88808    874468  10% /tmp
/dev/mapper/VolGroup00-LogVol02
              ext3     1015704    274912    688364  29% /var
/dev/sda1     ext3      101086     12074     83793  13% /boot
tmpfs        tmpfs      257720         0    257720   0% /dev/shm
/dev/mapper/VolGroup00-LogVol02
              ext3     1015704    274912    688364  29% /mnt

[root@A]# ls -l /dev/mapper/VolGroup00-LogVol0*
brw-rw---- 1 root disk 253, 0  1月  5 21:15 /dev/mapper/VolGroup00-LogVol00
brw-rw---- 1 root disk 253, 3  1月  5 21:15 /dev/mapper/VolGroup00-LogVol01
brw-rw---- 1 root disk 253, 2  1月  5 21:15 /dev/mapper/VolGroup00-LogVol02
brw-rw---- 1 root disk 253, 1  1月  5 21:15 /dev/mapper/VolGroup00-LogVol03

[root@A]# pvdisplay /dev/sda2
  /dev/cdrom: read failed after 0 of 2048 at 0: 入力/出力エラーです
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               7.90 GB / not usable 23.41 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              252
  Free PE               28
  Allocated PE          224
  PV UUID               NZOvJm-9UF6-sXaW-y1Fd-1pJ0-fpzW-OVk750

[root@A]# pvscan
  /dev/cdrom: open failed: 読み込み専用ファイルシステムです
  Attempt to close device '/dev/cdrom' which is not open.
  PV /dev/sda2   VG VolGroup00   lvm2 [7.88 GB / 896.00 MB free]
  Total: 1 [7.88 GB] / in use: 1 [7.88 GB] / in no VG: 0 [0   ]

[root@A]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               4
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               7.88 GB
  PE Size               32.00 MB
  Total PE              252
  Alloc PE / Size       224 / 7.00 GB
  Free  PE / Size       28 / 896.00 MB
  VG UUID               V9Kj8z-YYNg-1nxg-WqfE-0c9v-kDrM-HlQ2Rs

[root@A]# lvdisplay /dev/VolGroup00/LogVol02
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol02
  VG Name                VolGroup00
  LV UUID                JTByn9-eKq8-61Kj-f8Y0-aggW-gX1x-fo4XQa
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.00 GB
  Current LE             32
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

[root@A]# pvs
  PV         VG         Fmt  Attr PSize PFree
  /dev/sda2  VolGroup00 lvm2 a-   7.88G 896.00M

[root@A]# vgs
  VG         #PV #LV #SN Attr   VSize VFree
  VolGroup00   1   4   0 wz--n- 7.88G 896.00M

[root@A]# lvs
  LV       VG         Attr   LSize Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 4.00G
  LogVol01 VolGroup00 -wi-ao 1.00G
  LogVol02 VolGroup00 -wi-ao 1.00G
  LogVol03 VolGroup00 -wi-ao 1.00G

[root@A]# hdparm /dev/sda
/dev/sda:
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 1044/255/63, sectors = 16777216, start = 0

[root@A]# hdparm -tT /dev/sda
/dev/sda:
 Timing cached reads:   30276 MB in  2.00 seconds = 15175.83 MB/sec
 Timing buffered disk reads:   74 MB in  3.09 seconds =  23.98 MB/sec

更新日付

02 2026/03 04
S M T W T F S
1 3 4 5 6 7
8 9 10 11 12 13 14
16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

RECOMMEND

プロフィール

HN:
Account
HP:
性別:
非公開
職業:
--- NODATA ---
趣味:
--- NODATA ---
自己紹介:
◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

リンク

<<前のページ  | HOME |  次のページ>>
Copyright ©  -- LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例 --  All Rights Reserved
Design by CriCri / Photo by Melonenmann / powered by NINJA TOOLS / 忍者ブログ / [PR]