Re: parted and mount ** EXTERNAL **
On 09/26/2018 07:51 PM, Yasha Karant wrote: > the second is an > external 2 Tbyte USB harddrive with a XFS file system that is a dd copy > of a partition from another SL 7 machine (that is having difficulties -- > the partition is /home and the data is important). Wouldn't a dd copy wipe out any partition table or filesystem on the target device?
Re: parted and mount ** EXTERNAL **
Thank you for you comments. Below is the output from mount /dev/sdc1 on /run/media/ykarant/USB20FD type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2) /dev/sdb on /run/media/ykarant/e8df2b54-0637-4570-868b-9e542bf9a21f type xfs (rw,nosuid,nodev,relatime,seclabel,attr2,inode64,noquota,uhelper=udisks2) both of the /dev devices mentioned above are "automatic" from insertion into a USB jack (port) on a SL7 machine. The first is a 32 Gbyte flash drive "stick" with a works-installed MS file system, the second is an external 2 Tbyte USB harddrive with a XFS file system that is a dd copy of a partition from another SL 7 machine (that is having difficulties -- the partition is /home and the data is important). Note that the second is mounted as /dev/sdb (it was inserted before the flash drive), not as /dev/sdb1 . 2 Tbyte presumably is not "small", but nonetheless is mounted as /dev/xyz not /dev/xyzN . parted and gparted have no difficulties with either external USB drive once /dev/xyz "automatically" is created. The relevant outputs from parted run as root on the devices -- these contain/are mounted partitions: Using /dev/sdc Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: PNY USB 2.0 FD (scsi) Disk /dev/sdc: 31.0GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 4129kB 31.0GB 31.0GB primary fat32 lba Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: WD My Passport 25E1 (scsi) Disk /dev/sdb: 2000GB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 2000GB 2000GB xfs Note that mount on the system reporting the above has no issue with mounting a /dev/xyz device not as /dev/xyzN Yasha Karant On 09/26/2018 10:34 AM, Gilles Detillieux wrote: > If a device has actual partitions, using a standard partitioning > scheme, even if it's just a single partition, then Linux should detect > that and create the appropriate device nodes in /dev. While less > common than a single partition covering most of the disk, some smaller > drives or devices have no partitioning at all, and therefore no > partition table at the start of the drive. In those cases, Linux will > set up a node for the drive, e.g. /dev/sdh, but no nodes for > partitions (e.g. no /dev/sdh1, 2, ...). If that's the case, then it's > likely that the whole drive is formatted as a single filesystem, so > you can mount /dev/sdh directly, or use mkfs on it if you want to > create a new filesystem. It's also possible for a drive to have a > corrupted partition table which Linux can't read, so it will create > the drive node, but no partition nodes. So, approach any drive that > has no clear partitions with a bit of caution. > > On 09/26/2018 12:05 PM, Yasha Karant wrote: >> To be clear, I created the partition and the XFS format using gparted, >> the gnome GUI interface to parted. My recollection from the past, and >> my observation as the drive was "flashing", was that I did not need >> manually to invoke mkfs using the GUI. However, rereading the man page >> for gparted, this step may have been lacking. I just confirmed by >> direct observation what I had forgotten; when a flash drive USB "stick" >> is inserted in a "modern" Linux system, at least two entries are created >> in /dev. In the immediate test case on the laptop before me, these are >> /dev/sdb and /dev/sdb1 (the USB flash drive is a MS Win format) and >> /dev/sdb1 is the mounted device. Thus, when the system reports /dev/xyz >> appears, the minimal first mount point would be /dev/xyzN as revealed >> through a ls of /dev/ . >> >> Question: what does one do if, after inserting a USB storage device, >> one gets /dev/xyz, say, but there is no /dev/xyzN despite parted >> reporting that the device does indeed have "MS" partitions as well as a >> filesystem? >> >> On 09/26/2018 07:47 AM, Gilles Detillieux wrote: >>> On 09/26/2018 08:34 AM, Howard, Chris wrote: > Why do parted and mount have this difference? /dev/sdg1 ? What he said. /dev/sdg is the whole device /dev/sdg1 is the first partition on that device. Partitions have file systems. Partitions with file systems can be mounted. parted works on the whole device. mount works on the partitions with file systems. >>> Also, if I'm not mistaken, when you create a partition using parted's >>> mkpart command, you designate which type of partition it is, and that >>> info is stored in the partition table, but it doesn't format the file >>> system for you. You have to follow parted with a mkfs command for each >>> partition you create, e.g.: >>> >>> mkfs
Re: parted and mount ** EXTERNAL **
If a device has actual partitions, using a standard partitioning scheme, even if it's just a single partition, then Linux should detect that and create the appropriate device nodes in /dev. While less common than a single partition covering most of the disk, some smaller drives or devices have no partitioning at all, and therefore no partition table at the start of the drive. In those cases, Linux will set up a node for the drive, e.g. /dev/sdh, but no nodes for partitions (e.g. no /dev/sdh1, 2, ...). If that's the case, then it's likely that the whole drive is formatted as a single filesystem, so you can mount /dev/sdh directly, or use mkfs on it if you want to create a new filesystem. It's also possible for a drive to have a corrupted partition table which Linux can't read, so it will create the drive node, but no partition nodes. So, approach any drive that has no clear partitions with a bit of caution. On 09/26/2018 12:05 PM, Yasha Karant wrote: To be clear, I created the partition and the XFS format using gparted, the gnome GUI interface to parted. My recollection from the past, and my observation as the drive was "flashing", was that I did not need manually to invoke mkfs using the GUI. However, rereading the man page for gparted, this step may have been lacking. I just confirmed by direct observation what I had forgotten; when a flash drive USB "stick" is inserted in a "modern" Linux system, at least two entries are created in /dev. In the immediate test case on the laptop before me, these are /dev/sdb and /dev/sdb1 (the USB flash drive is a MS Win format) and /dev/sdb1 is the mounted device. Thus, when the system reports /dev/xyz appears, the minimal first mount point would be /dev/xyzN as revealed through a ls of /dev/ . Question: what does one do if, after inserting a USB storage device, one gets /dev/xyz, say, but there is no /dev/xyzN despite parted reporting that the device does indeed have "MS" partitions as well as a filesystem? On 09/26/2018 07:47 AM, Gilles Detillieux wrote: On 09/26/2018 08:34 AM, Howard, Chris wrote: Why do parted and mount have this difference? /dev/sdg1 ? What he said. /dev/sdg is the whole device /dev/sdg1 is the first partition on that device. Partitions have file systems. Partitions with file systems can be mounted. parted works on the whole device. mount works on the partitions with file systems. Also, if I'm not mistaken, when you create a partition using parted's mkpart command, you designate which type of partition it is, and that info is stored in the partition table, but it doesn't format the file system for you. You have to follow parted with a mkfs command for each partition you create, e.g.: mkfs.xfs /dev/sdg1 Then you can mount the partition. -- Gilles R. Detillieux E-mail: Spinal Cord Research Centre WWW: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.scrc.umanitoba.ca_&d=DwIDaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A&m=ZAivXWOEa3JkbcTzHi5hhw6pBHoZy9IfMK0OugN0Wvk&s=FO-qkKqF9muQM16pJpkpj0YGAoNlP5AHBIPlNT9GM0I&e= Dept. of Physiology and Pathophysiology, Rady Faculty of Health Sciences, Univ. of Manitoba Winnipeg, MB R3E 0J9 (Canada)
Re: parted and mount ** EXTERNAL **
To be clear, I created the partition and the XFS format using gparted, the gnome GUI interface to parted. My recollection from the past, and my observation as the drive was "flashing", was that I did not need manually to invoke mkfs using the GUI. However, rereading the man page for gparted, this step may have been lacking. I just confirmed by direct observation what I had forgotten; when a flash drive USB "stick" is inserted in a "modern" Linux system, at least two entries are created in /dev. In the immediate test case on the laptop before me, these are /dev/sdb and /dev/sdb1 (the USB flash drive is a MS Win format) and /dev/sdb1 is the mounted device. Thus, when the system reports /dev/xyz appears, the minimal first mount point would be /dev/xyzN as revealed through a ls of /dev/ . Question: what does one do if, after inserting a USB storage device, one gets /dev/xyz, say, but there is no /dev/xyzN despite parted reporting that the device does indeed have "MS" partitions as well as a filesystem? On 09/26/2018 07:47 AM, Gilles Detillieux wrote: > On 09/26/2018 08:34 AM, Howard, Chris wrote: >>> Why do parted and mount have this difference? >> /dev/sdg1 ? >> >> >> What he said. >> /dev/sdg is the whole device >> /dev/sdg1 is the first partition on that device. >> Partitions have file systems. Partitions with file systems can be >> mounted. >> >> parted works on the whole device. >> mount works on the partitions with file systems. > > Also, if I'm not mistaken, when you create a partition using parted's > mkpart command, you designate which type of partition it is, and that > info is stored in the partition table, but it doesn't format the file > system for you. You have to follow parted with a mkfs command for each > partition you create, e.g.: > > mkfs.xfs /dev/sdg1 > > Then you can mount the partition. >
Re: parted and mount ** EXTERNAL **
On 09/26/2018 08:34 AM, Howard, Chris wrote: Why do parted and mount have this difference? /dev/sdg1 ? What he said. /dev/sdg is the whole device /dev/sdg1 is the first partition on that device. Partitions have file systems. Partitions with file systems can be mounted. parted works on the whole device. mount works on the partitions with file systems. Also, if I'm not mistaken, when you create a partition using parted's mkpart command, you designate which type of partition it is, and that info is stored in the partition table, but it doesn't format the file system for you. You have to follow parted with a mkfs command for each partition you create, e.g.: mkfs.xfs /dev/sdg1 Then you can mount the partition. -- Gilles R. Detillieux E-mail: Spinal Cord Research Centre WWW: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.scrc.umanitoba.ca_&d=DwIDaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A&m=kHIwLV7GEvlQ7BsFbN-khVlm2Jk3eNpdwHa3-CU-mO4&s=KqeP2Q6oibvXAtGzrqiHduxB129MkpySzDVazbtVcFw&e= Dept. of Physiology and Pathophysiology, Rady Faculty of Health Sciences, Univ. of Manitoba Winnipeg, MB R3E 0J9 (Canada)
RE: parted and mount ** EXTERNAL **
> Why do parted and mount have this difference? /dev/sdg1 ? What he said. /dev/sdg is the whole device /dev/sdg1 is the first partition on that device. Partitions have file systems. Partitions with file systems can be mounted. parted works on the whole device. mount works on the partitions with file systems. *** This email is from an EXTERNAL sender *** Use caution before responding. DO NOT open attachments or click links from unknown senders or unexpected email. If this email appears to be sent from a Platte River Power Authority employee or department, verify its authenticity before acting or responding. Contact the IT Help Desk with any questions.