Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Help, need file perm list please
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ohmster  
View profile  
 More options Feb 6, 1:57 am
Newsgroups: alt.os.linux
From: Ohmster <r...@dev.nul.invalid>
Date: Mon, 06 Feb 2012 00:57:10 -0600
Local: Mon, Feb 6 2012 1:57 am
Subject: [CentOS 6.2] Help, need file perm list please

Okay, it was late, I did something really, really stupid, and although I
have it somewhat cleaned up, I will never get this back without help.

What I did: Opened an ssh term window to my beautiful new CentOS 6.2
system and became root user, to save time instead of using sudo for
getting my web server setup. Yeah, I did "su-" and gave the password to
get a full # prompt. This is not so bad if used judiciously, but it was
late and I was tired.

I wanted to open up my root ftp and web for public use and instead of
changing perms on the html and ftp directories, like a total dumbass I
did this, from the root filesystem. "/"

#chgrp -R ohmster var
#chmod -R 755 var

OMG! What have I done?! Yep, messed it up quite bad. Fixed most of it
with some reset gid and permission with rpm commands, but not all of it.

These web pages got me pretty far, especially the first one.

http://www.cyberciti.biz/tips/reset-rhel-centos-fedora-package-file-
permission.html

http://wiki.centos.org/TipsAndTricks/YumAndRPM#head-
20a3ecce3d0762b9cdd3307ef2632e0c274a2bfd

They tell how to use rpm to reset the permissions of the all installed
RPM packages. I did both as root and this helped, a LOT, but I could not
even use locate as a non-root user because the perms were just not right.
Access to the locate database denied. For the time being I gave 777
permission to /var/lib/mlocate. It works now, but I am ready to cry about
this, I had it all so perfect and had not worked out a backup of the
system yet. (Money is tight, I need at least a 500Gb to 1Tb drive, either
internal or external to backup to.)

