Add extra hard drive with content

Hi,

I have added an extra hd with content. I hooked it up and booted up the box. I can access the disk, but it ask for password and it’s very slow to copy from the extra disk to the main disk (sdb). Here are the device info for the extra disk:

  • Device: /dev/sda1
  • Size: 186.31 GiB
  • Encrypted: No
  • Device Path: pci-0000:00:1f.2-ata-2-part1
  • Device ID 1: ata-HDT722520DLA380_VDK51BTDDJNBLL-part1
    Device ID 2: scsi-0ATA_HDT722520DLA380_VDK51BTDDJNBLL-part1
    Device ID 3: scsi-1ATA_HDT722520DLA380_VDK51BTDDJNBLL-part1
    Device ID 4: scsi-35000cca20bd5a9ec-part1
    Device ID 5: scsi-SATA_HDT722520DLA380_VDK51BTDDJNBLL-part1
    Device ID 6: wwn-0x5000cca20bd5a9ec-part1
  • FS ID: 0x83 Linux native

File System:

  • File System: Ext4
  • Mount Point: /run/media/dag/25019a70-1441-46dc-af5a-822545927f78
  • Label:

I want this disk to be mounted at startup without any password and I want to keep the content on the disk.

Can anybody give me a hint on how to solve this?

Dag R

Hi
Hooked it up to the box, how… SATA, USB, Firewire, String, Internal, External? :wink:

If USB then it’s ownership of the device folders don’t match your user/group, hence the password requirement, a udev rule could solve that.

I hooked it up with a sata cable.

Additional consideration,

Will this new disk be a permanent addition to your system or removable?

TSU

Yes it will be permanently added to the box.

On Wed 01 Jun 2016 12:46:01 PM CDT, dagring wrote:

Yes it will be permanently added to the box.

Hi
OK, so manually unmount, then fire up YaST partitioner and add via
this (adds to /etc/fstab) tool, highlight the device sdb, then select
edit, make sure the ‘don’t format’ radio button is selected, then on
the right side, set a mount point eg /data add a label if you like in
fstab options and finish.

You will then have a mount point called /data then you can cd here as
root user and make sure the underlying files permissions are owned as
required, or if required the actual /data directory.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.21-14-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

OK. Thanks a lot. The volume or rather the folder that contains all the files from the extra hdd appears under /data. Copying and reading works just swell.

Dag R

Can I do rsync to this disk when it is set up like this?

Yes. But know that permission bits are not preserved if MS formating is used

It’s formatted with ext4, but the username on the installation i had the disk connected to before I set it up with this installation, is the same username I had on the new setup. Can this make some confusion for the OS?

Hi
As long as the files and directories are the same username and group users all should be good…

Check with;


ls -la /data (and sub directories)

Or you can switch to root user and change to the directory (MAKE SURE YOUR IN THE RIGHT DIRECTORY!!!)


cd /data
pwd
chown -R username:users <some directory>
ls -la <some directory>/*

Note that user name is only for the most part for us meat bags. The computer uses the associated UID and the UID of the user must match the UID of the file as well as the GIDs But then it all depends on what you intend to do with a file and the permission you have to do it. But file created on another system may have a different UID and possible GID then on the current system. This is all independent of that of the user name which except for the user home the computer really does not care about

This works nice now. The disk is mounted on startup, and I can run rsync on folders of my choice. Thanks for your help.

Dag R