System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Fedora 13 Logical volume problem (points!)

Christian Deutsch_1
Esteemed Contributor

Fedora 13 Logical volume problem (points!)

Hi folks,

I have a logical volume problem on Fedora 13.

I tried to add a second disk to a logical volume. But resize2fs /dev/vg_smarty/lv_home tells me:

"Device or resource busy while trying to open /dev/vg_smarty/lv_home"

I have tried various things, including going into single user mode and unmounting /home, booting from the Fedora 13 DVD and trying to change the volumes but it will only let me continue if I create a new boot partition. But my boot partition is working fine.

My idea now is to try to either take the second disk out of lv_home (because resize2fs did not work anyway) or if there is no hope of being able to do that then to remove lv_home altogether and create a new lv_home.

I am wondering if this might have anything to do with disk encryption or use of the ext4 file system? I have / and /home encrypted. Fedora refused to encrypt the boot partition at installation time so I guess this is not possible.

Any informed help would be greatly appreciated and generously rewarded with points!

Thanks, Christian

--- Logical volume ---
LV Name /dev/vg_smarty/lv_home
VG Name vg_smarty
LV UUID xxx
LV Write Access read/write
LV Status available
# open 1
LV Size 1015.72 GiB
Current LE 32503
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5
Yeshua loves you!
7 REPLIES
Rob Leadbeater
Honored Contributor

Re: Fedora 13 Logical volume problem (points!)

Hi Christian,

Can you detail the exact steps that you've taken ?

Adding an additional disk into a volume group won't automatically extend any logical volumes.

You'll need to do a lvresize before doing an resize2fs.

Hope this helps,

Regards,

Rob
Christian Deutsch_1
Esteemed Contributor

Re: Fedora 13 Logical volume problem (points!)

Hi Rob,

Thanks for mentioning lvresize.

No I did not do that yet.

I used instructions from this page:

http://www.techotopia.com/index.php/Adding_a_New_Disk_to_a_Fedora_Volume_Group_and_Logical_Volume

First I did:

pvcreate /dev/sdb

and got this message:

"Device /dev/sdb not found (or ignored by filtering)."

I wanted to use the whole disk "as one partition" so to speak. Anyway this refused to work, so instead I tried:

pvcreate /dev/sdb1

This worked.

After that I used:

vgextend vg_smarty /dev/sdb1

That worked fine as well.

FYI: using the "Logical Volume Management" GUI after this did not seem to help. It does not seem to offer many options or possibilities anyway.

Trying the pvcreate command again will not work now, even with -ff, I get the message "Can't open /dev/sdb1 exclusively. Mounted filesystem?". So that is for me one additional argument to do something to get /dev/sdb1 out of vg_smarty.

Thanks for more help (I will give more points of course).

Christian
Yeshua loves you!
Rob Leadbeater
Honored Contributor

Re: Fedora 13 Logical volume problem (points!)

Can you post the output of

# vgdisplay -v vg_smarty

and

# pvdisplay

Cheers,
Rob
Randy Jones_3
Trusted Contributor

Re: Fedora 13 Logical volume problem (points!)

If you don't deactivate the LV it will do as you said. Try the resize again after:

/usr/sbin/lvchange -v -a n vg_smarty/lv_home
Christian Deutsch_1
Esteemed Contributor

Re: Fedora 13 Logical volume problem (points!)

Hi Randy,

[root@smarty ~]# /sbin/lvchange -v -a n vg_smarty/lv_home
Using logical volume(s) on command line
Deactivating logical volume "lv_home"
Found volume group "vg_smarty"
LV vg_smarty/lv_home in use: not deactivating

Does this mean I should switch to single user mode first, unmount /home and run this command again before trying the resize?

Rob,

[root@smarty ~]# vgdisplay -v vg_smarty
Using volume group(s) on command line
Finding volume group "vg_smarty"
--- Volume group ---
VG Name vg_smarty
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 1.05 TiB
PE Size 32.00 MiB
Total PE 34561
Alloc PE / Size 34545 / 1.05 TiB
Free PE / Size 16 / 512.00 MiB
VG UUID 1uvt7r-Msd2-uIM3-H9ED-V0iq-TFeD-T9wLOu

--- Logical volume ---
LV Name /dev/vg_smarty/lv_root
VG Name vg_smarty
LV UUID WKveRc-O4Zr-c5V4-Tl7o-FoE2-EPWL-PlaF77
LV Write Access read/write
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 1600
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Name /dev/vg_smarty/lv_swap
VG Name vg_smarty
LV UUID UGnBQL-mDaa-eZAi-gzpU-JvGM-qG1Z-IhSvDQ
LV Write Access read/write
LV Status available
# open 1
LV Size 13.81 GiB
Current LE 442
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Name /dev/vg_smarty/lv_home
VG Name vg_smarty
LV UUID QuDevN-LD2D-wPu5-cGwX-eej9-ZMjx-n4cQaI
LV Write Access read/write
LV Status available
# open 1
LV Size 1015.72 GiB
Current LE 32503
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5

--- Physical volumes ---
PV Name /dev/dm-0
PV UUID 6N0cPs-vu36-1Ehv-2gU0-r1BJ-hcNu-Tftd22
PV Status allocatable
Total PE / Free PE 4753 / 0

PV Name /dev/sdb1
PV UUID myc99K-dnPw-gqcj-k5st-Ky6j-flrj-ywWcFc
PV Status allocatable
Total PE / Free PE 29808 / 16

[root@smarty ~]# pvdisplay
--- Physical volume ---
PV Name /dev/dm-0
VG Name vg_smarty
PV Size 148.56 GiB / not usable 28.03 MiB
Allocatable yes (but full)
PE Size 32.00 MiB
Total PE 4753
Free PE 0
Allocated PE 4753
PV UUID 6N0cPs-vu36-1Ehv-2gU0-r1BJ-hcNu-Tftd22

--- Physical volume ---
PV Name /dev/sdb1
VG Name vg_smarty
PV Size 931.51 GiB / not usable 11.19 MiB
Allocatable yes
PE Size 32.00 MiB
Total PE 29808
Free PE 16
Allocated PE 29792
PV UUID myc99K-dnPw-gqcj-k5st-Ky6j-flrj-ywWcFc

Thanks for help, Christian
Yeshua loves you!
Rob Leadbeater
Honored Contributor

Re: Fedora 13 Logical volume problem (points!)

Hi,

I can't immediately see what's wrong there.

The LV (lv_home) looks to have resized correctly...

What's the physical configuration ?
I only ask as you have a mixture of plain SCSI and device mapper devices in the volume group...

Cheers,

Rob
Christian Deutsch_1
Esteemed Contributor

Re: Fedora 13 Logical volume problem (points!)

Rob,

Well as far as I can see they are two SATA disks, one is 160GB and one is 1TB in an HP XW8600 workstation, I don't know why Fedora is getting confused about them.

Christian
Yeshua loves you!