I googled all over, just trying to find a basic CentOS-Fedora-RHEL system
map of what the ownership, groups, and permissions are in the /var tree
to no luck. I found how to generate one (although it prints to the
screen, putting a > varperm.txt did not allow the command to run.

Can someone, anyone, with a CentOS 6.2 or anything similar, please,
PLEASE make me a map of their /var tree? I found out how to do it from
this webpage, apparently this really dumb mistake is not all that
uncommon.
http://www.linuxquestions.org/questions/linux-software-2/restoring-var-
permissions-472421/

Find someone with a similar distro installed and run this:
# ls -alR /var

This prints out every directory, file, and link, with owner, group, and
permissions. It prints the whole mess to the screen. I do not know why a
redirect with a > would not save it to a file, but maybe one of you guys
know how?

I need this list PLEASE. Then if I have to, I can restore all perms and
groups by hand, even if it takes a long time. Without it, I am sunk.(I    
tried doing this by hand with my old FC16 system disk, but that was a 4
distro amalgamated mess and things were just not the same.)

I got a lot on my mind right now, personal issues. My brother is stuck in
Panama because the indians shut down all roads to force the government to
give them ALL mineral rights so he is a hostage in a foreign country for
a few days already, unemployed and doing anything I can to try and get
all bills paid, and have health issues. So tie me to a steak and throw
rocks if you must, but can you at least make them very, very small rocks?
(...please? Or maybe some foam packing peanuts would be nice.) Thank you.

(Email address in sig works if you do not or would rather not print your
var system map in Usenet.)

--
~Ohmster | ohmster59 /a/t/ gmail dot com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jasen Betts  
View profile  
 More options Feb 6, 5:54 am
Newsgroups: alt.os.linux
From: Jasen Betts <ja...@xnet.co.nz>
Date: 6 Feb 2012 10:54:02 GMT
Local: Mon, Feb 6 2012 5:54 am
Subject: Re: [CentOS 6.2] Help, need file perm list please
On 2012-02-06, Ohmster <r...@dev.nul.invalid> wrote:

> Can someone, anyone, with a CentOS 6.2 or anything similar, please,
> PLEASE make me a map of their /var tree? I found out how to do it from
> this webpage, apparently this really dumb mistake is not all that
> uncommon.
> http://www.linuxquestions.org/questions/linux-software-2/restoring-var-
> permissions-472421/

> Find someone with a similar distro installed and run this:
> # ls -alR /var

reformat your swap or /tmp partition and do an exploritory OS install
there.

--
⚂⚃ 100% natural

--- Posted via news://freenews.netfront.net/ - Complaints to n...@netfront.net ---


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan C  
View profile  
 More options Feb 6, 8:55 am
Newsgroups: alt.os.linux
From: Dan C <youmustbejok...@lan.invalid>
Date: 06 Feb 2012 13:55:07 GMT
Local: Mon, Feb 6 2012 8:55 am
Subject: Re: [CentOS 6.2] Help, need file perm list please

You will never get it right again, and worse, you'll never know if it's
right or not, and will have security issues.

Since you said it was a "new" install, just re-install and try to keep
your head out of your ass next time.

--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
"Bother!" said Pooh, as the woodpecker approached his hot-air balloon.
Usenet Improvement Project: http://twovoyagers.com/improve-usenet.org/
Thanks, Obama: http://brandybuck.site40.net/pics/politica/thanks.jpg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ohmster  
View profile  
 More options Feb 6, 2:09 pm
Newsgroups: alt.os.linux
From: Ohmster <r...@dev.nul.invalid>
Date: Mon, 06 Feb 2012 13:09:09 -0600
Local: Mon, Feb 6 2012 2:09 pm
Subject: Re: [CentOS 6.2] Help, need file perm list please
Jasen Betts <ja...@xnet.co.nz> wrote in news:jgobga$l1j$5
@reversiblemaps.ath.cx:

> reformat your swap or /tmp partition and do an exploritory OS install
> there.

Hmmm, I do not think there is enough room in the swap partition for that. I
do have a spare 200Gb disk that is empty. I could install it there, but, it
might not work for the exisiting installation.

I will probably have to do what Dan said and just "bite it" and do a
reinstall. I got almost two months into this thing and it is really just
the way I want it. It probably won't ever be "quite" right if I don't. A
var tree map with a complete ls -laR would do it, or get it close enough to
be okay. Doesn't look like I will get one, might be personal info in such a
file and who would do it? Not everybody has a system like mine and if their
hardware were different, it still could be an excersise in futility.

Thanks for the idea, I might still try it with my other drive, I have to
think about it. My system drive is SATA and the other drive is IDE. Might
not work. Prior to reinstalling, I might try vaporizing the var dir and
seeing if an "upgrade install" would put it back.

--
~Ohmster | ohmster59 /a/t/ gmail dot com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J G Miller  
View profile  
 More options Feb 6, 2:36 pm
Newsgroups: alt.os.linux
From: J G Miller <mil...@yoyo.ORG>
Date: Mon, 6 Feb 2012 19:36:03 +0000 (UTC)
Local: Mon, Feb 6 2012 2:36 pm
Subject: Re: [CentOS 6.2] Help, need file perm list please

On Monday, February 6th, 2012, at 13:09:09h -0600, Ohmster wrote:
> I will probably have to do what Dan said and just "bite it" and do a
> reinstall.

What happened to your last backup of /var ?

And since you have your rpmdb still intact, just getting a list
of packages which have directories in /var should not be too
difficult to reset the permission and ownership appropriately.

Most of the stuff in /var is owned by root:root so that should
be the first thing you do a chgrp -R root /var, directories
to 755 and files to 644 and then adjust individual cases as
appropriate.

Where it gets tricky is thing like bind9 which may need group
ownership to bind or named, but you give the impression that
you do not have such in depth knowledge.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bit Twister  
View profile  
 More options Feb 6, 4:45 pm
Newsgroups: alt.os.linux
From: Bit Twister <BitTwis...@mouse-potato.com>
Date: Mon, 6 Feb 2012 21:45:39 +0000 (UTC)
Local: Mon, Feb 6 2012 4:45 pm
Subject: Re: [CentOS 6.2] Help, need file perm list please

On Mon, 06 Feb 2012 13:09:09 -0600, Ohmster wrote:
> I will probably have to do what Dan said and just "bite it" and do a
> reinstall. I got almost two months into this thing and it is really just
> the way I want it. It probably won't ever be "quite" right if I
> don't.

I put all my tweaks into install/change scripts.
That allows me to do the clean install, run the scripts and I am done.

My scripts copy whatever to whatever_vinstall, and if whatever_vorig
does not exists, make a copy, then fold in my changes into whatever.

Add a -i switch to the script and it can copy whatever_vorig back to
whatever and you can see if your changes are causing any grief operational wise.
Those files also come in handy to see what has changed since their creation.

If a new config file is released, rpm distros create whatever.rpmnew.
In those cases I run mv whatever.rpmnew, whatever_vorig, change_script -i,
change_script and my changes are folded back in.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ohmster  
View profile  
 More options Mar 5, 3:03 am
Newsgroups: alt.os.linux
From: Ohmster <r...@dev.nul.invalid>
Date: Mon, 05 Mar 2012 02:03:56 -0600
Local: Mon, Mar 5 2012 3:03 am
Subject: Re: [CentOS 6.2] Help, need file perm list please
J G Miller <mil...@yoyo.ORG> wrote in news:jgpa33$7iq$1@dont-email.me:

> On Monday, February 6th, 2012, at 13:09:09h -0600, Ohmster wrote:

>> I will probably have to do what Dan said and just "bite it" and do a
>> reinstall.

I did not reinstall. Someone really nice send me a full ls -la to file
list but from a 64 bit CentOS 6.2 without servers like ftp. Still, that,
plus common knowledge as you describe in last paragraph got me through
this, my system works great.  

> What happened to your last backup of /var ?

I do not have a "last backup". Still getting the hang of CentOS 6.2 and
like it a lot. Although I have been doing Linux full time (Always have a
full time learning machine w/desktop/servers/FQDNs, I am still not an
expert on Linux as I wish to be. Stuff like surviving while living alone,
over 50, no permenent employment, get in the way of having the time to
play and learn Linux like I want to. Plus I can only absorb so much at a
time before my eyes glaze over and then learning stops.

I really, really need help, someone to write for me a shell script that I
can cron to backup my system to an extra, empty 400Gb IDE disk. Maybe
with rsynch and how to restore it or pluck files from it. I should be
doing this on my own but must admit I lack the skill and confidence to do
it.

Before I can do this, I have an issue to keep an eye on. My fstab is
setup to mount my 200 and 400Gb empty IDE hard disks as such:

#
# /etc/fstab
# Created by anaconda on Thu Jan  5 03:04:31 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more
info
#
/dev/mapper/vg_paulspcworks-lv_root /     ext4    defaults        1 1

UUID=fd5c8860-9966-4743-9e95-33accbdff2a5 /boot    ext4    defaults        
1 2

/dev/mapper/vg_paulspcworks-lv_home /home    ext4    defaults        1 2

/dev/mapper/vg_paulspcworks-lv_swap swap  swap    defaults      0 0
tmpfs                   /dev/shm                tmpfs   defaults        0
0
devpts                  /dev/pts                devpts  gid=5,mode=620  0
0
sysfs                   /sys                    sysfs   defaults        0
0
proc                    /proc                   proc    defaults        0
0
/dev/sdb1  /mnt/400_Disk  ext4  defaults  0  0
/dev/sdc1  /mnt/200_Disk  ext4  defaults  0  0

(I instered a line break where word wrap would fold a line.)

Much of the time, this works. But this LVM stuff is driving me bats. My
home, /, and swap partitions are LVM on the same SATA 500Gb drive.
/dev/mapper points them with symlinks to /dev/dm-0 through dm-2. /boot is
an Linux file system on /devv/sda1. Boot is not a location but some sort
of UUID that I confess to be clueless about. It is on some disk,
somewhere. Probably /dev/sda since that is currently my LVM Linux drive
at this time. Yeah, boot is on sda1, revealed by fdisk.

Contents of /dev/mapper:
58 Mar  1 19:32 control
 7 Mar  1 19:32 vg_paulspcworks-lv_home -> ../dm-2
 7 Mar  1 19:32 vg_paulspcworks-lv_root -> ../dm-0
 7 Mar  1 19:32 vg_paulspcworks-lv_swap -> ../dm-1

Somehow these dm files point to sda-0 through sda=2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       60802   487873536   8e  Linux LVM
Partition 2 does not end on cylinder boundary.

My issue is that sometimes when I boot, the 500Gb system SATA drive ends
up assigned to a different drive than /dev/sda and when this happens, the
system runs fine but I have no access to the 200 and/or 400Gb IDE disks
because the system drive takes sdb or sdc. If the darned system would
just stay the efff on /dev/sda, all would be peachy and I could work on a
backup system, but this LVM hopping from disk to disk at each boot is
making me nuts.

This /dev/mappper to /dev/dmx to sdx is driving me nuts. Why the eff
can't CentOS assign the darned system disk to a particular dev drive
spec, use it all the time, so I could fstab my extra drives and know they
will be right where they should be. I know this to be true because I
installed an alias 400 & 200 to "cd /mnt/400_Disk and when I use the
alias to get there, open in nautilus, or just go there manually, I do not
see the stuff I expect, using the GUI Disk Utility, I can see that the
drives have moved, all because of the LVM stuff NOT being assinged as a
hard link or setting to a particular device.

I perfectly understand my fstab at the point of tmpfs /dev/shm perfectly
and from that point down. It is what is above it that makes it impossible
to setup or work on a backup until I can assure that my 500gb LVM SATA
system disk will always be assigned to /dev/sda.

> And since you have your rpmdb still intact, just getting a list
> of packages which have directories in /var should not be too
> difficult to reset the permission and ownership appropriately.

> Most of the stuff in /var is owned by root:root so that should
> be the first thing you do a chgrp -R root /var, directories
> to 755 and files to 644 and then adjust individual cases as
> appropriate.

> Where it gets tricky is thing like bind9 which may need group
> ownership to bind or named, but you give the impression that
> you do not have such in depth knowledge.

Like I said, /var and it's subs is pretty much alright now and I have no
apparent issues to clean up so far as I know. Having a real ls -la root
through the entire /var/ directory file would be bitching on an Intel 32
bit box with servers installed, but I am thankful for what I got.

JG, you ask hard for me questions at times but you are very sincere in
your desire to help, and I really appreciate that buddy. Many of the
people in here teach you something once and expect you to remember
something you hardly ever use for years or to suddenly know all there is
to know about Linux and get a tad "testy" when the same user comes back
with the same or similar questions years later. You, aho, and bit twister
have *never* done that, you either help when you can, or skip the post if
you cannot. You do not flame other than put me on the spot when I have it
coming to me.

Steve Ackerman was a great assett, he rolled up his sleaves, took out an
old Linux box with an nvidia card in it, and at that time, Fedora would
not give good kernel headers anymore, rendering true nvidia driver
installs impossible. He did find a somewhat lengthly workaround and it
worked perfectly, but I think he considers his dues paid and now is
distant. Shame, great and intelligent guy. I will miss him.

Oh Gawd, late, and I have taxes, county health, my best customer's brand
new DSL modem must be provisioned to work on his account,  attorneys, and
other issues to deal with tomorrow, must go to bed now, will post an
easy, quick, strange (to me) DIRCOLORS question and call it a night.

--
~Ohmster | ohmster59 /a/t/ gmail dot com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ohmster  
View profile  
 More options Mar 5, 3:08 am
Newsgroups: alt.os.linux
From: Ohmster <r...@dev.nul.invalid>
Date: Mon, 05 Mar 2012 02:08:13 -0600
Local: Mon, Mar 5 2012 3:08 am
Subject: Re: [CentOS 6.2] Help, need file perm list please
Bit Twister <BitTwis...@mouse-potato.com> wrote in
news:slrnjj0ig3.lnv.BitTwister@wb.home.test:

> I put all my tweaks into install/change scripts.
> That allows me to do the clean install, run the scripts and I am done.

[..]

Late, too tired to read this now, marking as unread and will come back to
it. Thank you very, very much Bit Twister. I have an interesting file,
fstab, and backup script question in my JG Miller reply that you should
read.

Message-ID: <XnsA00D1F1D82728MyBigKitty@216.196.97.131>

Thank you my friend. Goodnight.

--
~Ohmster | ohmster59 /a/t/ gmail dot com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ohmster  
View profile  
 More options Mar 5, 3:25 am
Newsgroups: alt.os.linux
From: Ohmster <r...@dev.nul.invalid>
Date: Mon, 05 Mar 2012 02:25:11 -0600
Local: Mon, Mar 5 2012 3:25 am
Subject: Re: [CentOS 6.2] Help, need file perm list please
Steve Ackman <st...@SNIP-THIS.twoloonscoffee.com> wrote in
news:slrnjj56n9.iik.steve@wizard.dyndns.org:

>   Just do a barebones install on a 4MB flash drive.  
> You'll have your list then.

Steve, you're back! You saved my ass by digging out and old fedora box
with an nivida card, rolling up your sleeves and figuring out how to
install nvidia drivers when fedora stopped giving decent kernel headers!

I thought you were fed up with me and ingnoring me. Oh what a relief! You
are one of the few/several people in here that I admire, respect, and
listen to.

That is such a good idea, I did not even think of it. I am on the poverty
line for probably the next year, wanted a 10Gb flash drive, and the only
place open at that time was Walgreens. They wanted $15 for a 2Gb Sandisk.
Kidding me, right? I got an 8Gb Sandisk Cruzer on the way from amazon.com
for $2.79.

One tool I find *very* useful is an Ubuntu Live Disc to rescue customer
data files from virused out or ruined boot sector Windows 7 drives.
Ubuntu boots right to desktop, mounts the Windows 7 hard disk, eveything
works, network, wireless, video and sound, and I can plug in a big USB
drive and copy files over.

I know of no "Live Windows 7" discs but have always used Hiren's boot CD
to run "Mini Windows XP" and that thing sucks. I plug in any USB drive
and it reports it as a 2Gb drive, out of disk space when copying 12Gb of
data to an 80Gb USB hard disk! Also NONE of the nework, sound, or other
stuff work "out of the box" in the mini XP boot disc on Hiren's Disc.
Ubuntu Live has everything I need, even a full set of LVM tools plus
desktop or CLI. Gotta love it. So my intentions are to make a dual boot
Ubuntu 64 and 32 bit live disk on a USB stick. Since these brand new
amazon.com jump drives are so cheap, I will order one or two more to
experiment with and do your suggestion of reinstalling my exact setup to
USB drive, if possible with CentOS 6.2 to lean ALL the right permissions.
With proftpd and httpd servers to complete my var permision and ownership
issues. So far, I have them all worked out quite well and everything
works by following some commone sense stuff thanks to JG Miller.

Message-ID: <XnsA00D1F1D82728MyBigKi...@216.196.97.131>

Thanks for the answer Steve, it is great to see you back. I copied your
auto FAQ poster to my cron list because it works so good. Goodnight.

--
~Ohmster | ohmster59 /a/t/ gmail dot com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
crankypuss  
View profile  
 More options Mar 5, 5:19 am
Newsgroups: alt.os.linux
From: crankypuss <n...@email.thanks>
Date: Mon, 05 Mar 2012 03:19:19 -0700
Local: Mon, Mar 5 2012 5:19 am
Subject: Re: [CentOS 6.2] Help, need file perm list please
On 03/05/2012 01:03 AM, Ohmster wrote:

> I really, really need help, someone to write for me a shell script that I
> can cron to backup my system to an extra, empty 400Gb IDE disk. Maybe
> with rsynch and how to restore it or pluck files from it. I should be
> doing this on my own but must admit I lack the skill and confidence to do
> it.

I'm not sure if you really want a cron job doing that... maybe,
depending on when it runs, it would be okay.  But if you happen to be
changing a lot of files when it runs that could cause problems.  There
ought to be some way to lock the source filesystem while you're backing
up, but I'm new to Linux so I just do tar backups when I'm about to
power down my netbook and use remastersys to make a bootable copy when
things have changed sufficiently.  Not the same as a system you leave
running all the time, especially some kind of server.

The dd command will copy one partition to another, for example "dd
if=/dev/sda1 of=/dev/sda2" would copy one partition to another.  Or if
you want to get fancier you can format the target partition and use cp,
or you can use tar.  There might be something like the old Norton Ghost
that would be useful to you.  A little digging around with google or the
man pages might turn up just what you need to know, but choosing a
backup methodology is nearly as personal as choosing a text editor.

> Boot is not a location but some sort
> of UUID that I confess to be clueless about. It is on some disk,
> somewhere. Probably /dev/sda since that is currently my LVM Linux drive
> at this time. Yeah, boot is on sda1, revealed by fdisk.

The UUID is a unique identifier based on magical stuff... probably the
creation time to microseconds plus some disk geometry stuff... I don't
know how it's created (check google if it matters), but if you go into
gparted and right-click on a partition and select "information" from the
menu, it will show you a bunch of stuff including that partition's UUID.

Identifying partitions to mount by device (ie, "/dev/sda2") is
relatively error-prone.  If you create or delete a partition they get
renumbered, sometimes in ways that are not obvious from the outside, and
I suspect having only to do with the order of entries within the
partition table.  Mounting by UUID is much more solid, the UUID doesn't
change unless you work some heavy mojo on the partition, like delete it
and recreate it.  Updating your fstab by looking at the UUID's shown in
gparted (or other tools I suppose) should clear up this particular problem.

> This /dev/mappper to /dev/dmx to sdx is driving me nuts. Why the eff
> can't CentOS assign the darned system disk to a particular dev drive
> spec, use it all the time, so I could fstab my extra drives and know they
> will be right where they should be.

If you use UUIDs for the mounts described in fstab, they'll hold still.

> I perfectly understand my fstab at the point of tmpfs /dev/shm perfectly
> and from that point down. It is what is above it that makes it impossible
> to setup or work on a backup until I can assure that my 500gb LVM SATA
> system disk will always be assigned to /dev/sda.

Don't count on /dev/sda unless you absolutely can't avoid it.  And
beware of mounting by label because labels aren't "guaranteed" unique
like UUIDs are.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David W. Hodgins  
View profile  
 More options Mar 5, 1:32 pm
Newsgroups: alt.os.linux
From: "David W. Hodgins" <dwhodg...@nomail.afraid.org>
Date: Mon, 05 Mar 2012 13:32:40 -0500
Local: Mon, Mar 5 2012 1:32 pm
Subject: Re: [CentOS 6.2] Help, need file perm list please

On Mon, 05 Mar 2012 03:03:56 -0500, Ohmster <r...@dev.nul.invalid> wrote:
> My issue is that sometimes when I boot, the 500Gb system SATA drive ends
> up assigned to a different drive than /dev/sda and when this happens, the

That is the reason uuids are used to identify filesystems, as with sata
drives the order of startup cannot be guaranteed to be consistent.

The uuid can either be based on random data, or current time.  See
man uuidgen for the options.

The uuid is created when the filesystem is formatted, although you
can specify the uuid to use.  See man mkfs.ext4.

Be aware that if you use dd or similar sector level copying utilites
to copy a drive or filesystem, you will have duplicate uuids present
in the system, and which copy of the filesystem will get used on a
reboot or mount, cannot be guaranteed.

If you do make a copy of a filesystem (or drive), and intend to keep
that copy connected to the system, you should alter the uuids on the
copy before rebooting.  See man tune2fs.

Note that if you use dd to copy an entire drive, you will also end
up with duplicate disk signatures in the mbr of the drives, which
will prevent booting, if you're using lilo.  If you do use dd to
copy a drive, you'll have to use a hex editor to modify the signature
in the copy of the mbr.  For the layout of the mbr, see
  http://en.wikipedia.org/wiki/Master_boot_record

I prefer to use labels in /etc/fstab and /boot/grub/menu.lst,
although it's up to you to ensure the labels are unique.

You currently have sda1 as type ext4.  I'd run
"tune2fs -L myboot /dev/sda1" and then replace /dev/sda1 with
LABEL=myboot in /etc/fstab and your boot loader configuration.

Replace myboot with whatever you want, just make sure it will
be unique.

Regarding lvm, you currently have
/dev/sda2              64       60802   487873536   8e  Linux LVM

That is one lvm physical volume, which has been assigned to the
lvm volume group vg_paulspcworks-lv.

Within the volume group, you have three logical volumes called
home root and swap.  For the home and root, you can assign
labels with the tuen2fs command.  For the swap filesystem,
use "swaplabel -L myswap".

To see the label (if present), the uuid, and filesystem type, of all
of your partitions, run the blkid command without any parameters.

For the backup filesystems ...
/dev/sdb1  /mnt/400_Disk  ext4  defaults  0  0
/dev/sdc1  /mnt/200_Disk  ext4  defaults  0  0

As they are both ext4, "tune2fs -L my400 /dev/sdb1" and
"tune2fs -L my200 /dev/sdc1", and then replace the /dev/sdb1
with LABEL=my400, etc.

Note that labels are restricted to 16 characters.

See http://tldp.org/HOWTO/LVM-HOWTO/ for more info on lvm.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »