All of lore.kernel.org
 help / color / mirror / Atom feed
* Suggestion from a noob
@ 2011-01-28 15:33 hansbkk
  2011-01-28 22:24 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 3+ messages in thread
From: hansbkk @ 2011-01-28 15:33 UTC (permalink / raw)
  To: grub-devel

Sorry if this has already been discussed here; I did search first.

I've got some filers with a very large number of disks and partitions,
and as you know the device numbers are pretty much random these days
with modern kernels. GRUB adds to this issue, in that I've discovered
it's hd# order is completely different from every other OS I'm using -
beside the server production ones, I use various distros for
maintenance tasks, mostly booting LiveCD from ISO copied to my
dedicated GRUB2 partitions.

Of course UUIDs are one answer to this - but not "the answer", as they
aren't very human-friendly - I personally prefer labeling my
partitions and using those. But what scheme to use for the labels? My
answer - GRUB2's order, because it's relatively stable (BIOS order,
right?) and operating-system independent. FYI I use g0102 for
(hd0,msdos2) - the g's to remind me it's grub's ordering, I used to
use sysresccd to set the standard, but have found that the v2 release
has started randomizing the sd#'s as badly as say Ubuntu does.

So here's my suggestion - please allow users to actually SET the
labels right from the grub CLI! Right now, I'm putting files into my
partitions and using grub's search -f facility to identify its
ordering, and then I have to boot up into an OS to set the labels,
then back to grub to check I got it right.

I realize the different filesystems have different label structures,
but if you were able to handle say dos/ntfs plus the top four Linux
filesystems that should cover 99% of the needs out there.

Just an idea, if it's a stupid one, please let me know why - and if
you've got a better suggestion than the above kludge for figuring out
which disk is which please fill me in! (for most of my servers all the
disks have identical partitioning)

Thanks in advance. . .

PS BTW booting from RAID arrays of course makes all this go away, but
I ran into problems with booting-from-ISO with certain distros, so I'm
sticking to regular partitions for now.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Suggestion from a noob
  2011-01-28 15:33 Suggestion from a noob hansbkk
@ 2011-01-28 22:24 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-01-30  4:11   ` hansbkk
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-01-28 22:24 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 2271 bytes --]

On 01/28/2011 06:33 PM, hansbkk@gmail.com wrote:
> But what scheme to use for the labels? My
> answer - GRUB2's order, because it's relatively stable (BIOS order,
> right?)
It's nothing but. It depends on the factors like booted disk,
enumeration order, disk latency and connected devices. It's also
different from one mobo to another. It's probably by luck that it looked
like relatively stable for you. Although one objective reason why it
could seem stable is because you probably upgrade you BIOS less than Linux.
There are orders of technical origin based on e.g. disk model and serial
number, which might be more readable for you. But the target usercase is
that user assigns the names based on the description of the contents
that makes sense to him.
> So here's my suggestion - please allow users to actually SET the
> labels right from the grub CLI! I realize the different filesystems have different label structures,
> but if you were able to handle say dos/ntfs plus the top four Linux
> filesystems that should cover 99% of the needs out there.
>
>   
Writing to a filesystem is always a potential risk. It has to be
carefully evaluated to find out if it's justified. For some filesystems
it's as easy as writing to a superblock, on the others it's more tricky
because it has mirrored superblocks or handles label somewhere in the
fs. Also if we write anything to fs metadata we have to carefully check
the compatibility to avoid potentially corrupting the fs. It adds some
new points of failure and complexity. Also including just one fs with
such support creates an incencitive to make other fses do the same even
if it's potentially risky.
Filesystems modules are also size-critical so any write support was
intentionally omitted to keep the complexity and risks down.
So a priori I'd say it's a no. You can bring new arguments to persuade
me though.
> Just an idea, if it's a stupid one, please let me know why - and if
> you've got a better suggestion than the above kludge for figuring out
> which disk is which please fill me in! 
>   
Just name the disks after whatever makes sense t you, not whatever makes
sense to GRUB, it's your disks after all.


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Suggestion from a noob
  2011-01-28 22:24 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-01-30  4:11   ` hansbkk
  0 siblings, 0 replies; 3+ messages in thread
From: hansbkk @ 2011-01-30  4:11 UTC (permalink / raw)
  To: The development of GNU GRUB

2011/1/29 Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:

>But the target usercase is
> that user assigns the names based on the description of the contents
> that makes sense to him.

> Just name the disks after whatever makes sense t you, not whatever makes
> sense to GRUB, it's your disks after all.

But when you've got 18+ multi-TB drives supporting LVM layered over 6
RAID arrays, there aren't any meaningful semantics to "hang your hat
on" for partition labels.

So my current convention is to use grub's ordering - and I realize
that isn't stable, it's just more stable than most of the OS's I'm
booting into for maintenance purposes (the only time I need to try to
figure out which physical disk is which).


>> So here's my suggestion - please allow users to actually SET the
>> labels right from the grub CLI! I realize the different filesystems have different label structures,
>> but if you were able to handle say dos/ntfs plus the top four Linux
>> filesystems that should cover 99% of the needs out there.
>>
> Writing to a filesystem is always a potential risk. It has to be
> carefully evaluated to find out if it's justified. For some filesystems


Yes, I can see how the risks and dev time cost would outweigh the
benefits for most people/use cases.

So I guess I'll ask (anyone out there) again:

I currently use the following procedure to help figure out which disks
are which while in grub (for most of my servers all the disks have
identical partitioning):

Say I'm in SysRescCD - I create files in a parallel locations on each
drive with a name like "sda1-srcd" "sdb1-srcd" etc. Then when I'm in
Grml, if I notice that the ordering's different, I'll also create
"sda1-grml" "sdb1-grml"

Then I when I'm back in Grub, I use search -f on these names and jot
down the ordering, then label a series of partitions with "g201", g211
etc and use these from now on so each OS environment can have a set of
consistent mount points.

>if you've got a better suggestion than the above kludge for figuring out which disk is which please fill me in!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-30  4:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 15:33 Suggestion from a noob hansbkk
2011-01-28 22:24 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-01-30  4:11   ` hansbkk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.