Friday, July 20, 2007

Gentoo: Mounting Large Disk via USB

I got 2 Western Digital 500 Gigs hard drives that formatted as NTFS file system at hand but not able to mount it, I choose to recompile my kernel as I have been using 2.6.19 for a while and it's time to move to 2.6.20. I read thread from the forum that I have to disable this feature in kernel in order to get it mounted properly -

CONFIG_USB_EHCI_HCD=m

I choosed to compile it as module so that I may be able to enable it if I need it. Then once I have finished compiling my kernel and reboot, I mounted the hard drive to my external enclusure, connect it to the laptop via usb and switched on the power , I can view the information via dmesg -

Jun 21 11:14:42 trinity sdb: Write Protect is off
Jun 21 11:14:42 trinity sdb: Mode Sense: 23 00 00 00
Jun 21 11:14:42 trinity sdb: assuming drive cache: write through
Jun 21 11:14:42 trinity sdb:<7>usb-storage: queuecommand called
Jun 21 11:14:42 trinity usb-storage: *** thread awakened.
Jun 21 11:14:42 trinity usb-storage: Command READ_10 (10 bytes)
Jun 21 11:14:42 trinity usb-storage: 28 00 00 00 00 00 00 00 08 00
Jun 21 11:14:42 trinity usb-storage: Bulk Command S 0x43425355 T 0xd L 4096 F 12
8 Trg 0 LUN 0 CL 10
Jun 21 11:14:42 trinity usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
Jun 21 11:14:42 trinity usb-storage: Status code 0; transferred 31/31
Jun 21 11:14:42 trinity usb-storage: -- transfer complete
Jun 21 11:14:42 trinity usb-storage: Bulk command transfer result=0
Jun 21 11:14:42 trinity usb-storage: usb_stor_bulk_transfer_sglist: xfer 4096 by
tes, 1 entries
Jun 21 11:14:42 trinity usb-storage: Status code 0; transferred 4096/4096
Jun 21 11:14:42 trinity usb-storage: -- transfer complete
Jun 21 11:14:42 trinity usb-storage: Bulk data transfer result 0x0
Jun 21 11:14:42 trinity usb-storage: Attempting to get CSW...
Jun 21 11:14:42 trinity usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
Jun 21 11:14:42 trinity usb-storage: Status code 0; transferred 13/13
Jun 21 11:14:42 trinity usb-storage: -- transfer complete
Jun 21 11:14:42 trinity usb-storage: Bulk status result = 0
Jun 21 11:14:42 trinity usb-storage: Bulk Status S 0x53425355 T 0xd R 0 Stat 0x0
Jun 21 11:14:42 trinity usb-storage: scsi cmd done, result=0x0
Jun 21 11:14:42 trinity usb-storage: *** thread sleeping.
Jun 21 11:14:42 trinity sdb1
Jun 21 11:14:42 trinity sd 2:0:0:0: Attached scsi removable disk sdb
....truncated

It is ntfs file system, therefore I mount it with ntfs-3g,

shell>sudo ntfs-3g /dev/sdb1 /mnt

shell>mount
/dev/sdb1 on /mnt type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)

I see this message in /var/log/messages -

Jun 21 11:26:49 trinity ntfs-3g[4715]: Mounted /dev/sdb1 (Read-Write, label "Sto
rage1", NTFS 3.1)

shell>df -h
/dev/sdb1 466G 101M 466G 1% /mnt

We all love big storage, don't you?

Cheers ;]

1 comment:

Anonymous said...

See my post here :
http://lotso.livejournal.com/95505.html

http://www.flickr.com/photos/lotso/667497570/

All in all ~1.7TB of disk space