jfield Documentation Release 1 Jason Field

Similar documents
Using iscsi On Debian Lenny (Initiator And Target)

o o o o /dev/hdx /dev/sdx fdisk m

파일 : E:\ghcstop\AESOP_ghcstop_doc\usb_gadget\S3C2410_S3C2440_2.6.13_usb_gadget_howto.txt , 2:30:10 오후

List of partition identifiers for Pcs

8/19/2010. Computer Forensics File system forensics. Data analysis. Process of analysing data. Different layers of information.

Xen Live Migration Of An LVM-Based Virtual Machine With iscsi On Debian Lenny

Operating System. Hanyang University. Hyunmin Yoon Operating System Hanyang University

As this method focuses on working with LVM, we will first confirm that our partition type is actually Linux LVM by running the below command.

Cloning and Repartitioning sessionmgr Disks

Getting Started with Pentaho and Cloudera QuickStart VM

Xen Cluster Management With Ganeti On Debian Etch

An introduction to Logical Volume Management

CIS UNIX System Administration

This section describes the procedures needed to add a new disk to a VM. vmkfstools -c 4g /vmfs/volumes/datastore_name/vmname/xxxx.

Changing user login password on templates

Partitioning Disks with parted

Learn Linux, 101: Create partitions and filesystems

Managing Linux File Systems

BT Cloud Compute. Adding a Volume to an existing VM running Linux. The power to build your own cloud solutions to serve your specific business needs

How to add additional disks to XenServer host

How to increase XenServer virtual machine root or swap partition

System Administration. Storage Systems

Back Up (And Restore) LVM Partitions With LVM Snapshots

Adding a block devices and extending file systems in Linux environments

iscsi storage is used as shared storage in Redhat cluster, VMware vsphere, Redhat Enterprise Virtualization Manager, Ovirt, etc.

Author : admin. 1. Getting information about current file system partitions with fdisk and mount

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1

File system manager. Single tool to manage your storage. Red Hat. October 24, 2011

Manage your disk space... for free :)

Red Hat Enterprise Linux 6 Server Instruction Guide for Creating Volume in Free Disk Space

Linux System Administration, level 1. Lecture 4: Partitioning and Filesystems Part II: Tools & Methods

Red Hat Enterprise Linux 8.0 Beta

Red Hat Enterprise Linux 5 Logical Volume Manager Administration. LVM Administrator's Guide Edition 1

MFT / Linux Setup Documentation May 25, 2008

Chapter Two File Systems. CIS 4000 Intro. to Forensic Computing David McDonald, Ph.D.

How To Resize ext3 Partitions Without Losing Data

Linux Howtos. Fedora 9 Install (114) CIS Fall Fedora 9 Install (114) Fedora 9 installation with custom partitions.

4. Specifications and Additional Information

7. Try shrinking / -- what happens? Why? Cannot shrink the volume since we can not umount the / logical volume.

DESS. User Guide. Issue 06 Date HUAWEI TECHNOLOGIES CO., LTD.

Getting Started with BeagleBoard xm

environment) and note down the last "End" sector ( as shown in the below example):

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1

Quota LVM (Logical Volume Manager)

Disks, Filesystems, Booting Todd Kelley CST8177 Todd Kelley 1

CIS-331 Final Exam Spring 2018 Total of 120 Points. Version 1

CIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1

Installing VMware ESXi and vcenter for Cisco RMS

TCSS 422: OPERATING SYSTEMS

CST8207: GNU/Linux Operating Systems I Lab Nine Disks, Partitions, and File Systems Part 2. Disks, Partitions, and File Systems - Part 2 of 2

CIS-331 Exam 2 Spring 2016 Total of 110 Points Version 1

EX200.exam.35q. Number: EX200 Passing Score: 800 Time Limit: 120 min. EX200. Red Hat Certified System Administrator RHCSA

ECHO Process Instrumentation, Inc. Modbus RS485 Module. Operating Instructions. Version 1.0 June 2010

