LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I copy files from a ntfs drive on ubuntu server? (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-copy-files-from-a-ntfs-drive-on-ubuntu-server-4175460685/)

Vodkaholic1983 05-04-2013 08:45 AM

Can I copy files from a ntfs drive on ubuntu server?
 
Hello all, I am a windows user and my CPU died on me the other day :(

Now I have a 3TB hard driver which has all my media on from my windows pc and I want to move it to my ubuntu server if this can be done?

Ive put the HDD into a external hard drive case and plugged it into the server.

Code:

fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000af9bd

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1            2048    39063551    19530752  82  Linux swap / Solaris
/dev/sda2  *    39063552    48828415    4882432  83  Linux
/dev/sda3        48828416  1465147391  708159488  83  Linux

Disk /dev/sdb: 2000.4 GB, 2000397852160 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907027055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c4a5b

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1            2048  3907024895  1953511424  fd  Linux RAID autodetect

Disk /dev/sdc: 2000.4 GB, 2000397852160 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907027055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00006463

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1            2048  3907024895  1953511424  fd  Linux RAID autodetect

Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0003e7d0

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1            2048  3907028991  1953513472  fd  Linux RAID autodetect

Disk /dev/md0: 6001.2 GB, 6001187618816 bytes
2 heads, 4 sectors/track, 1465133696 cylinders, total 11721069568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

WARNING: GPT (GUID Partition Table) detected on '/dev/sdi'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdi: 801.6 GB, 801569726464 bytes
256 heads, 63 sectors/track, 97071 cylinders, total 1565565872 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xea8fccae

  Device Boot      Start        End      Blocks  Id  System
/dev/sdi1              1  4294967295  2147483647+  ee  GPT

Now I am not very good with commands so I was kind of hoping some one would be able to step by step me on what I would need to do to move this media from A to B

I know it's asking alot but I don't want to lose this media.

Cheers

TroN-0074 05-04-2013 09:21 AM

If you have a graphical interface in your server you could just do that through the file browser
If you dont have a graphical interface you can do that with the cp command in the command line such as
Code:

cp /dev/sdb1/ /home/user/Music
I think that will copy everything to your Music folder so make sure you have enough room for it

you could also mount your hard drive to an existing folder in your system
Code:

sudo mount -t ntfs /dev/sdb1 /home/user/Public
then do
Code:

cd /home/user/Public
then do
Code:

ls -l
that will display all the folders in sdb1
from there you could use the cp command to copy your data into a desired folder or use cd to go further into your folders in sdb1.

Remember to replace user with the user name you have in your server

Good luck to you

Vodkaholic1983 05-04-2013 09:29 AM

Quote:

Originally Posted by TroN-0074 (Post 4944759)
If you have a graphical interface in your server you could just do that through the file browser
If you dont have a graphical interface you can do that with the cp command in the command line such as
Code:

cp /dev/sdb1/ /home/user/Music
I think that will copy everything to your Music folder so make sure you have enough room for it

you could also mount your hard drive to an existing folder in your system
Code:

sudo mount -t ntfs /dev/sdb1 /home/user/Public
then do
Code:

cd /home/user/Public
then do
Code:

ls -l
that will display all the folders in sdb1
from there you could use the cp command to copy your data into a desired folder or use cd to go further into your folders in sdb1.

Remember to replace user with the user name you have in your server

Good luck to you

Thanks is there any reason why my 3tb is showing up as 800gb ?

And no I don't have a graphic interface

Vodkaholic1983 05-04-2013 09:33 AM

Also got this

Code:

sudo mount -t ntfs /dev/sdi1 /home/media/USB
NTFS signature is missing.
Failed to mount '/dev/sdi1': Invalid argument
The device '/dev/sdi1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?


michaelk 05-04-2013 10:03 AM

fdisk does not work with gpt formatted drives. To see how the drive is partitioned use parted or gdisk.

parted /dev/sdi print

Once you determine the partition that contains the data you can mount it as:

mount -t ntfs-3g /dev/sdix /home/media/USB (replace x with the actual partition number)

Vodkaholic1983 05-04-2013 10:10 AM

Quote:

Originally Posted by michaelk (Post 4944775)
fdisk does not work with gpt formatted drives. To see how the drive is partitioned use parted or gdisk.

parted /dev/sdi print

Once you determine the partition that contains the data you can mount it as:

mount -t ntfs-3g /dev/sdix /home/media/USB (replace x with the actual partition number)

Thanks

that command gave me this

Code:

parted /dev/sdi print
Model: Toshiba StorE HDD (scsi)
Disk /dev/sdi: 802GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End    Size  File system  Name                          Flags
 1      17.4kB  134MB  134MB              Microsoft reserved partition  msftres

Still showing as 800gb? Wish ?I knew more about linux lol

Vodkaholic1983 05-05-2013 03:44 AM

Anyone else any ideas?

Cheers

Vodkaholic1983 05-05-2013 06:03 AM

looks like it was the usb bay which was causing the problems. Ive put the HDD into the computer and its come up as 3TB now

Code:

Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xae09847c

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

I still can't seem to mount it tho

Code:

mount -t ntfs-3g /dev/sdb1 /home/media/USB2
Gave me this

Code:

mount -t ntfs-3g /dev/sdb1 /home/media/USB2
NTFS signature is missing.
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

Parted gave me this tho

Code:

parted /dev/sdb print
Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel?
Warning: Not all of the space available to /dev/sdb appears to be used, you can
fix the GPT to use all of the space (an extra 4294967296 blocks) or continue
with the current setting?
Fix/Ignore?

Ignore gave me this

Code:

Ignore
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start  End    Size  File system  Name                          Flags
 1      17.4kB  134MB  134MB              Microsoft reserved partition  msftres



All times are GMT -5. The time now is 08:19 PM.