[clue] Dumb disk question

David L. Willson DLWillson at TheGeek.NU
Mon Oct 26 12:20:36 MDT 2015


file -s (some-block-device) 

... is very cool, Dan. Here's the log of my "trying it later". 

[dlwillson at nb-willson-7 ~]$ file --help 
Usage: file [OPTION...] [FILE...] 
Determine type of FILEs. 
... 
-r, --raw don't translate unprintable chars to \ooo 
-s, --special-files treat special (block/char devices) files as 
ordinary ones 
-C, --compile compile file specified by -m 
... 
Report bugs to http://bugs.gw.com/ 
[dlwillson at nb-willson-7 ~]$ sudo file -s /dev/sda1 
/dev/sda1: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs) 
[dlwillson at nb-willson-7 ~]$ lsblk 
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT 
sda 8:0 0 447.1G 0 disk 
├─sda1 8:1 0 500M 0 part /boot 
└─sda2 8:2 0 446.7G 0 part 
├─cl-root 253:0 0 50G 0 lvm / 
├─cl-swap 253:1 0 7.9G 0 lvm [SWAP] 
└─cl-home 253:2 0 388.7G 0 lvm /home 
sdb 8:16 0 465.8G 0 disk 
└─sdb1 8:17 0 465.8G 0 part 
└─shared-lv_stuph 253:3 0 410.6G 0 lvm /stuph 
sr0 11:0 1 1024M 0 rom 
[dlwillson at nb-willson-7 ~]$ sudo file -s /dev/sda2 
[sudo] password for dlwillson: 
/dev/sda2: LVM2 PV (Linux Logical Volume Manager), UUID: TslZ5N-ikNa-zMgC-Lo0s-9bMv-RfxZ-2r5v2D, size: 479577767936 
[dlwillson at nb-willson-7 ~]$ sudo file -s /dev/mapper/cl-root 
/dev/mapper/cl-root: symbolic link to `../dm-0' 
[dlwillson at nb-willson-7 ~]$ sudo file -s /dev/dm-0 
/dev/dm-0: SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs) 
[dlwillson at nb-willson-7 ~]$ sudo file -s /dev/mapper/cl-swap 
/dev/mapper/cl-swap: symbolic link to `../dm-1' 
[dlwillson at nb-willson-7 ~]$ sudo file -s /dev/dm-1 
/dev/dm-1: Linux/i386 swap file (new style), version 1 (4K pages), size 2064383 pages, no label, UUID=eccf1ecc-5f1c-44ce-8e28-036e8930860f 
[dlwillson at nb-willson-7 ~]$ 

--
David L. Willson
Teacher, Engineer, Evangelist
RHCE+Satellite CCAH Network+ A+ Linux+ LPIC-1 Ubuntu_CP SUSE_CLA
Mobile 720-333-LANS(5267)
http://sofree.us

This is a good time for a r3VOLution.

----- Original Message ----- 

> Cool! Trying that later.

> Sent from my Verizon Wireless 4G LTE smartphone

> -------- Original message --------
> From: Dan Kulinski <daniel at kulinski.net>
> Date: 10/23/2015 4:39 PM (GMT-07:00)
> To: CLUE's mailing list <clue at cluedenver.org>
> Subject: Re: [clue] Dumb disk question

> If you do want to see if there is a file system directly on the block
> device, try file -s /dev/sdb. This will look for the magic number in
> common locations. I just learned this because I knew how the file
> command worked on files and wondered if it knew about file systems.
> Sure enough, it does!

> On Fri, Oct 23, 2015 at 4:35 PM, Dan Kulinski < daniel at kulinski.net >
> wrote:

> > Do you know what type of file system it is supposed to be? If there
> > is no partition table then the file system should be taking up the
> > whole device. The way you limit the size of a file system,
> > generally, is to create a partition.
> 

> > On Fri, Oct 23, 2015 at 4:30 PM, foo7775 < foo7775 at comcast.net >
> > wrote:
> 

> > > Hey all, first off, I am _very_ aware that this is a
> > > painfully-basic
> > > question, but this has been a rough week, so please bear with
> > > me...
> > 
> 

> > > I've been searching for this info for a while now, but my
> > > very-tired
> > > brain doesn't appear to be able to format the search terms
> > > appropriately. What I'm wanting to do is to confirm that a
> > > defined
> > > disk (/dev/sdb in this case) is essentially "a raw partition" &
> > > doesn't have any data on it. If I can confirm that, then I can
> > > create the needed partitions/filesystems & turn it over to the
> > > customer. The 'fdisk' utility shows me this:
> > 
> 

> > > Disk /dev/sdb: 214.7 GB, 214748364800 bytes
> > 
> 
> > > 255 heads, 63 sectors/track, 26108 cylinders
> > 
> 
> > > Units = cylinders of 16065 * 512 = 8225280 bytes
> > 
> 
> > > Sector size (logical/physical): 512 bytes / 512 bytes
> > 
> 
> > > I/O size (minimum/optimal): 512 bytes / 512 bytes
> > 
> 
> > > Disk identifier: 0x00000000
> > 
> 
> > > Now I can tell that it doesn't contain any partitions on it (i.e.
> > > sdb1, sdb2, etc.), but I just can't seem to remember how to
> > > confirm
> > > that it isn't formatted as a single big partition. I'd be
> > > grateful
> > > if someone could refresh my memory on this...
> > 
> 

> > > Thanks,
> > 
> 

> > > T.
> > 
> 

> > > Avast logo
> > 
> 
> > > This email has been checked for viruses by Avast antivirus
> > > software.
> > 
> 
> > > www.avast.com
> > 
> 

> > > _______________________________________________
> > 
> 
> > > clue mailing list: clue at cluedenver.org
> > 
> 
> > > For information, account preferences, or to unsubscribe see:
> > 
> 
> > > http://cluedenver.org/mailman/listinfo/clue
> > 
> 

> _______________________________________________
> clue mailing list: clue at cluedenver.org
> For information, account preferences, or to unsubscribe see:
> http://cluedenver.org/mailman/listinfo/clue


More information about the clue mailing list