博文

目前显示的是 十二月, 2019的博文

Linux文件系统管理

认识EXT2文件系统        Linux文件系统将权限与属性放置在inode中,实际数据放置在data block中,另外,还有一个超级块(superblock)记录整个文件系统的整体信息,包括inode与block的总量、使用量、剩余量等。         每个inode与block都有编号,这三个数据的意义如下: super block:记录此文件系统的整体信息,包括inode/block的总量、使用量、剩余量,以及文件系统的格式与相关信息等; inode:记录文件的属性, 一个文件占用一个inode ,同时记录此文件的数据所在的block的号码; block:实际记录文件的内容,若文件太大,会占用多个block。         inode的特色: 每个inode大小均为128bytes; 每个文件都会占用一个inode而已; 承上,因此文件系统能够创建的文件数量与inode有关; 系统读取文件时需要先找到inode,并分析inode所记录的权限与用户是否符合,若符合才能够实际开始读取block的内容。       The inode is a data structure on a filesystem on Linux and other Unix-like systems.  Inode stores all the information about a file except its name and its actual data.       What happens if inode full?       Error: No space left on device.        Not able to restart any service or process.              How to check inode usage?   ...

你一定要了解的维基百科的几件事

1.1维基百科跟百度百科的根本差别是什么? 维基百科是 百科全书 ,百度百科仅仅是 知识库 。浅显来讲,前者对内容收录标准严格,条目收录也有门槛限制;后者则几乎不加甄别,如垃圾场一般把知识堆在那里。 1.2中文维基百科需要大家怎样的参与? 四个字, 参与编辑 。不用说大家都懂,百度百科的活跃编者数量比维基百科的多。想要看到更多更高质量的条目,就要更多的人参与编辑。大家知道英文维基百科的质量、全面程度。如果中午维基百科继续维持现在的发展速度,需要70年才能达到英文的程度,你希望等那么久吗? 1.3维基百科的内容真实可靠吗?如果不是,那么维基百科的口碑从哪里来的? 官方回应, 不保证 真实可靠。什么意思呢?就是有的可靠,有的不可靠,需要你自己鉴别。为什么维基百科会有好的口碑呢?首先,好口碑是对比出来的。其次,维基百科能够有良好的形象是因为我们 对参考来源、版权以至格式都要求严格 。我们自己参与编辑的时候也要遵守这些守则。

RAID

图片
1、RAID0(STRIPING) Not fault tolerant. Data is 'striped' across multiple disks. Advantage is speed. 2、RAID1(MIRRORING & DUPLEXING) Is fault tolerant. Data is copied on more than 1 disk. 3、RAID5(STRIPING WITH PARITY) Requires 3 or more disks. Data is 'striped' across multiple disks along with parity. The equivalent of an entire disk is used to store parity. Examples: An array of 4 disks totaling 4 terabytes, only 3 terabytes will be used for actual data storage. RAID5具有和RAID0相似的数据读取速度;因为多了一个奇偶校验信息,写入数据的速度相对单独写入一块硬盘的速度略慢;RAID5的磁盘空间利用率比RAID1要高。 4、RAID10 Combines RAID1 with RAID0. Benefits from the fault tolerance of RAID 1 and the speed of RAID 0. Can only use 50% for data storage. 

爱德数智运维面试题

一、下面有 A 和 B 两个表,写出 SQL 的结果。 表 A id Name 1 ken 2 min 3 steven 表 B id Age 1 20 3 21 4 30 (1) select A.Name,B.Age from A join B on A.id = B.id (2) select A.Name,B.Age from A left join B on A.id = B.id (3) select A.Name,B.Age from A right join B on A.id = B.id 参考答案: ( 1 ) Name Age ken 20 steven 21 ( 2 ) Name Age ken 20 steven 21 min ( 3 ) Name Age ken 20 steven 21 30 二、怎么把日期 2013-08-15 11:46:21.000 转为 2013-08-15 ? 三、 union 和 union all 的区别是什么? 参考答案: 都相当于求并集, union all 为 union 的一种形式。 union 在使用时,重复的行被自动取消; union all 在使用时,不取消重复的行。 四、有一表 T1 如下: id Name ...

玩瞳科技运维面试题(部分)

图片
问题九: 随意写文件命令?怎么向屏幕输出带空格的字符串,比如“hello world”? vi [root@vultr ~]# echo "hello world" hello world 问题十七: Linux中进程有哪几种状态?在ps显示出来的信息中,分别用什么符号表示? [引自维基百科] Process states [ edit source ] Main article:  Process state The various process states, displayed in a  state diagram , with arrows indicating possible transitions between states. An operating system  kernel  that allows multitasking needs processes to have  certain states . Names for these states are not standardized, but they have similar functionality. First, the process is " created " by being loaded from a  secondary storage  device ( hard disk drive ,  CD-ROM , etc.) into  main memory . After that, the  process scheduler  assigns it to the "waiting" state. While the process is " waiting ", it waits for the  scheduler  to do a so-called  context switch  and load the process into the processor. The process state then becomes " running ", ...