Ubuntu - How to Create Software RAID 1 in Ubuntu Linux - Tutorial

Installing VMware ESXi and vcenter for Cisco RMS

Red Hat Enterprise Linux 8.0 Beta

example.com index.html # vim /etc/httpd/conf/httpd.conf NameVirtualHost :80 <VirtualHost :80> DocumentRoot /var/www/html/

This is sometimes necessary to free up disk space on a volume that cannot have extra disk space easily added.

EX200.redhat

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

File systems and Filesystem quota

Command Line Parameters Linux Check Disk Space Windows 7

Lecture 01: welcome and intro what LSD and Unix have in common

LVM Administrator's Guide. Configuration and Administration 5.2

FORTINET DOCUMENT LIBRARY FORTINET VIDEO GUIDE FORTINET BLOG CUSTOMER SERVICE & SUPPORT FORTIGATE COOKBOOK FORTINET TRAINING SERVICES

Booting, Partitioning and File Systems. Part I. Booting and hard disks. Booting. Table of Contents. Nothing is what it seems.

Week 10 Project 3: An Introduction to File Systems. Classes COP4610 / CGS5765 Florida State University

FILE SYSTEM IMPLEMENTATION. Sunu Wibirama

CST Algonquin College 2

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER

makes floppy bootable o next comes root directory file information ATTRIB command used to modify name

How To Reinstall Grub In Windows 7 With Cd Bootcamp Partition

JSA KVM SUPPORT. Theodore Jencks, CSE Juniper Networks

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1

21/02/2012. BIOS and boot process Storage devices Partitions. CSN08101 Digital Forensics Lecture 5A: PC Boot Sequence and Storage Devices.

Red Hat Enterprise Linux 4 Cluster Logical Volume Manager. LVM Administrator's Guide

I've tried my USB stick on the c64 mini, and again, it does not work, the dir-listing shows "READONLY" again...

NASA Lab. Partition/Filesystem/Bootloader. TinRay, Yu-Chuan

CS370 Operating Systems

What does a file system do?

Project 3: An Introduction to File Systems. COP4610 Florida State University

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

EX200 EX200. Red Hat Certified System Administrator RHCSA

File Systems Forensics

Project 3: An Introduction to File Systems. COP 4610 / CGS 5765 Principles of Operating Systems

GJU IT-forensics course. Storage medium analysis

NCIRC Security Tools NIAPC Submission Summary Encase Enterprise Edition

Windows Method Using Linux Live CD and Gparted

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

EX200.Lead2pass.Exam.24q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator RHCSA. Version 14.0

Implementing Hard Drives

Vendor: RedHat. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator - RHCSA. Version: Demo

WINDISK: A File and disk Editor

The FAT File System. 1. FAT Overview. 2. Boot Sector, FAT, Root Directory, and Files The FAT F 䤀耄 le System

CST8207 GNU/Linux O/S I Disks and Partitions

Open Systems may 26, 2006 Éric Lévénez < UNIX Time-Sharing System Third Edition (V3) february 1973

Ubuntu Manual Disk Partitioning Guide

The NetBSD Logical Volume Manager

Transcription:

jfield Documentation Release 1 Jason Field Oct 25, 2017

Contents 1 linux 3 1.1 LVM................................................... 3 1.1.1 Create.............................................. 3 1.1.2 Extend.............................................. 6 1.1.3 Delete.............................................. 7 i

ii

A useful list of sysadmin and devops tools command and notes for helping out with issues Contents 1

2 Contents

