• April 19, 2024, 05:28:34 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Which drive is volume_1?  (Read 5680 times)

zforum69

  • Level 1 Member
  • *
  • Posts: 16
Which drive is volume_1?
« on: September 19, 2010, 06:48:44 PM »

Hi, I am in the process of reformatting all my drives to ext3 file systems so that the NAS has a more reliable journaled file system.  Eventually I will have the DNS323 confiurged as two individual disks and will regularly copy/backup from my primary disk to the secondary disk.

In order to reformat to ext3 and to make sure I do not accidently format the disk that had all the data, I had to pop out one of the disks, format after checking it had no data, pop back both in, copy across, pop out the other one, format, and copy back across.  During this process I noticed that volume_1 can change between the left and right disks.  Volume_1 basically is the last disk that the DNS323 boot up on.  ie if you pop one of the disks out and boot the DNS 323, the disk that was left in will be volume_1 (of course), but if you then put the second disk in it will always be volume_2 no matter which disk (left or right) it happens to be.  I incorrectly assumed if there were two disks volume_1 would always be the right disk.

Now to my question.  How do I know which disk (left or right) that volume_1 is.  I was thinking of putting i a dummy textfile saying this is "disk xxx" or "original volume_1", but if I do a regular backup there is the risk I'd copy that file across to the other disk and therefore would not be able to distinguish the difference.

Surely if I telnet into the DNS323 I should be able to work it out somehow.  Nothing in the webpage indicates which disk volume1, although it does tell me which disk (via serial number) is left and right.

Any ideas?

Z

Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: Which drive is volume_1?
« Reply #1 on: September 19, 2010, 07:50:06 PM »

With telnet access you can 'cat /etc/samba/smb.conf' and you will see entries for volume_1 and volume_2

Example:
[ Volume_1 ]
path = /mnt/HD_a2

[ Volume_2 ]
path = /mnt/HD_b2

You can also grab some info with 'df -h'.

Comparing free space etc to the values listed in your admin console should allow you to figure out which drive is which and the slot and serial number for verification.
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

zforum69

  • Level 1 Member
  • *
  • Posts: 16
Re: Which drive is volume_1?
« Reply #2 on: September 19, 2010, 08:06:44 PM »

With telnet access you can 'cat /etc/samba/smb.conf' and you will see entries for volume_1 and volume_2

Thanks for that. 

Quote
You can also grab some info with 'df -h'.

Comparing free space etc to the values listed in your admin console should allow you to figure out which drive is which and the slot and serial number for verification.

This part I'm a little uncomfortable as with as I can see myself making an error (for somebody like me with very limited linux skills and root access). 

After googling I thought I could do "hdparm -i /dev/sda" or "sdparm -i /dev/sda".  The first one doesn't work, and the second one does not exist.  However when I "cat /tmp/scsi.log" it seems to give me the serial nubmer of the drive against the device.  Is that a valid place to look?

Z
Logged

mig

  • Level 3 Member
  • ***
  • Posts: 217
Re: Which drive is volume_1?
« Reply #3 on: September 21, 2010, 02:44:35 PM »

... Volume_1 basically is the last disk that the DNS323 boot up on...

I don't think this observation is exactly true?  In linux system startup, the hard drives
are assigned device names, based on the order the hard drives are detected, on the hard
drive controllers.

For the DNS-323 the hard drive controllers are labeled on the circuit board in the photo
http://wiki.dns323.info/_detail/11.jpg?id=start&cache=cache as HDD0 and HDD1

In a single hard drive configuration, regardless if the drive is attached to HDD0 or HDD1,
the single hard drive will be detected and assigned the device name /dev/sda.  The D-Link
scripts will mount the second partition on the /dev/sda drive to /mnt/HD_a2 and the samba.conf
will share the directory (/mnt/HD_a2) as 'Volume_1'

In a dual hard drive configuration, the hard drive which is attached to the HDD0 controller will
be detected and assigned the device name /dev/sda.  The hard drive which is attached to the
HDD1 controller will be detected and assigned the device name /dev/sdb.  The D-Link scripts will
mount the second partition on the /dev/sda drive to /mnt/HD_a2 and the second partition on the
/dev/sdb drive to /mnt/HD_b2.  The samba.conf will share the directory (/mnt/HD_a2) as 'Volume_1'
and the directory (/mnt/HD_b2) as 'Volume_2'.
Logged

zforum69

  • Level 1 Member
  • *
  • Posts: 16
Re: Which drive is volume_1?
« Reply #4 on: September 21, 2010, 05:37:24 PM »

I don't think this observation is exactly true?  In linux system startup, the hard drives
are assigned device names, based on the order the hard drives are detected, on the hard
drive controllers.

I am very sure that this is what happened, because from windows I can see which volume had data and which one was empty.  Which drive gets mapped as /dev/HD_a2 and /dev/HD_b2 is something I did not confirm.  If they do indeed stay the same then the only explanation is that /dev/HD_a2  does not always get mapped to Volume_1.

When I get home I'll do more testing just to confirm my observations.

Z
Logged

zforum69

  • Level 1 Member
  • *
  • Posts: 16
Re: Which drive is volume_1?
« Reply #5 on: September 22, 2010, 05:11:03 AM »

When I get home I'll do more testing just to confirm my observations.

I can confirm my earler statements Volume_1 is mapped to the the last drive that it booted up on, rather than always the "right" drive if there was a drive in that slot.

I had a 1TB and a 1.5TB drive to test with.  As a result it was very easy for me to see which was volume_1 from the status page due to the different size (and brand) of HDD.  Basically I started with both drives in, popped out the right, popped it back in, popped the left out, popped it back in.  Before popping a drive in/out I shutdown, popped the drive in or out, then rebooted to see what happened in the status page. 

If the DNS323 booted up on a particular drive, if on the next boot up that drive is still there that will still be volume one, no matter which slot that drive happened to be in, or whether the other slot was occupied or not.

Z
Logged

mig

  • Level 3 Member
  • ***
  • Posts: 217
Re: Which drive is volume_1?
« Reply #6 on: September 22, 2010, 12:00:39 PM »

Just curious, what firmware are you using?
Logged

zforum69

  • Level 1 Member
  • *
  • Posts: 16
Re: Which drive is volume_1?
« Reply #7 on: September 22, 2010, 12:54:24 PM »

Just curious, what firmware are you using?
v1.08

Z
Logged