Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Estado antes de agregar el disco nuevo a md0.
- ---------------------------------------------
- root@debian8:~# cat /proc/mdstat
- Personalities : [raid0]
- md0 : active raid0 sdc[1] sdb[0]
- 407552 blocks super 1.2 512k chunks
- unused devices: <none>
- root@debian8:~# pvscan
- PV /dev/md0 VG vg lvm2 [396.00 MiB / 0 free]
- Total: 1 [396.00 MiB] / in use: 1 [396.00 MiB] / in no VG: 0 [0 ]
- root@debian8:~# pvdisplay -v
- DEGRADED MODE. Incomplete RAID LVs will be processed.
- Scanning for physical volume names
- --- Physical volume ---
- PV Name /dev/md0
- VG Name vg
- PV Size 398.00 MiB / not usable 2.00 MiB
- Allocatable yes (but full)
- PE Size 4.00 MiB
- Total PE 99
- Free PE 0
- Allocated PE 99
- PV UUID qHvVvr-V42v-Ig3R-qxgc-jB6g-OMZL-Dt0CPb
- root@debian8:~# vgdisplay -v
- DEGRADED MODE. Incomplete RAID LVs will be processed.
- Finding all volume groups
- Finding volume group "vg"
- --- Volume group ---
- VG Name vg
- System ID
- Format lvm2
- Metadata Areas 1
- Metadata Sequence No 2
- VG Access read/write
- VG Status resizable
- MAX LV 0
- Cur LV 1
- Open LV 1
- Max PV 0
- Cur PV 1
- Act PV 1
- VG Size 396.00 MiB
- PE Size 4.00 MiB
- Total PE 99
- Alloc PE / Size 99 / 396.00 MiB
- Free PE / Size 0 / 0
- VG UUID he13YU-jkD7-HFUV-4CHo-8z0v-dHwO-vcFPf7
- --- Logical volume ---
- LV Path /dev/vg/test
- LV Name test
- VG Name vg
- LV UUID sactKM-UVIH-F3kx-tOJB-5Ee0-AsG8-ZHjiQX
- LV Write Access read/write
- LV Creation host, time debian8, 2015-04-27 20:13:45 -0300
- LV Status available
- # open 1
- LV Size 396.00 MiB
- Current LE 99
- Segments 1
- Allocation inherit
- Read ahead sectors auto
- - currently set to 4096
- Block device 253:0
- --- Physical volumes ---
- PV Name /dev/md0
- PV UUID qHvVvr-V42v-Ig3R-qxgc-jB6g-OMZL-Dt0CPb
- PV Status allocatable
- Total PE / Free PE 99 / 0
- root@debian8:~# df -h /sarasa/
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/vg-test 376M 2.3M 350M 1% /sarasa
- root@debian8:~# fuser -m /sarasa/
- /sarasa: 796c 832c 1023c 1064c 9111c
- Acรก me vine a enterar que raid0 no sopota crecer.
- Por suerte lo pude convertir a raid4.
- -------------------------------------------------
- root@debian8:~# mdadm --misc -Q --detail /dev/md0
- /dev/md0:
- Version : 1.2
- Creation Time : Mon Apr 27 20:01:03 2015
- Raid Level : raid0
- Array Size : 407552 (398.07 MiB 417.33 MB)
- Raid Devices : 2
- Total Devices : 2
- Persistence : Superblock is persistent
- Update Time : Mon Apr 27 20:01:03 2015
- State : clean
- Active Devices : 2
- Working Devices : 2
- Failed Devices : 0
- Spare Devices : 0
- Chunk Size : 512K
- Name : debian8:0 (local to host debian8)
- UUID : f6b546b8:1b429508:5614ff20:5cef87c5
- Events : 0
- Number Major Minor RaidDevice State
- 0 8 16 0 active sync /dev/sdb
- 1 8 32 1 active sync /dev/sdc
- root@debian8:~# mdadm --grow /dev/md0 --level=0 --raid-devices=3 --add /dev/sda
- mdadm: level of /dev/md0 changed to raid4
- mdadm: added /dev/sda
- mdadm: Need to backup 3072K of critical section..
- root@debian8:~# mdadm --misc -Q --detail /dev/md0
- /dev/md0:
- Version : 1.2
- Creation Time : Mon Apr 27 20:01:03 2015
- Raid Level : raid4
- Array Size : 611328 (597.10 MiB 626.00 MB)
- Used Dev Size : 203776 (199.03 MiB 208.67 MB)
- Raid Devices : 4
- Total Devices : 3
- Persistence : Superblock is persistent
- Update Time : Mon Apr 27 20:41:31 2015
- State : clean, degraded
- Active Devices : 3
- Working Devices : 3
- Failed Devices : 0
- Spare Devices : 0
- Chunk Size : 512K
- Name : debian8:0 (local to host debian8)
- UUID : f6b546b8:1b429508:5614ff20:5cef87c5
- Events : 48
- Number Major Minor RaidDevice State
- 0 8 16 0 active sync /dev/sdb
- 1 8 32 1 active sync /dev/sdc
- 3 8 0 2 active sync /dev/sda
- 6 0 0 6 removed
- Acรก crezco todo.
- -----------------------------------------------------------------
- root@debian8:~# pvresize /dev/md0
- Physical volume "/dev/md0" changed
- 1 physical volume(s) resized / 0 physical volume(s) not resized
- root@debian8:~# pvdisplay -v
- DEGRADED MODE. Incomplete RAID LVs will be processed.
- Scanning for physical volume names
- --- Physical volume ---
- PV Name /dev/md0
- VG Name vg
- PV Size 597.00 MiB / not usable 1.00 MiB
- Allocatable yes
- PE Size 4.00 MiB
- Total PE 149
- Free PE 50
- Allocated PE 99
- PV UUID qHvVvr-V42v-Ig3R-qxgc-jB6g-OMZL-Dt0CPb
- root@debian8:~# vgdisplay
- --- Volume group ---
- VG Name vg
- System ID
- Format lvm2
- Metadata Areas 1
- Metadata Sequence No 3
- VG Access read/write
- VG Status resizable
- MAX LV 0
- Cur LV 1
- Open LV 1
- Max PV 0
- Cur PV 1
- Act PV 1
- VG Size 596.00 MiB
- PE Size 4.00 MiB
- Total PE 149
- Alloc PE / Size 99 / 396.00 MiB
- Free PE / Size 50 / 200.00 MiB
- VG UUID he13YU-jkD7-HFUV-4CHo-8z0v-dHwO-vcFPf7
- root@debian8:~# df -h /sarasa/
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/vg-test 376M 2.3M 350M 1% /sarasa
- root@debian8:~# fuser -m /sarasa/
- /sarasa: 796c 832c 1023c 1064c 9111c
- root@debian8:~# lvextend -v -r -l+50 /dev/mapper/vg-test
- DEGRADED MODE. Incomplete RAID LVs will be processed.
- Finding volume group vg
- Executing: fsadm --verbose check /dev/vg/test
- fsadm: "ext4" filesystem found on "/dev/mapper/vg-test"
- fsadm: Skipping filesystem check for device "/dev/mapper/vg-test" as the filesystem is mounted on /sarasa
- fsadm failed: 3
- Archiving volume group "vg" metadata (seqno 3).
- Extending logical volume vg/test to 596.00 MiB
- Size of logical volume vg/test changed from 396.00 MiB (99 extents) to 596.00 MiB (149 extents).
- Loading vg-test table (253:0)
- Suspending vg-test (253:0) with device flush
- Resuming vg-test (253:0)
- Creating volume group backup "/etc/lvm/backup/vg" (seqno 4).
- Logical volume test successfully resized
- Executing: fsadm --verbose resize /dev/vg/test 610304K
- fsadm: "ext4" filesystem found on "/dev/mapper/vg-test"
- fsadm: Device "/dev/mapper/vg-test" size is 624951296 bytes
- fsadm: Parsing tune2fs -l "/dev/mapper/vg-test"
- fsadm: Resizing filesystem on device "/dev/mapper/vg-test" to 624951296 bytes (405504 -> 610304 blocks of 1024 bytes)
- fsadm: Executing resize2fs /dev/mapper/vg-test 610304
- resize2fs 1.42.12 (29-Aug-2014)
- Filesystem at /dev/mapper/vg-test is mounted on /sarasa; on-line resizing required
- old_desc_blocks = 2, new_desc_blocks = 3
- The filesystem on /dev/mapper/vg-test is now 610304 (1k) blocks long.
- root@debian8:~# df -h /sarasa/
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/vg-test 570M 2.3M 536M 1% /sarasa
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement