Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM snapshot mounted instead root partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
amulet_linux
n00b
n00b


Joined: 26 Apr 2014
Posts: 65

PostPosted: Mon Mar 09, 2015 11:51 pm    Post subject: LVM snapshot mounted instead root partition Reply with quote

Recently I started using the snapshot features of LVM just for testing, I have a snapshot partition and my usual root (/) partition
I was surprised when noticed Gentoo mounted the wrong partition even my fstab is perfect
I guess I have to use UUID from now on fstab

I don't know what happened
_________________
https://gentoo.curl.pink
I post about Gentoo and Linux :3
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Tue Mar 10, 2015 12:21 am    Post subject: Reply with quote

if the snapshot represents a 1:1 copy of the block device with your filesystem on, then you have 2 block devices with the same UUID, so if you mount by UUID, it could pick the wrong one if you're unlucky.

since LVM also provides unique device name ( /dev/vgname/lvname or /dev/mapper/vg-lv ) those might be preferrable if you're going to have such snapshot copies around.

alternatively you could change the UUID of the snapshot as you create it...
Back to top
View user's profile Send private message
amulet_linux
n00b
n00b


Joined: 26 Apr 2014
Posts: 65

PostPosted: Tue Mar 10, 2015 12:52 am    Post subject: Reply with quote

frostschutz wrote:
if the snapshot represents a 1:1 copy of the block device with your filesystem on, then you have 2 block devices with the same UUID, so if you mount by UUID, it could pick the wrong one if you're unlucky.

since LVM also provides unique device name ( /dev/vgname/lvname or /dev/mapper/vg-lv ) those might be preferrable if you're going to have such snapshot copies around.

alternatively you could change the UUID of the snapshot as you create it...


I see, that is the problem, I was already using UUID, I forgot completely
Thank you
_________________
https://gentoo.curl.pink
I post about Gentoo and Linux :3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum