FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-17-2011, 01:52 AM
Dale
 
Default LVM and LABELS in fstab

OK. I jumped into LVM. I took my spare drive, put it to use with LVM.
Then copied data from my super large drive to it and backed up some to
DVDs that wouldn't fit. Then I put the big drive on LVM and put the
stuff back. Now comes the problem. I use LABELS in fstab and would
like to continue that. I can't figure out how to get the LABEL set for
the LVM file system tho. This is my info:


root@fireball / # pvdisplay
--- Physical volume ---
PV Name /dev/sdb1
VG Name data
PV Size 232.83 GiB / not usable 2.55 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 59604
Free PE 0
Allocated PE 59604
PV UUID Nxvrjn-BuaK-RGsF-F32S-0EaI-W4xe-H6Lnjl

--- Physical volume ---
PV Name /dev/sdc1
VG Name data
PV Size 698.64 GiB / not usable 4.84 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 178850
Free PE 118
Allocated PE 178732
PV UUID NF6I4G-L1L5-0VDE-HyUc-ESH3-CfV3-eUo676

root@fireball / # vgdisplay
--- Volume group ---
VG Name data
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 931.46 GiB
PE Size 4.00 MiB
Total PE 238454
Alloc PE / Size 238336 / 931.00 GiB
Free PE / Size 118 / 472.00 MiB
VG UUID eNF7B0-3BDb-qe1W-5FTH-4Uah-wRe1-xD7Xa8

root@fireball / # lvdisplay
--- Logical volume ---
LV Name /dev/data/data1
VG Name data
LV UUID ZvsgH6-PI0M-NqVd-op9P-Crsy-IEnz-iKoTfp
LV Write Access read/write
LV Status available
# open 1
LV Size 931.00 GiB
Current LE 238336
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0

root@fireball / #


I tried e2label since it has ext4 for the file system. It didn't work
and I don't know for sure what to point it to for the device. I can't
point to the drive itself since there are now two in the setup.


What am I missing here? It's simple I'm sure but I'm missing it.

Dale

:-) :-)

P. S. hey, I got it all created, copied and all so it was a start. lol

--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
 
Old 11-17-2011, 05:20 AM
Manuel McLure
 
Default LVM and LABELS in fstab

On Wed, Nov 16, 2011 at 6:52 PM, Dale <rdalek1967@gmail.com> wrote:
> OK. *I jumped into LVM. *I took my spare drive, put it to use with LVM.
> *Then copied data from my super large drive to it and backed up some to DVDs
> that wouldn't fit. *Then I put the big drive on LVM and put the stuff back.
> *Now comes the problem. *I use LABELS in fstab and would like to continue
> that. *I can't figure out how to get the LABEL set for the LVM file system
> tho. *This is my info:
>

...

> root@fireball / # lvdisplay
> *--- Logical volume ---
> *LV Name * * * * * * * */dev/data/data1
> *VG Name * * * * * * * *data
> *LV UUID * * * * * * * *ZvsgH6-PI0M-NqVd-op9P-Crsy-IEnz-iKoTfp
> *LV Write Access * * * *read/write
> *LV Status * * * * * * *available
> *# open * * * * * * * * 1
> *LV Size * * * * * * * *931.00 GiB
> *Current LE * * * * * * 238336
> *Segments * * * * * * * 2
> *Allocation * * * * * * inherit
> *Read ahead sectors * * auto
> *- currently set to * * 256
> *Block device * * * * * 254:0
>
> root@fireball / #
>
>
> I tried e2label since it has ext4 for the file system. *It didn't work and I
> don't know for sure what to point it to for the device. *I can't point to
> the drive itself since there are now two in the setup.
>
> What am I missing here? *It's simple I'm sure but I'm missing it.

You should be able to use e2label (or "tune2fs -L" as I do) on the
/dev/data/data1 device to set the filesystem label. That's the logical
volume that the operating system needs to mount.

# tune2fs -L mylabel /dev/data/data1

should do what you need.

I haven't done this with ext4, but I have used LVM with ext2, ext3 and
labels in this fashion.
--
Manuel A. McLure WW1FA <manuel@mclure.org> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.* * * * * * * * * * ** -- H.P. Lovecraft
 
Old 11-17-2011, 05:50 AM
Dale
 
Default LVM and LABELS in fstab

Manuel McLure wrote:
You should be able to use e2label (or "tune2fs -L" as I do) on the
/dev/data/data1 device to set the filesystem label. That's the logical
volume that the operating system needs to mount. # tune2fs -L mylabel
/dev/data/data1 should do what you need. I haven't done this with
ext4, but I have used LVM with ext2, ext3 and labels in this fashion.


That is the problem. I was using e2label and got a error. tune2fs
worked fine. I get this now:


root@fireball / # blkid /dev/mapper/data-data1
/dev/mapper/data-data1: UUID="7500437d-700c-4836-a878-29507af67a8d"
TYPE="ext4" LABEL="data"

root@fireball / #

Sort of hard to believe I got this far with LVM tho. I got some space now.

/dev/mapper/data-data1 960906608 255981512 656122832 29% /data

Now I can download some more of my TV shows.

One more question. I have two drives. A 250Gb and a 750Gb. Originally
the data was on the 750Gb drive. I set the 250Gb up on LVM then moved
things over from the 750Gb. I then added the 750Gb to the VG and
resized the file system. So, in theory the data is on the 250Gb drive.
Let's say I want to remove the 250Gb drive. I would use pvmove to do
that right? When I ran pvmove /dev/sdb, which is the 250Gb drive, then
it would remove all the data from that drive so that it could be
removed. Am I close?


I'm not planning to do that but just wanting to get a better
understanding of this LVM thing.


Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
 
Old 11-17-2011, 08:43 AM
Florian Philipp
 
Default LVM and LABELS in fstab

Am 17.11.2011 07:50, schrieb Dale:
[...]
> One more question. I have two drives. A 250Gb and a 750Gb. Originally
> the data was on the 750Gb drive. I set the 250Gb up on LVM then moved
> things over from the 750Gb. I then added the 750Gb to the VG and
> resized the file system. So, in theory the data is on the 250Gb drive.
> Let's say I want to remove the 250Gb drive. I would use pvmove to do
> that right? When I ran pvmove /dev/sdb, which is the 250Gb drive, then
> it would remove all the data from that drive so that it could be
> removed. Am I close?
>
> I'm not planning to do that but just wanting to get a better
> understanding of this LVM thing.
>
> Dale
>

Yes, that is correct. It moves the data by mirroring it temporarily on
the new location before updating the metadata so that only the new
location is used. Therefore you can safely reboot or abort operations.

Regards,
Florian Philipp
 
Old 11-17-2011, 12:38 PM
Joost Roeleveld
 
Default LVM and LABELS in fstab

On Thursday, November 17, 2011 10:43:28 AM Florian Philipp wrote:
> Am 17.11.2011 07:50, schrieb Dale:
> [...]
>
> > One more question. I have two drives. A 250Gb and a 750Gb. Originally
> > the data was on the 750Gb drive. I set the 250Gb up on LVM then moved
> > things over from the 750Gb. I then added the 750Gb to the VG and
> > resized the file system. So, in theory the data is on the 250Gb drive.
> > Let's say I want to remove the 250Gb drive. I would use pvmove to do
> > that right? When I ran pvmove /dev/sdb, which is the 250Gb drive, then
> > it would remove all the data from that drive so that it could be
> > removed. Am I close?
> >
> > I'm not planning to do that but just wanting to get a better
> > understanding of this LVM thing.
> >
> > Dale
>
> Yes, that is correct. It moves the data by mirroring it temporarily on
> the new location before updating the metadata so that only the new
> location is used. Therefore you can safely reboot or abort operations.

Also, this will only work if the VG has sufficient unused space (eg. not used
by LVs) on the other disk(s) to accomodate the data moved.

--
Joost
 
Old 11-17-2011, 04:37 PM
Dale
 
Default LVM and LABELS in fstab

Joost Roeleveld wrote:

On Thursday, November 17, 2011 10:43:28 AM Florian Philipp wrote:

Am 17.11.2011 07:50, schrieb Dale:
[...]


One more question. I have two drives. A 250Gb and a 750Gb. Originally
the data was on the 750Gb drive. I set the 250Gb up on LVM then moved
things over from the 750Gb. I then added the 750Gb to the VG and
resized the file system. So, in theory the data is on the 250Gb drive.
Let's say I want to remove the 250Gb drive. I would use pvmove to do
that right? When I ran pvmove /dev/sdb, which is the 250Gb drive, then
it would remove all the data from that drive so that it could be
removed. Am I close?

I'm not planning to do that but just wanting to get a better
understanding of this LVM thing.

Dale

Yes, that is correct. It moves the data by mirroring it temporarily on
the new location before updating the metadata so that only the new
location is used. Therefore you can safely reboot or abort operations.

Also, this will only work if the VG has sufficient unused space (eg. not used
by LVs) on the other disk(s) to accomodate the data moved.

--
Joost





Thanks. Clear as mud now. lol I'm getting there. Is there a tool to
see if there is enough room to do this before trying it?


