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 > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 09-29-2011, 09:19 PM
 
Default add on sata card relabeling drives, installation

Les Mikesell wrote:
> On Thu, Sep 29, 2011 at 4:09 PM, David C. Miller
> <millerdc@fusion.gat.com> wrote:
>>
>> This type of issue is why relying on /dev/sdX is bad. Mounting based on
>> uuid or label when available is best. Unfortunately, there are
>> controller cards that present all disks as the same uuid. It makes using
>> mdadm that can only see /dev/sdX a pain to use.
>
> So how do you propose getting a uuid or label on a disk in the first
> place if you can't identify which is which physically? And how do you
> know which to move when you want the content in some other box?

When I build, our PXEboot ks partitions and labels the partitions. When I
add or replace, I make the partition, the fs, and e2label them. I've
gotten to really appreciate labeling. I hate the UUIDs - they're
ludicrously too long, and bear no relationship to what device they are, or
where they go.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-29-2011, 09:25 PM
Les Mikesell
 
Default add on sata card relabeling drives, installation

On Thu, Sep 29, 2011 at 4:19 PM, <m.roth@5-cent.us> wrote:
>
>>> This type of issue is why relying on /dev/sdX is bad. Mounting based on
>>> uuid or label when available is best. Unfortunately, there are
>>> controller cards that present all disks as the same uuid. It makes using
>>> mdadm that can only see /dev/sdX a pain to use.
>>
>> So how do you propose getting a uuid or label on a disk in the first
>> place if you can't identify which is which physically? *And how do you
>> know which to move when you want the content in some other box?
>
> When I build, our PXEboot ks partitions and labels the partitions. When I
> add or replace, I make the partition, the fs, and e2label them. I've
> gotten to really appreciate labeling. I hate the UUIDs - they're
> ludicrously too long, and bear no relationship to what device they are, or
> where they go.

What happens when you move the disks around among machines? Or don't
you ever do that after they contain data?

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-29-2011, 09:29 PM
Lamar Owen
 
Default add on sata card relabeling drives, installation

On Thursday, September 29, 2011 05:16:16 PM Les Mikesell wrote:
> So how do you propose getting a uuid or label on a disk in the first
> place if you can't identify which is which physically? And how do you
> know which to move when you want the content in some other box?

Drive model number plus serial number. Really the only way; when putting systems together you just need to note the drive model and serial number(s).
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-29-2011, 09:30 PM
 
Default add on sata card relabeling drives, installation

Les Mikesell wrote:
> On Thu, Sep 29, 2011 at 4:19 PM, <m.roth@5-cent.us> wrote:
>>
>>>> This type of issue is why relying on /dev/sdX is bad. Mounting based
>>>> on uuid or label when available is best. Unfortunately, there are
>>>> controller cards that present all disks as the same uuid. It makes
>>>> using mdadm that can only see /dev/sdX a pain to use.
<snip>
>> When I build, our PXEboot ks partitions and labels the partitions. When
>> I add or replace, I make the partition, the fs, and e2label them. I've
>> gotten to really appreciate labeling. I hate the UUIDs - they're
>> ludicrously too long, and bear no relationship to what device they are,
>> or where they go.
>
> What happens when you move the disks around among machines? Or don't
> you ever do that after they contain data?

Other than offline backups, we don't move disks, other than to replace.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-29-2011, 11:23 PM
Bob Hoffman
 
Default add on sata card relabeling drives, installation

--
Lamar Owen wrote

Drive model number plus serial number. Really the only way;
when putting systems together you just need to note the drive model and serial number(s)

--

That seems like an important thing.

After some research I have decided the only two options are

1) to leave as is and deal with any software (such as monitoring tools,
mdadm reports, etc) as they come and try to fix them.

2) You can actually change the order that UDEV looks at things and you
can assign permanent drive letters AFTER the install.
However, there is not much documentation on that, so option 1 seems easiest.

I do not understand the technical reasons why linux decided to
dynamically label things sda, sdb, etc.
After looking at udev files I find the drives are listed by UUID and a
deeper labeling system
like hd0, hd1, hd2.

So why even have the labels in the first place if the system doesn't use
them, you cannot rely on them, and
apparently they don't matter?
It would be better for the anaconda installer to just list them as hd0,
hd1, hd2, etc.

Where this is an issue is when you are cloning drives, adding grubs,
etc...because all my instructions rely on using sda, sdb,
etc...and not UUID or other things. And reports from mdadm (and all tech
instructions) use the sda sdb.

IT is what it is. I am sure there is a reason. Just odd.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-30-2011, 12:32 AM
"David C. Miller"
 
Default add on sata card relabeling drives, installation

----- Original Message -----
> From: "Les Mikesell" <lesmikesell@gmail.com>
> To: "CentOS mailing list" <centos@centos.org>
> Sent: Thursday, September 29, 2011 2:16:16 PM
> Subject: Re: [CentOS] add on sata card relabeling drives, installation
>
> On Thu, Sep 29, 2011 at 4:09 PM, David C. Miller
> <millerdc@fusion.gat.com> wrote:
> >
> > This type of issue is why relying on /dev/sdX is bad. Mounting
> > based on uuid or label when available is best. Unfortunately,
> > there are controller cards that present all disks as the same
> > uuid. It makes using mdadm that can only see /dev/sdX a pain to
> > use.
>
> So how do you propose getting a uuid or label on a disk in the first
> place if you can't identify which is which physically? And how do
> you
> know which to move when you want the content in some other box?
>
> --
> Les Mikesell
> lesmikesell@gmail.com

I just had to come up with a solution for this recently. Here is what I did.

I create a small 2 block partition on each disk and gave them labels that is the drives serial number when I format them as ext3/4. I dedicate the rest of the disk to Linux auto RAID. Something like this to create a label.

