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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-16-2011, 09:00 PM
"Dean Allen Provins, P. Geoph."
 
Default arbitrary disk name assignment affects dump/restore

Hello

I have used "dump" and "restore" to perform system backups for many years.
Since upgrading to Debian 6.x, I have not been able to obtain consistent and
reliable dumps for the following reason:

Sometimes. my single fixed disk is labeled as /dev/sda, but

At other times, it is labeled as /dev/sdb.

My "dump" script identifies a partition to dump by its name (i.e. /home)
or partition (i.e. /dev/sda3) depending on the dump level.

If /var/lib/dumpdates indicates that the last lower value dump was performed
on partition /dev/sda3, and the system has assigned that partition to
/dev/sda3, then all is well; however if the system has
arbitrarily labeled that partition as /dev/sdb3, then "dump" thinks that no
lower level dump was ever performed on that partition, and it attempts to
perform a level 0 (i.e. full dump) dump and the tape in my tape drive is
insufficiently long to handle that amount of data.

This means that I must NOT rely on my automatic (crontab-based) dump
scripts, but interrogate the system manually, and if necessary, alter
/var/lib/dumpdates so that the script will run properly.

This is a REAL PAIN.

Is it possible that /etc/fstab, which now identifies the partitions on my
single fixed disc via UUID labels, is an unwilling participant in this
confusion?

Should I alter /dev/fstab to indicate the partitions as it was done before
(i.e. /dev/sda1 is /, /dev/sda3 is /home etc.)?

I look forward to your analysis and recommendation.

Dean

--
Dean Provins, P. Geoph.
dprovins@alumni.ucalgary.ca
KeyID at at pgpkeys.mit.edu:11371: 0x9643AE65
Fingerprint: 9B79 75FB 5C2B 22D0 6C8C 5A87 D579 9BE5 9643 AE65


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110416210039.GA4137@ve6wvc">http://lists.debian.org/20110416210039.GA4137@ve6wvc
 
Old 04-17-2011, 08:12 AM
Andrei Popescu
 
Default arbitrary disk name assignment affects dump/restore

On Sb, 16 apr 11, 15:00:39, Dean Allen Provins, P. Geoph. wrote:
>
> This means that I must NOT rely on my automatic (crontab-based) dump
> scripts, but interrogate the system manually, and if necessary, alter
> /var/lib/dumpdates so that the script will run properly.

No, just adapt your script to use whatever symlink you like in one of:

/dev/disk/by-id/
/dev/disk/by-label/ # assuming you defined labels
/dev/disk/by-path/
/dev/disk/by-uuid/

I prefer labels since they can be set to something meaningful/mnemonic.

> This is a REAL PAIN.

Yes and no. On one hand it is a change in behaviour, OTOH, relying on
the specific order in which devices are seen by the kernel just asks for
trouble. You only need consider removable drives.

> Is it possible that /etc/fstab, which now identifies the partitions on my
> single fixed disc via UUID labels, is an unwilling participant in this
> confusion?

No

> Should I alter /dev/fstab to indicate the partitions as it was done before
> (i.e. /dev/sda1 is /, /dev/sda3 is /home etc.)?

This is likely to make your system un-bootable.

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 04-17-2011, 05:17 PM
Paul E Condon
 
Default arbitrary disk name assignment affects dump/restore

On 20110417_111214, Andrei Popescu wrote:
> On Sb, 16 apr 11, 15:00:39, Dean Allen Provins, P. Geoph. wrote:
> >
> > This means that I must NOT rely on my automatic (crontab-based) dump
> > scripts, but interrogate the system manually, and if necessary, alter
> > /var/lib/dumpdates so that the script will run properly.
>
> No, just adapt your script to use whatever symlink you like in one of:
>
> /dev/disk/by-id/
> /dev/disk/by-label/ # assuming you defined labels
> /dev/disk/by-path/
> /dev/disk/by-uuid/
>
> I prefer labels since they can be set to something meaningful/mnemonic.
>
> > This is a REAL PAIN.
>
> Yes and no. On one hand it is a change in behaviour, OTOH, relying on
> the specific order in which devices are seen by the kernel just asks for
> trouble. You only need consider removable drives.
>
> > Is it possible that /etc/fstab, which now identifies the partitions on my
> > single fixed disc via UUID labels, is an unwilling participant in this
> > confusion?
>
> No
>
> > Should I alter /dev/fstab to indicate the partitions as it was done before

