NTFS drive that I need to mount to get the data off

therealivandrago

New Member
Jun 6, 2023
13
3
3
The goal is to get my ntfs 6TB drive in fstab and mounted, pass it through to a VM, test some files and then get the data off. Once the data is off I want to reformat the drive in proxmox so it's not NTFS anymore and use it as a media drive. Im not knowledgable about mounting so i used a guide

looking any help possible to figure out the mounting and advice on getting the data off > reformatting the drive > getting data back onto the drive, thanks!

running into some errors mounting an NTFS drive in proxmox, here's the output below:

MOUNT -A
Code:
root@proxmox:~# mount -a
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Could not mount read-write, trying read-only

FSTAB
Code:
cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
UUID=96B4-53D0 /boot/efi vfat defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0

# syntax to use for fstab mounting
# UUID="YOUR-UID-HERE" /mnt/ntfs/ ntfs nls-utf8,umask-0222,uid-1000,gid-1000,ro 0 0
UUID="xxxxxxxxxxxxxxxxx" /mnt/ntfs/ ntfs nls-utf8,umask-0222,uid-1000,gid-1000,rw 0 0
 
Sorry I'm like super lost looking at that guide, still new to proxmox. Are those commands supposed to be run on pve or the virtual machine?

If I have to run this on proxmox what would I do next on the VM? the guide has the below lines on configuration

Code:
qm set 592 -scsi2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC
update VM 592: -scsi2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC

What is 592? is that that the VM ID for proxmox? I don't want to assume and break something since i didn't see the guide mention that anywhere

also same question for "-scsi2" is that supposed to be a UID for something or is that just a an option qm set.

Im sure these are a lot of questions sorry. If there's a tutorial that's a little more newbie friendly please share so I'm not here just bugging people.

Thanks for your support for far!
 
After doing a bunch of research I figured out the `592` is the VM ID that you assign in proxmox, or the number to the left of the VM. Just leaving this here in case a noob like myself comes by reading this later trying to follow the steps in the link.

Thanks leesteken

https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)#Update_Configuration

That being said after the passthrough the drive was actually detected ubunutu when running `lsblk` but i had issues and errors after installing ntfs-3g in linux. I switched the passthrough to a win 11 VM instead and its not detected there either :( what could i be missing. i really just wanna copy off the data off the drive
 
Honestly this is a case where I would whip out my Parted Magic bood USB, use my desktop or laptop and boot into Parted Magic and do everything I need from there. I have yet to find a hard drive that PartedMagic coiuldn't access or reformat. https://partedmagic.com/

I have one of these for connecting all manner of hard drives to my desktop or laptop via USB https://www.amazon.com/Warmstor-Adapter-Computer-Connector-Converter/dp/B076WZ1N4K

By the way, I also use the Parted Magic iso image in Proxmox to resize VM drives.
 
I got it fixed, the command from the article did succeed but windows doesn't load iscsi drives by default. I wrote out steps one for anyone, who is new to proxmox like myself, can get an ntfs drive loaded without any trouble.

run this in the proxmox shell
Code:
lsblk |awk 'NR==1{print $0" DEVICE-ID(S)"}NR>1{dev=$1;printf $0" ";system("find /dev/disk/by-id -lname \"*"dev"\" -printf \" %p\"");print "";}'|grep -v -E 'part|lvm'

Take the ID at the end for your drive or drives, I bolded that portion so they stand out

Code:
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT DEVICE-ID(S)
sda                            8:0    0   7.3T  0 disk   /dev/disk/by-id/wwn-0x5000c500c35cd719 /dev/disk/by-id/ata-ST8000DM004-2CX188_ZCT1DNY1
sdb                            8:16   1    29G  0 disk   /dev/disk/by-id/usb-Generic_STORAGE_DEVICE-0:0
sdc                            8:32   0 931.5G  0 disk   /dev/disk/by-id/usb-JMicron_Generic_0123456789ABCDEF-0:0
sdd                            8:48   0   1.8T  0 disk   /dev/disk/by-id/wwn-0x5000c500661eeebd /dev/disk/by-id/ata-ST2000DX001-1CM164_Z1E783H2

For using the "qm set" command below change -iscsi2 to -sata2 instead and change the ending to your drive ID. That will load the drive in windows using sata mode and have it work by default since windows has sata drivers baked in. I have absolutely no clue where to get iscsi drivers
Code:
qm set <VMID> -scsi2 /dev/disk/by-id/<YOURDRIVEIDHERE>

Hope this helps someone else like it did me
 
Last edited:
  • Like
Reactions: leesteken