You are not logged in.

#1 2016-08-02 00:15:51

arch-toto
Member
From: Buenos Aires
Registered: 2016-07-24
Posts: 11

[SOLVED] Why Arch keeps changing partitions locations?

Hi guys

After a reboot i noticed something strange with my partitions, they changed from disk a to disk b:

from /etc/fstab I get the following:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/sda1
UUID=8766ee93-6d09-4426-8e6e-5af12ede3239	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sda2
UUID=0f2a1d40-bd8a-45bd-a94c-e8c6367b96b9	none      	swap      	defaults  	0 0

# /dev/sda3
UUID=55c0d01c-3c6f-4d4d-8dd2-bca9443ee013	/home		ext4		defaults	0 1	

# /dev/sdb1
#UUID=8766ee93-6d09-4426-8e6e-5af12ede3239	/mnt/SDB1	ext4		defaults	0 1

# /dev/sdb3
#UUID=c4ff7819-03				/mnt/SDB3	ext4		defaults	0 1

# pendrive
UUID=E697-3263 					/mnt/usbstick 	vfat 		rw,noauto,async,user 0 0

But then:

[toto@archlinux ~]$ sudo blkid
/dev/sda1: UUID="a7fe2ad2-aff8-4430-aeae-32ecb5483eee" TYPE="ext4" PARTUUID="c4ff7819-01"
/dev/sdb1: UUID="8766ee93-6d09-4426-8e6e-5af12ede3239" TYPE="ext4" PARTUUID="000391da-01"
/dev/sdb2: UUID="0f2a1d40-bd8a-45bd-a94c-e8c6367b96b9" TYPE="swap" PARTUUID="000391da-02"
/dev/sdb3: UUID="55c0d01c-3c6f-4d4d-8dd2-bca9443ee013" TYPE="ext4" PARTUUID="000391da-03"
/dev/sda2: PARTUUID="c4ff7819-02"
/dev/sda3: PARTUUID="c4ff7819-03"
[toto@archlinux ~]$ 

sda1, 2 and 3 changed to sdb1, 2 and 3 what in the god's name? Take a look at the UUIDs

This is really weird and since being new at arch confusing at the same time!!! How can this really happen?
sda and sdb are both 1tb disk each-other and I've been planning to format sbd this days but now it really got me!!!!

I hope you guys could give me some answers to this tricky mess. I've myself been surfing the web for something like this under "partition location changed" but nothing came up so far...

Thx in advanced!!!!!

Last edited by arch-toto (2016-08-02 01:54:37)

Offline

#2 2016-08-02 00:20:23

headkase
Member
Registered: 2011-12-06
Posts: 2,008

Re: [SOLVED] Why Arch keeps changing partitions locations?

It can only be attributable to human error.  This sort of thing has cropped up before and it has always been attributable to human error.

