[OT] Re: Help Please
Jody Bruchon
jody at jodybruchon.com
Sat Mar 7 18:49:00 UTC 2015
On 3/7/2015 1:00 PM, andy broderick wrote:
> The problem that I have is that if the NAS is rebooted or has a power
> cut when it comes back
> on the HDD's will be in a different (random) order and then it is
> difficult (almost impossible) to find a file required.
This is expected behavior in Linux, especially with USB storage devices.
Depending on the OS detecting drives in a specific order is a bad thing.
> I do not know why 3 of them have Win95 Ext'd (LBA) partitions as all 4 were
> formatted on a win7 machine with NTFS.
The way extended partitions work is this: the "partition" that is marked
as an "extended" type (the first one on those three disks you're
confused about) *encapsulates* all of the space used by all extended
partitions (any partition number above 4 in the Linux device numbering
scheme), so the first partition is just a placeholder and the NTFS
partition entry /dev/sd{b,c,d}5 is the actual data partition you're
interested in. Just ignore the ones that are "Win95 Ext'd" types.
> What I'm asking help with is there any way that the 4 drives can be
> fixed into one position
> so I can easily find files via the network.
You need to see if you can find and mount devices by UUID instead of
device name. This depends heavily on having a 'mount' command that can
mount by UUID, so I don't know if this is an option for you. Since you
have BusyBox, you may also have the 'blkid' command which will help you
find UUIDs Here's what some of its output looks like:
/ # blkid
/dev/md1: UUID="2dbd4e62-2952-434f-82dc-7246e9872656" TYPE="xfs"
/dev/md2: UUID="d25850f2-ea02-4588-9e9a-f1c46e7a4f2f" TYPE="xfs"
/dev/md0: UUID="C7AE-042B" TYPE="vfat"
/dev/sdb3: UUID="73cbd6f4-ba19-a018-1fc7-6372b49d72be"
TYPE="linux_raid_member"
/dev/sdb2: UUID="6cb1d7eb-e6d0-50c8-1fc7-6372b49d72be"
TYPE="linux_raid_member"
/dev/sr0: LABEL="Boot Camp" TYPE="iso9660"
(.... snip ...)
You'll need to note the UUID for each /dev/sd* partition that you're
interested in, then edit /etc/fstab to include lines that mount the
devices by UUID instead of by explicit device name. Read:
http://linux.die.net/man/8/mount
and
http://linux.die.net/man/5/fstab
for information on mounting by UUID. This will let you tie specific
filesystem mounts to specific mountpoints so that the C/D/E/F you're
seeing shared over the network will remain consistent.
This should put you on the right path. I hope this helps you out. If you
need more assistance, try asking questions on a board centered on Linux
users helping each other, such as LinuxQuestions.org.
-Jody Bruchon
More information about the busybox
mailing list