Wrong Disk names (solved)

We need to look at this one

Wrong Disk names (solved)

Postby SBP » Thu Sep 27, 2012 7:05 pm

Hi somehow FoxyRoxy seems to have switched the names of my two USB disks.

I have a USB Stick which have LMSData partition it is a 4 GB USB Stick
And I have a SeaGate FreeAgent HDD 1 TB with my music and video files.

I have been trying different USB-sticks when I wrote the How-to for installation of the LMS server and rebooted several times, but now after a reboot the names of the two attached USB devices is switched.

The 1TB HDD is now called LMSData, but it contains the music and video files, whereas the 4 GB USB-stic is called Seagate_Freeagent_Go_2GE957HB but it contains the configuration and log files in the Squeezeboxserver directory
disk.png
disk.png (123.26 KiB) Viewed 8716 times


How is this possible, and what can I do?
SBP
 
Posts: 74
Joined: Thu Aug 16, 2012 5:27 am
Location: Denmark

Re: Wrong Disk names

Postby jbv » Thu Sep 27, 2012 9:41 pm

Hi Steen,

Do you mean the Volume Label ?
As in, Seagate_Freeagent_Go_2GE957HB

If so, then I do not know of anything in FoxyRoxyLinux that can change this without you instructing it to.
To the best of my knowledge, none of the scripts or services have any capability to rename or change volume labels.

Regards, Brenton
jbv
 
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Re: Wrong Disk names

Postby saintless » Fri Sep 28, 2012 5:45 am

Hi, Steen,

when you insert usb stick it gets auto-mount using mount point in /media folder from 0-7 (if I don't mistake). It will get the first free device from 0-7. It depends which mount point number is free to use when you insert usb stick.
The name of the usb device and the label will appear in /etc/mtab file. You can see this in /live/cow/etc/mtab
This file should not contain any information about mounted usb stick if there is no usb stick inserted.
Just insert one usb and check out /live/cow/mtab file, Then remove it and insert another one and check out the file again.
It is possible if you made a snapshot with one or both USB sticks inserted the information in /etc/mtab will stay there after reboot and could cause such a confusion.
Just a theory to check out if this is the case.

Cheers
User avatar
saintless
 
Posts: 246
Joined: Sat Jul 14, 2012 7:01 am
Location: Bulgaria

Re: Wrong Disk names

Postby jbv » Fri Sep 28, 2012 7:15 am

Good call Toni. As I am often shooting stuff to you for testing, I instinctively remove /etc/mtab and similar files so they don't create issues.

However, I am a little confused as Steen's question implies that FoxyRoxyLinux has changed the volume label. Having been in this game for as long as I have, I know that I can never use the word "impossible", so in stead I will simply say, "improbable". Even if a snapshot was taken that saved /etc/mtab, I would expect that FoxyRoxy would sort that out on a restart, although I guess if both sticks were inserted at power-up, it is possible that the mtab file has created some confusion.

Hopefully, Steen can report back once he has worked out what went screwy. It is very unlikely that a volume label has been changed, but it is not beyond the realm of possibility that something get screwed-up on the restart.
jbv
 
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Re: Wrong Disk names

Postby KazzaMozz » Fri Sep 28, 2012 9:46 am

Hi Guys
I know it's possible well at least it is in Saluki, however the problem there was I had two usbs with the same label name. It screwed Saluki up big time.
Now with all of my tests I have never had the issue that Steen has had. He has totally different names so this can't be his problem.
Now if he was to insert his sticks or External USB drive halfway through a startup I can guarantee this will cause it to have a hiccup.
cheers
Kazza
User avatar
KazzaMozz
 
Posts: 332
Joined: Tue Aug 21, 2012 9:59 pm
Location: Australia

Re: Wrong Disk names

Postby jbv » Fri Sep 28, 2012 9:58 am

Clever girl Kazza,

I have had very strange stuff occur while booting from USB sticks (which is the only configuration I use). At the beginning, I thought that the bootable USB device was chosen at random. However, Steen has explained that there is one "root" USB device that will always be the boot device. In my scenario using a Gigabyte GA-D525TUD (as you do) I think this turns out to be a front-panel (internal) USB port, which we can't access without a "front-port-adapter" or "panel" which I will make before I go live ... Until then, I can assure everyone that I have not, and will not make any tweaks or changes to my primary test system. I have made a conscious decision to not do this, so that i run the highest risk of seeing all of the warts and issues before you do.

Your thought that both USB sticks could have the same volume label, whilst on one-hand being quite unlikely, yet on the other, being quite probable, are easily solved, by not being a dick :)

I don't think this is what has bitten Steen though.
If anything, I think this will turn out to be a "whoops ... my bad" type scenario :)

Cheers, Brenton
jbv
 
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Re: Wrong Disk names

Postby KazzaMozz » Fri Sep 28, 2012 10:10 am

Hello there
by not being a dick

This was an unfortunate issue as I was fixing someone elses drives. Only to find they had named both of them with the same label. "why" :evil: Yep they were and still are dicks. Anyway it gave me a heads up on problems it can cause. :lol: :lol: Trust me it happens. :roll:
Sorted it out but now know it can cause an issue. Why on earth you would give a drive the same name I will never know. Anyway it happens with end users so be aware.
Cheers
Kazza
User avatar
KazzaMozz
 
Posts: 332
Joined: Tue Aug 21, 2012 9:59 pm
Location: Australia

Re: Wrong Disk names

Postby SBP » Fri Sep 28, 2012 5:04 pm

jbv wrote:"whoops ... my bad" type scenario :)

Cheers, Brenton


Ok who's bad? yours or mine :-)

You are right, I have one front USB-port which always boot the FoxyRoxy system - no problem.

Next I tried to reboot with only USB-stick "LMSData" attached, and now you can see that FoxyRoxy sees the correct USB-stick, the name is correct "LMSDAta" and the content is correct.
without HDD.png
without HDD.png (227.69 KiB) Viewed 8697 times


What concerns me is that the Seagate_Freeagent HDD is not attached, but none-the-less it is still shown on the screen?

Then I just pluged in the Seagate_Freeagent HDD, and FoxyRoxy now correctly populate it, and the correct content is shown on both the "LMSDAta" and the "Seagate_Freeagent" drive, see here:
HDD plugged.png
HDD plugged.png (231.87 KiB) Viewed 8697 times



Then I just made a reboot, with both drives left untouched and now the problem is back, The wrong content (or the wrong name of the disk)
Both reboot.png
Both reboot.png (239.08 KiB) Viewed 8697 times




This is the content of MTAB after a reboot with both drives present during reboot, and where I have the wrong content on the wrong disc:
aufs / aufs rw 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/sdb1 /live/image vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=mixed,errors=remount-ro 0 0
tmpfs /live/cow tmpfs rw,noatime,mode=755 0 0
tmpfs /live tmpfs rw,relatime 0 0
/dev/sdd1 /media/Seagate_FreeAgent_Go_2GE957HB- ext3 rw,noatime,errors=continue,data=ordered 0 0
/dev/sdc1 /media/LMSDAta ext3 rw,noatime,errors=continue,data=ordered 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0


This is the content after a reboot with only LMSDAta USB stick present during reboot:
aufs / aufs rw 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
/dev/sdb1 /live/image vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=mixed,errors=remount-ro 0 0
tmpfs /live/cow tmpfs rw,noatime,mode=755 0 0
tmpfs /live tmpfs rw,relatime 0 0
/dev/sdc1 /media/LMSDAta ext3 rw,noatime,errors=continue,data=ordered 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0

I don't have a clue.

Steen
SBP
 
Posts: 74
Joined: Thu Aug 16, 2012 5:27 am
Location: Denmark

Re: Wrong Disk names

Postby saintless » Fri Sep 28, 2012 8:53 pm

Hi, Steen,

my best guess is you have saved mount point for Seagate_FreeAgent_Go_2GE957HB as sdd1. It could be on your FoxyRoxy bootable usb or a configuration file in your LMS usb stick.
The right mount point order for the usb drives is sdb1, sdc1, sdd1. In your case with both usb sticks inserted you have this order: sdb1, sdd1, sdc1. LMS usb is mounted correct as sdc1 but sdd1 is mounted before it because there is open mount point for sdd1 already.
When you boot with only LMS usb you get empty but open mount point as sdd1 for Seagate_FreeAgent. The system thinks it is inserted because it reads this from a configuration file somewhere.
When you insert the usb stick Seagate_FreeAgent the mount point is populated with the correct content, because your sdc1 LMS mount point is busy and already populated.
When you reboot with both usb sticks inserted the system sort it self out by adding the right boot order for all usb mount points: sdb1, sdc1, sdd1.
You can't be sure which usb port will be mounted as sdd1. I guess your usb port with LMS data is mounted second as sdd1 after the reboot and because there is already Seagate_FreeAgent volume label for sdd1 mount point saved somewhere the system gets confused.

There is a simple way to check if my theory is correct. Make sure the system is booted with both usb sticks and the content is mismatched. Then shutdown the computer and switch the usb sticks in the ports. Then start the computer and see if the problem is gone.

I can't think of anything else for the moment.

Cheers, Toni
User avatar
saintless
 
Posts: 246
Joined: Sat Jul 14, 2012 7:01 am
Location: Bulgaria

Re: Wrong Disk names

Postby jbv » Fri Sep 28, 2012 10:29 pm

Hi Steen,

Ok who's bad? yours or mine :-)

Probably a little of both :)

I will have a closer look later today. I've just woken up and am still having my first coffee of the day, so the brain is still a little dopey :)

Off the bat, my best guess (and what I will be looking for first), is that at some point you have used 95-create or a script from the 95-xxx family and it has included the /media directory in the final .squashfs file or it has included /etc/mtab

The quickest and safest thing for you to do, would be to manually load the .squashfs using a xx-load script, review the contents (which should be in /tmp/sqf-xxxxx) with XFE and if they exist, delete the /media directory and/or /etc/mtab from the working folder, then rebuild the .squashfs with the appropriate xx-save script.
jbv
 
Posts: 600
Joined: Sat Jul 14, 2012 2:02 am
Location: Sydney, Australia

Next

Return to Whoops - This needs fixing



Who is online

Users browsing this forum: No registered users and 2 guests

cron