(In your FSTAB don't use the same UUID for different mount points for starters).

Offline

#3 2016-08-02 00:29:14

arch-toto
Member
From: Buenos Aires
Registered: 2016-07-24
Posts: 11

Re: [SOLVED] Why Arch keeps changing partitions locations?

headkase wrote:

It can only be attributable to human error.  This sort of thing has cropped up before and it has always been attributable to human error.

(In your FSTAB don't use the same UUID for different mount points for starters).

Thx for your replay but I think I'm not getting what you said!!! If you take a close look I never used the same UUID twice!!!

How can take every UUID from disk sda and assign it to disk sdb?

Could you please clarify your point?

Thank you again!!!!

Last edited by arch-toto (2016-08-02 00:30:48)

Offline

#4 2016-08-02 00:35:46

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [SOLVED] Why Arch keeps changing partitions locations?

Don't /devsda1 and /dev/sdb1 have the same UUID in your fstab listed above?


Matt

"It is very difficult to educate the educated."

Offline

#5 2016-08-02 00:39:40

headkase
Member
Registered: 2011-12-06
Posts: 2,008

Re: [SOLVED] Why Arch keeps changing partitions locations?

Ah, I missed the # in front of the duplicate entry.

Your "sdX" is determined by the kernel.  Usually by which plugs the drives are physically connected to inside the case.  UUID's will always map the correct partitions regardless of which physical drive they reside on.  If you look at your original FSTAB, the "/dev/sdX" lines are commented out which means they have zero bearing on the drive the kernel sees them on.

If everything works then don't care about it.  If you want to try it open your computer case, while powered off and unplugged, and swap the two hard drive cables then boot again.  Your drives will still mount correctly, because they use UUID's, but likely the sdX naming will differ.

Offline

#6 2016-08-02 00:43:38

arch-toto
Member
From: Buenos Aires
Registered: 2016-07-24
Posts: 11

Re: [SOLVED] Why Arch keeps changing partitions locations?

mrunion wrote:

Don't /devsda1 and /dev/sdb1 have the same UUID in your fstab listed above?

Yeah but sdb1 is commented!!!! it shouldn't matter right?

I un-commented it a few days ago to check out the content of the partition but after that commented it again. Could have that caused the error?

I think I'm gonna just unplug one of the disks to check which one is left... what you think?

Offline

#7 2016-08-02 01:06:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Why Arch keeps changing partitions locations?

There's no need for all the exclamation points.  There is a need to take some time digesting the replies you've received:  specifically post #5.  You can assume - for the present purposes - that sda/sdb are assigned randomly two the two disks at boot time.  Whether the disk with the partitions you mount in fstab is considered sda or sdb is of no consequence.  Wondering why that disk was sda for some time and is now sdb is like wondering why after rolling three 6s in a row on a fair dice that you then roll a 4.  Odd isn't it, that it changed from 6 to 4 ... no, not odd at all.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2016-08-02 01:08:00

arch-toto
Member
From: Buenos Aires
Registered: 2016-07-24
Posts: 11

Re: [SOLVED] Why Arch keeps changing partitions locations?

headkase wrote:

Ah, I missed the # in front of the duplicate entry.

Your "sdX" is determined by the kernel.  Usually by which plugs the drives are physically connected to inside the case.  UUID's will always map the correct partitions regardless of which physical drive they reside on.  If you look at your original FSTAB, the "/dev/sdX" lines are commented out which means they have zero bearing on the drive the kernel sees them on.

If everything works then don't care about it.  If you want to try it open your computer case, while powered off and unplugged, and swap the two hard drive cables then boot again.  Your drives will still mount correctly, because they use UUID's, but likely the sdX naming will differ.

Ok, so I unplugged the disk in the lowest try inside the case and after rebooting I got this:

[toto@archlinux ~]$ sudo blkid
[sudo] password for toto: 
/dev/sda1: UUID="8766ee93-6d09-4426-8e6e-5af12ede3239" TYPE="ext4" PARTUUID="000391da-01"
/dev/sda2: UUID="0f2a1d40-bd8a-45bd-a94c-e8c6367b96b9" TYPE="swap" PARTUUID="000391da-02"
/dev/sda3: UUID="55c0d01c-3c6f-4d4d-8dd2-bca9443ee013" TYPE="ext4" PARTUUID="000391da-03"
[toto@archlinux ~]$ 

Partitions got back to their original state.... so my point is HOW can I possibly format on of these partitions any day if they constantly change ther locations?
Let's say (and already happened to me)
today i wanna format /dev/sdb1 THINKING it's a non-use partitions but ACTUALLY NOW (without my knowledge) is where my / partition is located (this happened to me while installing arch causing me to loose 1tb of information).

thx again dude!!!!

Offline

#9 2016-08-02 01:10:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Why Arch keeps changing partitions locations?

arch-toto wrote:

HOW can I possibly format on of these partitions any day if they constantly change ther locations?

Just check where they are.  Again, those block device names are assigned "randomly" at boot time.  But once assigned, they don't change while the system is running.

Always check (and double, and triple check) which device you are actually formatting.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2016-08-02 01:12:15

headkase
Member
Registered: 2011-12-06
Posts: 2,008

Re: [SOLVED] Why Arch keeps changing partitions locations?

You're welcome.  Before I do anything related to drives (usually just before I'm about to use data destroyer, er, dd), I list what the computer sees:

lsblk -fs

No need for root for that command, regular user works fine.

Offline

#11 2016-08-02 01:23:07

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Why Arch keeps changing partitions locations?

Use /dev/disk/by-id/


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#12 2016-08-02 01:53:30

arch-toto
Member
From: Buenos Aires
Registered: 2016-07-24
Posts: 11

Re: [SOLVED] Why Arch keeps changing partitions locations?

Ok guys, thank you again for all your replies!
I know this was a newbie linux question more than an arch newbie question but really never happened me before!

And sorry for the extra > !

Last edited by arch-toto (2016-08-02 12:20:21)

Offline

Board footer

Powered by FluxBB