mkfs.ext3 -L $DRIVE_SN /dev/sd1

I then have a script that mounts the small partitions by label to a directory with the same name as the label.

mount LABEL=$DRIVE_SN /mnt/drive-check/$DRIVE_SN

So if you do a df it will show something like.

Filesystem Size Used Avail Use% Mounted on
/dev/md0 71G 3.9G 63G 6% /
tmpfs 12G 0 12G 0% /dev/shm
/dev/sdc1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03208723
/dev/sdd1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03287844
/dev/sde1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03247298
/dev/sdf1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03247844
/dev/sdg1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03674888
/dev/sdh1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03678644
/dev/sdi1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03674814
/dev/sdj1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03675850
/dev/sdk1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03675194
/dev/sdl1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03288196
/dev/sdm1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03672314
/dev/sdn1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03287843
/dev/sdo1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03674460
/dev/sdp1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03585344
/dev/sdq1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03508896
/dev/sdr1 16M 1.2M 14M 8% /mnt/drive-check/WD-WMAY03209984

Now if I'm using mdadm to make a software RAID and it is complaining /dev/sdf2 is missing. I can run my script to mount all the small partitions and the one that complains it can't mount is easily identified by the serial number. Sure I can just let the hardware RAID card handle everything but I don't trust them from past experiences seeing failed cards and corrupted arrays. With the disks seen by linux as raw block devices I can put these disks on any JBOD controller and mount my raid using mdadm. I'm not tied to a particular controller if it fails.

David.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-30-2011, 09:53 AM
Hakan Koseoglu
 
Default add on sata card relabeling drives, installation

On 29/09/11 22:19, m.roth@5-cent.us wrote:
> When I build, our PXEboot ks partitions and labels the partitions. When I
> add or replace, I make the partition, the fs, and e2label them. I've
> gotten to really appreciate labeling. I hate the UUIDs - they're
> ludicrously too long, and bear no relationship to what device they are, or
> where they go.
Although I'm a fan of labelling, for some weird reason I had seriously
weird issues with multipath SAN setups in the last couple of months. I'm
on holiday at the moment so I can't the logs up but more than once, with
multipath, labels have caused me too much headache than their worth. In
one instance the label would latch to one of the individual paths, not
the multipath and then all hell would break loose. Any suggestions on
the list are much welcome.

I haven't found a new good practice yet, UUIDs are pretty unwieldly and
no one can expect to remember one whereas a label of "database" or
"redo1" or "redo2" are just meaningful and can be parsed by a normal
human!
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-30-2011, 09:56 AM
Hakan Koseoglu
 
Default add on sata card relabeling drives, installation

Hi Les,
On 29/09/11 22:25, Les Mikesell wrote:
> On Thu, Sep 29, 2011 at 4:19 PM,<m.roth@5-cent.us> wrote:
>> When I build, our PXEboot ks partitions and labels the partitions. When I
>> add or replace, I make the partition, the fs, and e2label them. I've
>> gotten to really appreciate labeling. I hate the UUIDs - they're
>> ludicrously too long, and bear no relationship to what device they are, or
>> where they go.
>
> What happens when you move the disks around among machines? Or don't
> you ever do that after they contain data?
Why would you move disks around machines unless you're recovering them
after a failure? Then just make sure they don't exist on the recovery
server.

Maybe it's the way the machines I get involved are used, they're mostly
database servers and their lifetime are measured in 3-5 years so once
they're up and running, not a lot of people touches them. If a disk is
being moved around, it gets decomissioned and wiped out first, not after.

Also if you stick to more descriptive labels I think you'd be safe over
the long run. Just don't call all of them "data". :-)
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-30-2011, 03:41 PM
Les Mikesell
 
Default add on sata card relabeling drives, installation

On Fri, Sep 30, 2011 at 4:56 AM, Hakan Koseoglu <hakan@koseoglu.org> wrote:
>
>> What happens when you move the disks around among machines? *Or don't
>> you ever do that after they contain data?

> Why would you move disks around machines unless you're recovering them
> after a failure?

Because I can. Why wouldn't you? Mine are nearly all in swappable
carriers and it is a lot faster to move them than to ship data any
other way.

> Then just make sure they don't exist on the recovery
> server.

And how would I know that?

> Maybe it's the way the machines I get involved are used, they're mostly
> database servers and their lifetime are measured in 3-5 years so once
> they're up and running, not a lot of people touches them. If a disk is
> being moved around, it gets decomissioned and wiped out first, not after.

Some of our machines are like that, some aren't.

> Also if you stick to more descriptive labels I think you'd be safe over
> the long run. Just don't call all of them "data". :-)

That doesn't any more sense than having to label all your shipping
containers descriptively before you know what you are going to put in
them. And besides, most of the labels are applied by the installer
without user input.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-30-2011, 03:44 PM
 
Default add on sata card relabeling drives, installation

Les Mikesell wrote:
> On Fri, Sep 30, 2011 at 4:56 AM, Hakan Koseoglu <hakan@koseoglu.org>
> wrote:
>>
>>> What happens when you move the disks around among machines? *Or don't
>>> you ever do that after they contain data?
>
>> Why would you move disks around machines unless you're recovering them
>> after a failure?
>
> Because I can. Why wouldn't you? Mine are nearly all in swappable
> carriers and it is a lot faster to move them than to ship data any
> other way.
<snip>
Ok, ours go into use, and stay in their servers. Besides, we have Dells,
and Penguins (several different models), and the few Suns, and the HP, and
EVERY BLOODY MANUFACTURER not only has their own sleds, but they *change*
them....

mark, with another dozen sleds to remove and unscrew in
preparation for sanitizing....

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




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

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