Recent Changes - Search:


Code:


Social:


My journals will take the place of a blog. If you go to the Journal page there is an RSS feed to subscribe with.

(:blogcal group=Journal:)


Sites I take responsibility for

West Volusia, Florida

Documents

Technical

General

Me

Living

Places I frequent

Hobbies

Humor

Items for sale:


Clipboard

edit SideBar

Linux HOWTO's - Disks and Volumes

Include our styles below Infobox - invoke as >>infobox<< ... >><<

Codebox: - invoke as >>codebox<< ... >><<

warnbox: - invoke as >>codebox<< ... >><<

editingbox: - invoke as >>codebox<< ... >><<

noticebox: - invoke as >>codebox<< ... >><<

Page bread crumbs: Main - MyPublicTechnicalNotes - SoftwareAndOperatingSystems - Linux - Howtos - DisksAndVolumes

Pages by tags: (:listtags:)
Subscribe to this wiki: RSS Feed RSS or subscribe to this page for changes: RSS Feed RSS
496 articles have been published so far. Recent changes
(:addThis btn="custom":)

2016-03-22: This site is being moved to my main site at https://kevininscoe.com/wiki as part of a consolidation to one domain.


See also Device management under Linux and Linux Logical Volume Manager


Disk partition commands:

Clone a disk partition to another disk:

(:code lang=Bash wrap=80:)

  1. sfdisk -d /dev/olddisk | sfdisk /dev/newdisk

(:codeend:)

To save partition info:

(:code lang=Bash wrap=80:)

  1. sfdisk -d /dev/cciss/c0d0 > some/file

(:codeend:)

To restore:

(:code lang=Bash wrap=80:)

  1. sfdisk /dev/cciss/c0d0 --force < some/file

(:codeend:)


List block devices:

(:code lang=Bash wrap=80:)

  1. lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 15G 0 disk `-xvda1 202:1 0 5.7G 0 part / xvdm 202:192 0 1T 0 disk `-xvdm1 202:193 0 1024G 0 part

  `-oraclevg06-oraclelv06 (dm-1)                253:1     0 1024G  0 lvm  /oracle/exports

xvdk 202:160 0 128G 0 disk |-xvdk1 202:161 0 32G 0 part | |-oraclevg01-oraclelv01_mlog_mimage_0 (dm-20) 253:20 0 4M 0 lvm | | `-oraclevg01-oraclelv01_mlog (dm-22) 253:22 0 4M 0 lvm | | `-oraclevg01-oraclelv01 (dm-25) 253:25 0 31.4G 0 lvm /oracle/network | `-oraclevg01-oraclelv01_mimage_0 (dm-23) 253:23 0 31.4G 0 lvm | `-oraclevg01-oraclelv01 (dm-25) 253:25 0 31.4G 0 lvm /oracle/network |-xvdk2 202:162 0 32G 0 part | |-oraclevg02-oraclelv02_mlog_mimage_0 (dm-14) 253:14 0 4M 0 lvm | | `-oraclevg02-oraclelv02_mlog (dm-16) 253:16 0 4M 0 lvm | | `-oraclevg02-oraclelv02 (dm-19) 253:19 0 31.4G 0 lvm /oracle | `-oraclevg02-oraclelv02_mimage_0 (dm-17) 253:17 0 31.4G 0 lvm | `-oraclevg02-oraclelv02 (dm-19) 253:19 0 31.4G 0 lvm /oracle |-xvdk3 202:163 0 32G 0 part | |-oraclevg04-oraclelv04_mlog_mimage_0 (dm-8) 253:8 0 4M 0 lvm | | `-oraclevg04-oraclelv04_mlog (dm-10) 253:10 0 4M 0 lvm | | `-oraclevg04-oraclelv04 (dm-13) 253:13 0 31.4G 0 lvm /oracle/product | `-oraclevg04-oraclelv04_mimage_0 (dm-11) 253:11 0 31.4G 0 lvm | `-oraclevg04-oraclelv04 (dm-13) 253:13 0 31.4G 0 lvm /oracle/product `-xvdk4 202:164 0 32G 0 part

  |-oraclevg03-oraclelv03_mlog_mimage_0 (dm-2)  253:2     0    4M  0 lvm  
  | `-oraclevg03-oraclelv03_mlog (dm-4)         253:4     0    4M  0 lvm  
  |   `-oraclevg03-oraclelv03 (dm-7)            253:7     0 31.3G  0 lvm  /oracle/admin
  `-oraclevg03-oraclelv03_mimage_0 (dm-5)       253:5     0 31.3G  0 lvm  
    `-oraclevg03-oraclelv03 (dm-7)              253:7     0 31.3G  0 lvm  /oracle/admin