To Dean,
Surely you mean /etc/fstab ;-)

You can alter /etc/fstab in a way that I have found useful for old
farts like me:

Write a label every partition on every hard disk that was referred to
(in the good old days) as /dev/hdXd or /dev/sdXd,
where X is a letter like a,b,c, ...
and d id a digit like 1,2,3, ...

Make each label have the form, plXd
where 'pl' is a fixed prefix (mnemonic for 'Partition Label')
and X and d are taken from the good old days.
(And from ls -l /dev/disk/by-uuid/ , see above)

Use the -L option in tune2fs to write these labels.

Then change /etc/fstab to use LABEL=plXd whereever it now uses

UUID="some crazy (but unique) hex string with embedded hyphens"

The important point is that each partition is identified by a
*locally* unique string that contains some internal clues for the
benefit of old farts. (UUID solves the problem of being locally
unique by being locally unique to the biosphere on Earth, which
is, IMHO, overkill.)

Of course, if in future you want to pull one of your hard disks and
install it on in a different computer, you will have to exercise some
caution. You will have to check the /dev/disk/by-* contents and fix
the labels on the disk you are moving to avoid a name clash in the
partition labels, and fix the clash before you make the required new
entries in /etc/fstab of the computer to which the disk is being
moved.

Keep in mind that the partition identifier cannot be constructed
from the mount point because the whole point of /etc/fstab is to
establish a mapping between physical partitions and mount points.

HTH

> > (i.e. /dev/sda1 is /, /dev/sda3 is /home etc.)?
>
> This is likely to make your system un-bootable.
>
> Regards,
> Andrei
> --
> Offtopic discussions among Debian users and developers:
> http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic



--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110417171745.GB867@big.lan.gnu">http://lists.debian.org/20110417171745.GB867@big.lan.gnu
 
Old 04-18-2011, 03:34 AM
Stan Hoeppner
 
Default arbitrary disk name assignment affects dump/restore

Andrei Popescu put forth on 4/17/2011 3:12 AM:

> /dev/disk/by-id/
> /dev/disk/by-label/ # assuming you defined labels
> /dev/disk/by-path/
> /dev/disk/by-uuid/
>
> I prefer labels since they can be set to something meaningful/mnemonic.

Yes, I use labels for partitions as well, more for organizational
reasons than addressing though, for example:

lrwxrwxrwx 1 root root 10 Jan 18 23:38 boot -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan 18 23:38 home -> ../../sda6
lrwxrwxrwx 1 root root 10 Jan 18 23:38 root -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 18 23:38 samba -> ../../sda7

Although to be honest, I never address them by label when running disk
or filesystem utilities, mostly due to RSI concerns, for instance:

xfs_info /dev/sda7

is much easier on the fingers than

xfs_info /dev/disk/by-label/samba

--
Stan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4DABB156.1080509@hardwarefreak.com">http://lists.debian.org/4DABB156.1080509@hardwarefreak.com
 
Old 04-18-2011, 07:17 PM
"Dean Allen Provins, P. Geoph."
 
Default arbitrary disk name assignment affects dump/restore

Andrei, Stan and Paul:

Thanks for the replies. I was unaware that "/dev/disk/*"
existed. I must have missed that lesson during the last upgrade.

I appreciate your assistance.

Regards from Calgary,

Dean

--
Dean Provins, P. Geoph.
dprovins@alumni.ucalgary.ca
KeyID at at pgpkeys.mit.edu:11371: 0x9643AE65
Fingerprint: 9B79 75FB 5C2B 22D0 6C8C 5A87 D579 9BE5 9643 AE65


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110418191757.GA4754@ve6wvc">http://lists.debian.org/20110418191757.GA4754@ve6wvc
 

Thread Tools




All times are GMT. The time now is 09:44 AM.

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