[ale] LVM: fumble fingered idiot problem
Dow Hurst
dphurst at uncg.edu
Fri Sep 7 17:52:54 EDT 2012
This is the answer to my problem.
http://ubuntuforums.org/showthread.php?t=1533937
Sincerely,
Dow
________________________________________________
Dow Hurst, Research Scientist
340 Sullivan Science Bldg., Dept. of Chem. and Biochem.
University of North Carolina at Greensboro
PO Box 26170 Greensboro, NC 27402-6170
On Fri, Sep 7, 2012 at 1:21 PM, Dow Hurst <dphurst at uncg.edu> wrote:
> Matt,
> You've had to deal with LVM a lot more than I have so I'm asking for some
> thoughts. I plugged up an external USB drive to the fileserver to create a
> partition table, format, and copy data over on to the USB drive. Well, I
> looked at /proc/partitions and ran fdisk on /dev/sda instead of the right
> device, /dev/sdd. I created a DOS partition table, created a single
> primary partition, synced and exited fdisk. Then, I realized that /dev/sdd
> was the right device and it already had partitions and data. Great. So,
> I'm trying to figure out what the hell I just did to the file server. It's
> still up and running but a reboot would probably be disastrous. Anyway I
> have several pieces of data below relating to the devices, partitions, and
> lvm data. I may have wiped out the system lvm data off of /dev/sda. The
> fs1 volume shows but the system volume doesn't. Does that make sense? Is
> there a way to rewrite the lvm data? Just remember that /dev/sda didn't
> have any partition table or partition, as shown below, before this moment.
> I also think that the devices dm-0, sda, and lvm system are the same
> filesystem/devices that make up the /home where all the critical data is.
> Sure, I have backups of the most important user directories using bacula,
> but not a mirror copy of everything as is. I have archived copies of older
> data that would make up the difference, but what a stupid pain to have
> committed. I'm wondering if this can be like grub, where reinstalling the
> master boot record doesn't harm the system. How do you rewrite the lvm
> data without wiping out the mounted filesystem?
>
> Ubuntu 8.04
>
> //fs1> show
>
> Ctl Model (V)Ports Drives Units NotOpt RRate VRate BBU
> ------------------------------------------------------------------------
> c0 9550SXU-8LP 8 8 3 0 1 3 -
> //fs1> /c0 show
>
> Unit UnitType Status %RCmpl %V/I/M Stripe Size(GB) Cache
> AVrfy
>
> ------------------------------------------------------------------------------
> u0 RAID-5 VERIFY-PAUSED - 0 64K 1862.61 ON ON
>
> u1 SINGLE VERIFY-PAUSED - 0 - 465.651 ON ON
>
> u2 RAID-1 VERIFY-PAUSED - 0 - 232.82 ON ON
>
>
> Port Status Unit Size Blocks Serial
> ---------------------------------------------------------------
> p0 OK u0 465.76 GB 976773168 WD-WCANU1733818
>
> p1 OK u0 465.76 GB 976773168 WD-WCANU1733754
>
> p2 OK u0 465.76 GB 976773168 WD-WCANU1735394
>
> p3 OK u0 465.76 GB 976773168 WD-WCANU1888007
>
> p4 OK u0 465.76 GB 976773168 WD-WCANU1735961
>
> p5 VERIFYING u1 465.76 GB 976773168 WD-WCANU1731650
>
> p6 OK u2 233.76 GB 490234752 WD-WCANY2372724
>
> p7 OK u2 233.76 GB 490234752 WD-WCANY2774785
>
> root at fs1:/etc/lvm/backup# cat /proc/partitions
> major minor #blocks name
>
> 8 0 1953083392 sda
> 8 1 1953078246 sda1
> 8 16 488270848 sdb
> 8 32 244129792 sdc
> 8 33 248976 sdc1
> 8 34 1 sdc2
> 8 37 243874701 sdc5
> 254 0 1932738560 dm-0
> 254 1 240799744 dm-1
> 254 2 3072000 dm-2
> 8 48 488386584 sdd
> 8 49 488384001 sdd1
>
> root at fs1:/etc/lvm/backup# df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/mapper/fs1-root 228G 17G 201G 8% /
> varrun 501M 84K 501M 1% /var/run
> varlock 501M 0 501M 0% /var/lock
> udev 501M 68K 501M 1% /dev
> devshm 501M 0 501M 0% /dev/shm
> /dev/sdc1 236M 26M 198M 12% /boot
> /dev/mapper/system-home
> 1.8T 1.7T 71G 96% /home
> /dev/sdd1 459G 18G 418G 5% /mnt
>
> root at fs1:/etc/lvm/backup# pvdisplay
> --- Physical volume ---
> PV Name /dev/sdc5
> VG Name fs1
> PV Size 232.58 GB / not usable 2.89 MB
> Allocatable yes (but full)
> PE Size (KByte) 4096
> Total PE 59539
> Free PE 0
> Allocated PE 59539
> PV UUID PjgniS-zP39-TvRu-EabS-wv1Q-Un5g-ROMg6c
>
>
> root at fs1:~/tw# pvdisplay -m
> --- Physical volume ---
> PV Name /dev/sdc5
> VG Name fs1
> PV Size 232.58 GB / not usable 2.89 MB
> Allocatable yes (but full)
> PE Size (KByte) 4096
> Total PE 59539
> Free PE 0
> Allocated PE 59539
> PV UUID PjgniS-zP39-TvRu-EabS-wv1Q-Un5g-ROMg6c
>
> --- Physical Segments ---
> Physical extent 0 to 58788:
> Logical volume /dev/fs1/root
> Logical extents 0 to 58788
> Physical extent 58789 to 59538:
> Logical volume /dev/fs1/swap_1
> Logical extents 0 to 749
>
>
> root at fs1:/etc/lvm/backup# cat fs1
> # Generated by LVM2: Tue Mar 29 17:45:03 2011
>
> contents = "Text Format Volume Group"
> version = 1
>
> description = "Created *after* executing '/sbin/vgcfgbackup'"
>
> creation_host = "fs1" # Linux fs1 2.6.24-19-server #1 SMP Wed Aug 20
> 18:43:06 UTC 2008 x86_64
> creation_time = 1301435103 # Tue Mar 29 17:45:03 2011
>
> fs1 {
> id = "7uN1mJ-igIG-pPaN-bpGX-bux9-uDzG-4FnyA9"
> seqno = 3
> status = ["RESIZEABLE", "READ", "WRITE"]
> extent_size = 8192 # 4 Megabytes
> max_lv = 0
> max_pv = 0
>
> physical_volumes {
>
> pv0 {
> id = "PjgniS-zP39-TvRu-EabS-wv1Q-Un5g-ROMg6c"
> device = "/dev/sdc5" # Hint only
>
> status = ["ALLOCATABLE"]
> dev_size = 487749402 # 232.577 Gigabytes
> pe_start = 384
> pe_count = 59539 # 232.574 Gigabytes
> }
> }
>
> logical_volumes {
>
> root {
> id = "cIME9h-qhSB-HupF-KWVM-osd6-gVjA-xoHrQb"
> status = ["READ", "WRITE", "VISIBLE"]
> segment_count = 1
>
> segment1 {
> start_extent = 0
> extent_count = 58789 # 229.645 Gigabytes
>
> type = "striped"
> stripe_count = 1 # linear
>
> stripes = [
> "pv0", 0
> ]
> }
> }
>
> swap_1 {
> id = "Gd7qqR-ns4G-NaKW-ys57-vdXs-hm7N-1vFHRf"
> status = ["READ", "WRITE", "VISIBLE"]
> segment_count = 1
>
> segment1 {
> start_extent = 0
> extent_count = 750 # 2.92969 Gigabytes
>
> type = "striped"
> stripe_count = 1 # linear
>
> stripes = [
> "pv0", 58789
> ]
> }
> }
> }
> }
>
> root at fs1:/etc/lvm/backup# cat system
> # Generated by LVM2: Tue Mar 29 17:45:03 2011
>
> contents = "Text Format Volume Group"
> version = 1
>
> description = "Created *after* executing '/sbin/vgcfgbackup'"
>
> creation_host = "fs1" # Linux fs1 2.6.24-19-server #1 SMP Wed Aug 20
> 18:43:06 UTC 2008 x86_64
> creation_time = 1301435103 # Tue Mar 29 17:45:03 2011
>
> system {
> id = "VbCivG-iIUw-lPGB-6mT3-iUFd-p86P-pr7H52"
> seqno = 2
> status = ["RESIZEABLE", "READ", "WRITE"]
> extent_size = 8192 # 4 Megabytes
> max_lv = 0
> max_pv = 0
>
> physical_volumes {
>
> pv0 {
> id = "N7YakG-Gi8X-0bt1-j8Uc-42GX-D8kU-RfOaR8"
> device = "/dev/sda" # Hint only
>
> status = ["ALLOCATABLE"]
> dev_size = 9223372036854775807 # 4 (null)
> pe_start = 384
> pe_count = 476826 # 1.81895 Terabytes
> }
> }
>
> logical_volumes {
>
> home {
> id = "FAnBXD-wDB7-0dbx-Hl0V-bwTu-Jace-a6pG0M"
> status = ["READ", "WRITE", "VISIBLE"]
> segment_count = 1
>
> segment1 {
> start_extent = 0
> extent_count = 471860 # 1.8 Terabytes
>
> type = "striped"
> stripe_count = 1 # linear
>
> stripes = [
> "pv0", 0
> ]
> }
> }
> }
> }
>
>
>
> Sincerely,
> Dow
> ________________________________________________
> Dow Hurst, Research Scientist
> 340 Sullivan Science Bldg., Dept. of Chem. and Biochem.
> University of North Carolina at Greensboro
> PO Box 26170 Greensboro, NC 27402-6170
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120907/0e66e13f/attachment-0001.html
More information about the Ale
mailing list