xvdj 202:144 0 128G 0 disk |-xvdj1 202:145 0 32G 0 part | |-oraclevg01-oraclelv01_mlog_mimage_1 (dm-21) 253:21 0 4M 0 lvm | | `-oraclevg01-oraclelv01_mlog (dm-22) 253:22 0 4M 0 lvm | | `-oraclevg01-oraclelv01 (dm-25) 253:25 0 31.4G 0 lvm /oracle/network | `-oraclevg01-oraclelv01_mimage_1 (dm-24) 253:24 0 31.4G 0 lvm | `-oraclevg01-oraclelv01 (dm-25) 253:25 0 31.4G 0 lvm /oracle/network |-xvdj2 202:146 0 32G 0 part | |-oraclevg02-oraclelv02_mlog_mimage_1 (dm-15) 253:15 0 4M 0 lvm | | `-oraclevg02-oraclelv02_mlog (dm-16) 253:16 0 4M 0 lvm | | `-oraclevg02-oraclelv02 (dm-19) 253:19 0 31.4G 0 lvm /oracle | `-oraclevg02-oraclelv02_mimage_1 (dm-18) 253:18 0 31.4G 0 lvm | `-oraclevg02-oraclelv02 (dm-19) 253:19 0 31.4G 0 lvm /oracle |-xvdj3 202:147 0 32G 0 part | |-oraclevg04-oraclelv04_mlog_mimage_1 (dm-9) 253:9 0 4M 0 lvm | | `-oraclevg04-oraclelv04_mlog (dm-10) 253:10 0 4M 0 lvm | | `-oraclevg04-oraclelv04 (dm-13) 253:13 0 31.4G 0 lvm /oracle/product | `-oraclevg04-oraclelv04_mimage_1 (dm-12) 253:12 0 31.4G 0 lvm | `-oraclevg04-oraclelv04 (dm-13) 253:13 0 31.4G 0 lvm /oracle/product `-xvdj4 202:148 0 32G 0 part

  |-oraclevg03-oraclelv03_mlog_mimage_1 (dm-3)  253:3     0    4M  0 lvm  
  | `-oraclevg03-oraclelv03_mlog (dm-4)         253:4     0    4M  0 lvm  
  |   `-oraclevg03-oraclelv03 (dm-7)            253:7     0 31.3G  0 lvm  /oracle/admin
  `-oraclevg03-oraclelv03_mimage_1 (dm-6)       253:6     0 31.3G  0 lvm  
    `-oraclevg03-oraclelv03 (dm-7)              253:7     0 31.3G  0 lvm  /oracle/admin

xvdh 202:112 0 32G 0 disk xvdg 202:96 0 1T 0 disk xvdi 202:128 0 32G 0 disk `-xvdi1 202:129 0 32G 0 part

  `-oraclevg05-oraclelv05 (dm-26)               253:26    0   32G  0 lvm  /oracle/media

xvdf 202:80 0 1T 0 disk xvdt 202:4864 0 1T 0 disk xvds 202:4608 0 1T 0 disk xvdr 202:4352 0 512G 0 disk `-xvdr1 202:4353 0 512G 0 part

  `-oraclevg08-oraclelv08 (dm-27)               253:27    0    2T  0 lvm  /oracle/backups

xvdq 202:4096 0 512G 0 disk `-xvdq1 202:4097 0 512G 0 part

  `-oraclevg08-oraclelv08 (dm-27)               253:27    0    2T  0 lvm  /oracle/backups

xvdp 202:240 0 512G 0 disk `-xvdp1 202:241 0 512G 0 part

  `-oraclevg08-oraclelv08 (dm-27)               253:27    0    2T  0 lvm  /oracle/backups

xvdo 202:224 0 512G 0 disk `-xvdo1 202:225 0 512G 0 part

  `-oraclevg08-oraclelv08 (dm-27)               253:27    0    2T  0 lvm  /oracle/backups

xvdn 202:208 0 1T 0 disk `-xvdn1 202:209 0 1024G 0 part

  `-oraclevg07-oraclelv07 (dm-0)                253:0     0 1024G  0 lvm  /oracle/arch

xvdw 202:5632 0 1T 0 disk xvdv 202:5376 0 1T 0 disk xvdu 202:5120 0 128G 0 disk xvdl 202:176 0 32G 0 disk (:codeend:)


Determining what's on a volume or block device:

(:code lang=Bash wrap=80:)

  1. blkid /dev/xvda1

/dev/xvda1: LABEL="_/" UUID="fafac3bd-e748-4dee-b0b3-66590ee717e2" TYPE="ext4"

  1. blkid /dev/mapper/oraclevg08-oraclelv08

/dev/mapper/oraclevg08-oraclelv08: LABEL="/oracle/backups" UUID="958002bb-058e-4942-bf95-601f70be47de" TYPE="ext3" (:codeend:)


Kevin's Public Wiki maintained and created by Kevin P. Inscoe is licensed under a
Creative Commons Attribution 3.0 United States License.

Back to my web site - http://kevininscoe.com

Edit - History - Print - Recent Changes - Search
Page last modified on May 08, 2014, at 11:45 AM EST