CHAPTER 1 linux stuff about linux LVM Create Partition the drive Create an LVM type partition on the drive: Summary Commands: fdisk /dev/sdb Command (m for help): n Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-41943039, default 2048): <press enter> Last sector, +sectors or +size{k,m,g} (2048-41943039, default 41943039): <press enter, defaults to largest possible> Command (m for help): t Hex code (type L to list all codes): 8e Command (m for help): s Full Commands: [root@centos7 ~]# fdisk /dev/sdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0xfd3bf27d. 3

Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-41943039, default 2048): Using default value 2048 Last sector, +sectors or +size{k,m,g} (2048-41943039, default 41943039): Using default value 41943039 Partition 1 of type Linux and of size 20 GiB is set Command (m for help): p Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0xfd3bf27d Device Boot Start End Blocks Id System /dev/sdb1 2048 41943039 20970496 83 Linux Command (m for help): t Selected partition 1 Hex code (type L to list all codes): L 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris 1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT- 3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT- 2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT- 4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx 5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data 6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS /. 7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility 8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt 9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT f W95 Extd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/ 10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b 11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor 12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor 14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary 16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS 17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE 18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto 1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep 1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT 1e Hidden W95 FAT1 80 Old Minix Hex code (type L to list all codes): 8e Changed type of partition 'Linux' to 'Linux LVM' Command (m for help): p 4 Chapter 1. linux

Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0xfd3bf27d Device Boot Start End Blocks Id System /dev/sdb1 2048 41943039 20970496 8e Linux LVM Command (m for help): s Create the physical Volume :: [root@centos7 ~]# pvcreate /dev/sdb1 Physical volume /dev/sdb1 successfully created Scan to see the differences Scan to see the difference lvmdiskscan: [root@centos7 ~]# lvmdiskscan /dev/centos/swap [ 2.00 GiB] /dev/sda1 [ 500.00 MiB] /dev/centos/root [ 27.51 GiB] /dev/sda2 [ 29.51 GiB] LVM physical volume /dev/sdb1 [ 20.00 GiB] LVM physical volume 2 disks 1 partition 0 LVM physical volume whole disks 2 LVM physical volumes pvdisplay: [root@centos7 ~]# pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name centos PV Size 29.51 GiB / not usable 3.00 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 7554 Free PE 0 Allocated PE 7554 PV UUID JvDOto-KDiF-gtca-TveX-ne9M-frsB-qsP1aJ "/dev/sdb1" is a new physical volume of "20.00 GiB" --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 20.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 1.1. LVM 5

Allocated PE 0 PV UUID rj8wl7-xzin-2qqv-ov7z-lhke-elge-aav29v pvscan: [root@centos7 ~]# pvscan PV /dev/sda2 VG centos lvm2 [29.51 GiB / 0 free] PV /dev/sdb1 lvm2 [20.00 GiB] Total: 2 [49.51 GiB] / in use: 1 [29.51 GiB] / in no VG: 1 [20.00 GiB] Create a volume group Create a volume group: Creates a volume group, you can list multiple disks here: [root@centos7 ~]# vgcreate vg_data /dev/sdb1 Volume group "vg_data" successfully created Create a logical volume Create the volume: [root@centos7 ~]# lvcreate --name data_volume -l 100%FREE vg_data Logical volume "data_volume" created Format the volume Format: I suggest either EXT4 or XFS at the time of writing, bftfs is still in development: mkfs.ext4 /dev/vg_data/data_volume Extend Rescan the disks Issue a rescan: ls /sys/class/scsi_disk/ echo '1' > /sys/class/scsi_disk/0\:0\:0\:0/device/rescan Extend the physical volume Extend:: pvresize /dev/sdb 6 Chapter 1. linux

Extend the logical volume: This will extend it to take all available disk space: lvextend -l +100%FREE /dev/vg_data/data_volume Resize the file system: use the correct one for your volume type, resize2fs is most:: resize2fs /dev/vg_data/data_volume xfs_growfs /dev/vg_data/data_volume Delete Logical Volume Remove the lvm:: lvremove /dev/vg_data/data_volume Volume Group remove the volume group:: vgremove vg_data Physical Volume remove the Physical Volume:: pvremove /dev/sdb1 1.1. LVM 7