Curious about gkrellm and how it will see the new drives now. May be
interesting.


Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
 
Old 11-17-2011, 05:57 PM
Neil Bothwick
 
Default LVM and LABELS in fstab

On Thu, 17 Nov 2011 11:37:59 -0600, Dale wrote:

> > Also, this will only work if the VG has sufficient unused space (eg.
> > not used by LVs) on the other disk(s) to accomodate the data moved.

> Thanks. Clear as mud now. lol I'm getting there. Is there a tool
> to see if there is enough room to do this before trying it?

pvs, vgs and lvs are your friends here. As long as the free space
reported by vgs is more than pvs reports as the size of the partition you
want to remove, you will be fine.

Although pvmove will also let you know if there isn't enough space for
what you want.


--
Neil Bothwick

Everyone has a photographic memory. Some don't have film.
 
Old 11-18-2011, 04:18 AM
Dale
 
Default LVM and LABELS in fstab

Neil Bothwick wrote:

On Thu, 17 Nov 2011 11:37:59 -0600, Dale wrote:


Also, this will only work if the VG has sufficient unused space (eg.
not used by LVs) on the other disk(s) to accomodate the data moved.

Thanks. Clear as mud now. lol I'm getting there. Is there a tool
to see if there is enough room to do this before trying it?

pvs, vgs and lvs are your friends here. As long as the free space
reported by vgs is more than pvs reports as the size of the partition you
want to remove, you will be fine.

Although pvmove will also let you know if there isn't enough space for
what you want.




I found something that is a bit annoying here. I have gkrellm running
on my desktop to sort of keep a eye on things. This works fine for the
little part down at the bottom with how much is used and how much is
free. Thing is, the part that shows activity doesn't have anything for
LVM. I have the listing for the individual drives, sdb and sdc, but
nothing for the whole thing.


Is there a way to make this work? I googled but I couldn't find
anything on this one. Well, a few worthless hits that just happen to
have the words on the same page for some reason.


Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
 
Old 11-20-2011, 12:02 PM
James Wall
 
Default LVM and LABELS in fstab

On Thu, Nov 17, 2011 at 11:18 PM, Dale <rdalek1967@gmail.com> wrote:
> Neil Bothwick wrote:
>>
>> On Thu, 17 Nov 2011 11:37:59 -0600, Dale wrote:
>>
>>>> Also, this will only work if the VG has sufficient unused space (eg.
>>>> not used by LVs) on the other disk(s) to accomodate the data moved.
>>>
>>> Thanks. *Clear as mud now. * lol *I'm getting there. *Is there a tool
>>> to see if there is enough room to do this before trying it?
>>
>> pvs, vgs and lvs are your friends here. As long as the free space
>> reported by vgs is more than pvs reports as the size of the partition you
>> want to remove, you will be fine.
>>
>> Although pvmove will also let you know if there isn't enough space for
>> what you want.
>>
>>
>
> I found something that is a bit annoying here. *I have gkrellm running on my
> desktop to sort of keep a eye on things. *This works fine for the little
> part down at the bottom with how much is used and how much is free. *Thing
> is, the part that shows activity doesn't have anything for LVM. *I have the
> listing for the individual drives, sdb and sdc, but nothing for the whole
> thing.
>
> Is there a way to make this work? *I googled but I couldn't find anything on
> this one. *Well, a few worthless hits that just happen to have the words on
> the same page for some reason.

Look for /dev/dm-0 to monitor your lvm partition. that is what I use
to monitor my LVM /, swap, and /home partitions in the monitor setup.
> Dale
>
> :-) *:-)
>
> --
> I am only responsible for what I said ... Not for what you understood or how
> you interpreted my words!
>
>
>



--
No trees were harmed in the sending of this message. However, a large
number of electrons were terribly inconvenienced.
 
Old 11-20-2011, 07:32 PM
Dale
 
Default LVM and LABELS in fstab

James Wall wrote:

On Thu, Nov 17, 2011 at 11:18 PM, Dale<rdalek1967@gmail.com> wrote:

Is there a way to make this work? I googled but I couldn't find anything on
this one. Well, a few worthless hits that just happen to have the words on
the same page for some reason.

Look for /dev/dm-0 to monitor your lvm partition. that is what I use
to monitor my LVM /, swap, and /home partitions in the monitor setup.

Dale

:-) :-)




I don't see that option here. All I have is sd* and sr0. Also
composite for all drives.


[ebuild R ] app-admin/gkrellm-2.3.5 USE="X hddtemp nls ssl -gnutls
-lm_sensors -ntlm"


Your flags look something like mine?

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!
 

Thread Tools




All times are GMT. The time now is 08:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org