Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
root on LVM2: shutdown can't deactivate /
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Thu Jun 29, 2006 9:12 am    Post subject: root on LVM2: shutdown can't deactivate / Reply with quote

HI,

sorry if this is a dup. I was searched a bit and didn't find anything related, but the search-terms "root lvm" match quite a lot of posts. (I did find this, but this is another, related question)

I'm considering on putting my complete system (appart from /boot) on LVM2. I know putting / on LVM is not recommended, but the only reasons I found so far were: "need initrd to boot" and "hard to upgrade/rescue". I can live with those.

There is however a more serious problem. On my test setup I get a problem during shutdown. The init-scripts want to bring down LVM, which obviously fails, because / is still mounted (duh). In the script (/lib/rcscripts/addons/lvm-stop.sh) there is a link to https://www.redhat.com/archives/linux-lvm/2001-May/msg00523.html which explains the problem.

Basicaly, the post answers my question, but I'm concerned for the future: If a future release of LVM DOES update the metadata, it will become impossible to have my / on LVM. Is this problem solvable? or is root on lvm just "unsupported" and should I go cry in a corner?
Back to top
View user's profile Send private message
wrs4
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 98
Location: Alexandria, VA

PostPosted: Mon Jul 03, 2006 4:13 pm    Post subject: Reply with quote

I'm curious...is there a particularly compelling reason to have / on lvm? The recommendations I saw on the gentoo lvm setup guide basically said to allocate a small amount of space for a non-lvm / partition (in my case I did 512 Mb) and then place other partitions you want on the lvs (for example, home, usr, var, etc).
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Mon Jul 03, 2006 9:39 pm    Post subject: Reply with quote

wrs4 wrote:
I'm curious...is there a particularly compelling reason to have / on lvm?
consistency. Why NOT put it on LVM (short of the thing I mentioned here)?
The main reason to use LVM is to gain flexibility. I don't want to cut down on that because / can't be on it...

but the actual reason: Only because most guides tell me "don't do this, because it's complicated and hard": this makes it a chalenge for me :lol: :lol:
Back to top
View user's profile Send private message
wrs4
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 98
Location: Alexandria, VA

PostPosted: Mon Jul 03, 2006 9:46 pm    Post subject: Reply with quote

Nice response :D

I guess the way I look at it is....technically, / exists for mounting everything; not necessarily for containing everythng. So, a minimal / on a regular partition serves as a bare mount point for the stuff you need to have expandable (lvm) and for virtual filesystems (dev, shm, proc).

That's just me though :)

OTOH, if you can figure out a way to do it, more power to you.
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Mon Jul 03, 2006 9:48 pm    Post subject: Reply with quote

wrs4 wrote:
technically, / exists for mounting everything; not necessarily for containing everythng. So, a minimal / on a regular partition serves as a bare mount point for the stuff you need to have expandable (lvm) and for virtual filesystems (dev, shm, proc).
Exactly my point... just change / to /boot and add / to the LVM list ;-)
Back to top
View user's profile Send private message
wrs4
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 98
Location: Alexandria, VA

PostPosted: Mon Jul 03, 2006 9:53 pm    Post subject: Reply with quote

WTH? :D

You want /boot, a regular partition, to mount off /, an lvm partition? *shakes head in mock confusion*

How do you expect to be able to shut down the vgs and still have dev, proc, and shm operational if / is an lv? :)
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Tue Jul 04, 2006 8:29 am    Post subject: Reply with quote

wrs4 wrote:
You want /boot, a regular partition, to mount off /, an lvm partition? *shakes head in mock confusion*

/boot has to be regular, since GRUB needs it. I boot a kernel with an initrd (read from /boot). This initrd brings the LVM online and starts the regular init process from /.
wrs4 wrote:
How do you expect to be able to shut down the vgs and still have dev, proc, and shm operational if / is an lv? :)

It shouldn't be a problem, I think. currently / remains mounted until the end, without deactivating the vg's. But I'm not sure if this is clean (hence my first post)
Back to top
View user's profile Send private message
wrs4
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 98
Location: Alexandria, VA

PostPosted: Wed Jul 05, 2006 3:16 am    Post subject: Reply with quote

I guess I can't see anything wrong with your logic, and a friend of mine tells me it works out of the box (as it were) for him on Debian. Hope you find a solution :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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